Search This Blog

Thursday 29 November 2012

GemFire 70 and Parallel WAN and Simplified WAN Configuration

With the introduction of GemFire 70 the WAN replication has been simplified. IN fact the simplest setup is as shown below.

1. A cache sever started with a cache.xml as follows which defines a single sender and a receiver
  
<?xml version="1.0"?>
<!DOCTYPE cache PUBLIC
    "-//GemStone Systems, Inc.//GemFire Declarative Caching 7.0//EN"
    "http://www.gemstone.com/dtd/cache7_0.dtd">

<cache>
    <gateway-sender id="sender1" parallel="true" remote-distributed-system-id="2" dispatcher-threads="2" order-policy="partition"/>
    <gateway-receiver start-port="1530" end-port="1551"/>
    <cache-server port="40001"/>
    <region name="wantest">
        <region-attributes refid="PARTITION" gateway-sender-ids="sender1"/>
    </region>
</cache>

2. Some commands in GFSH to verify the gateway senders/recievers
  
Cluster-1 gfsh>list gateways
Gateways


GatewaySender

GatewaySender Id |                       Member                       | Remote Cluster Id |   Type   | Status  | Queued Events | Receiver Location
---------------- | -------------------------------------------------- | ----------------- | -------- | ------- | ------------- | -----------------
sender1          | Pas-Apicellas-MacBook-Pro(server1:22361)<v1>:10766 | 2                 | Parallel | Running | 0             | null
sender1          | Pas-Apicellas-MacBook-Pro(server2:22362)<v2>:25822 | 2                 | Parallel | Running | 0             | null


GatewayReceiver

                      Member                       | Port | Sender Count | Sender's Connected
-------------------------------------------------- | ---- | ------------ | ------------------------------------------------------
Pas-Apicellas-MacBook-Pro(server1:22361)<v1>:10766 | 1541 | 2            | ["Pas-Apicellas-MacBook-Pro(server1:22385)<v1>:55223"]
Pas-Apicellas-MacBook-Pro(server2:22362)<v2>:25822 | 1537 | 2            | ["Pas-Apicellas-MacBook-Pro(server2:22386)<v2>:11991"]

Cluster-1 gfsh>status gateway-sender --id=sender1

                      Member                       |   Type   | Status
-------------------------------------------------- | -------- | -------
Pas-Apicellas-MacBook-Pro(server1:22361)<v1>:10766 | Parallel | Running
Pas-Apicellas-MacBook-Pro(server2:22362)<v2>:25822 | Parallel | Running 

More information on this can be found at the following link

http://pubs.vmware.com/vfabricNoSuite/index.jsp?topic=/com.vmware.vfabric.gemfire.7.0/topologies_and_comm/multi_site_configuration/setting_up_a_multisite_system.html

Thursday 22 November 2012

Spring data repository for GemFire 7

The example below shows the various config and code required to use Spring Data Repository with GemFire7. It is assumed we have a GemFire distributed system up and running with some department and employee data. For this example we will connect as a client proxy where all requests go to the server side for processing.

client.xml - client cache file for access to the remote servers
  
<!DOCTYPE client-cache PUBLIC 
"-//GemStone Systems, Inc.//GemFire Declarative Caching 7//EN" 
"http://www.gemstone.com/dtd/cache7_0.dtd">
<client-cache>	
	<!-- No cache storage in the client region because of the PROXY client region shortcut setting. -->

    <region name="departments">
      <region-attributes refid="PROXY" pool-name="gfPool"/>
    </region>   
		
    <region name="employees">
		<region-attributes refid="PROXY" pool-name="gfPool" />
    </region>
</client-cache>

application-context.xml - spring application context file using spring gemfire. It's here where we make a connection to GemFire through a locator to load balance between the servers.
  
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:gfe="http://www.springframework.org/schema/gemfire"
	xmlns:gfe-data="http://www.springframework.org/schema/data/gemfire"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire-1.2.xsd
		http://www.springframework.org/schema/data/gemfire http://www.springframework.org/schema/data/gemfire/spring-data-gemfire-1.2.xsd">
		
	<gfe:client-cache id="client-cache" cache-xml-location="classpath:client.xml" pool-name="gfPool"/>
	
	<gfe:pool id="gfPool" max-connections="10">
		<gfe:locator host="localhost" port="10334"/>
	</gfe:pool>
	
	<gfe:lookup-region id="departments" name="departments" cache-ref="client-cache"/>
   	<gfe:lookup-region id="employees" name="employees" cache-ref="client-cache"/>

	<gfe-data:repositories base-package="vmware.au.se.gf7.deptemp.repos"  />
   
</beans>

Department.java - domain object with spring data repository annotation referencing "departments" region in gemFire
  
package vmware.au.se.gf7.deptemp.beans;

import java.io.Serializable;
import java.util.Properties;

import org.springframework.data.annotation.Id;
import org.springframework.data.gemfire.mapping.Region;

import com.gemstone.gemfire.cache.Declarable;

@Region("departments")
public class Department implements Declarable, Serializable
{

	private static final long serialVersionUID = -9097335119586059309L;

	@Id
	private int deptno;
	private String name;
	
	public void init(Properties props) 
	{
		// TODO Auto-generated method stub
		this.deptno = Integer.parseInt(props.getProperty("deptno"));
		this.name = props.getProperty("name");
	}

	public int getDeptno() {
		return deptno;
	}

	public void setDeptno(int deptno) {
		this.deptno = deptno;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "Department [deptno=" + deptno + ", name=" + name + "]";
	}
  
}

Employee.java - domain object with spring data repository annotation referencing "employees" region in GemFire
  
package vmware.au.se.gf7.deptemp.beans;

import java.io.Serializable;
import java.util.Properties;

import org.springframework.data.annotation.Id;
import org.springframework.data.gemfire.mapping.Region;

import com.gemstone.gemfire.cache.Declarable;

@Region("employees")
public class Employee implements Declarable, Serializable
{

	private static final long serialVersionUID = -8229531542107983344L;
	
	@Id
	private int empno;
	private String name;
	private String job;
	private int deptno;

	public void init(Properties props) 
	{
		// TODO Auto-generated method stub
		this.empno = Integer.parseInt(props.getProperty("empno"));
		this.name = props.getProperty("name");
		this.job = props.getProperty("job");
		this.deptno = Integer.parseInt(props.getProperty("deptno"));
		
	}

	public int getEmpno() {
		return empno;
	}

	public void setEmpno(int empno) {
		this.empno = empno;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public int getDeptno() {
		return deptno;
	}

	public void setDeptno(int deptno) {
		this.deptno = deptno;
	}

	@Override
	public String toString() {
		return "Employee [empno=" + empno + ", name=" + name + ", job=" + job
				+ ", deptno=" + deptno + "]";
	}
	
	
	
} 

At this point we create two repositories as shown below.

DeptRepository.java
  
package vmware.au.se.gf7.deptemp.repos;

import java.util.Collection;

import org.springframework.data.gemfire.repository.Query;
import org.springframework.data.repository.CrudRepository;
import vmware.au.se.gf7.deptemp.beans.Department;

public interface DeptRepository extends CrudRepository<Department, String> 
{
	Department findByName(String name);
	
	@Query("SELECT * FROM /departments")
	Collection<Department> myFindAll();
} 

EmpRepository.java
  
package vmware.au.se.gf7.deptemp.repos;

import java.util.Collection;

import org.springframework.data.gemfire.repository.Query;
import org.springframework.data.repository.CrudRepository;

import vmware.au.se.gf7.deptemp.beans.Employee;

public interface EmpRepository extends CrudRepository<Employee, String>
{
	@Query("SELECT * FROM /employees where deptno = $1")
	Collection<Employee> empsInDeptno(int deptno);
	
	@Query("SELECT * FROM /employees")
	Collection<Employee> myFindAll();
}

Finally we have a Test client as follows.
  
package spring.gemfire.repository.test;

import java.util.Collection;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import vmware.au.se.gf7.deptemp.beans.Department;
import vmware.au.se.gf7.deptemp.beans.Employee;
import vmware.au.se.gf7.deptemp.repos.DeptRepository;
import vmware.au.se.gf7.deptemp.repos.EmpRepository;

public class Test 
{

	private ConfigurableApplicationContext ctx = null;
	
	public Test()
	{
		ctx = new ClassPathXmlApplicationContext("application-context.xml");		
	}
	
	public void run()
	{
		
		DeptRepository deptRepos = (DeptRepository) ctx.getBean(DeptRepository.class);
        
		// get quick size
		System.out.println("** Size of dept repository **");
		System.out.println("Size = " + deptRepos.count());
		
		// call findOne crud method by key
		System.out.println("** calling  deptRepos.findOne(\"20\") **");
		Department dept = (Department) deptRepos.findOne("20");
		System.out.println(dept);

		// call findOne crud method for an attribute
		System.out.println("** calling  deptRepos.findByName(\"ACCOUNTING\") **");
		Department dept2 = (Department) deptRepos.findByName("ACCOUNTING");
		System.out.println(dept2);
		
		// call my own findAll
		Collection<Department> deps = (Collection<Department>) deptRepos.myFindAll(); 
		
		System.out.println("\n** All Departments using -> deptRepos.myFindAll()");
		System.out.println("Defined as : @Query(\"SELECT * FROM /departments\") ");
		System.out.println("Collection<Department> myFindAll(); ** ");
		
		for (Department d: deps)
		{
			System.out.println(d.toString());
		}
		
		EmpRepository empRepos = (EmpRepository) ctx.getBean(EmpRepository.class);

		// get quick size
		System.out.println("** Size of emp repository **");
		System.out.println("Size = " + empRepos.count());
		
		Collection<Employee> emps = empRepos.empsInDeptno(40);
		System.out.println("\n ** All Employees in dept 40 using -> Collection<Employee> empsInDeptno(int deptno) **");
		for (Employee e: emps)
		{
			System.out.println(e.toString());
		}
		
	}
	
	/**
	 * @param args
	 * @throws InterruptedException 
	 */
	public static void main(String[] args) 
	{
		// TODO Auto-generated method stub
		Test t = new Test();
		t.run();
		System.out.println("all done..");
		
	}

}


Output is as follows

[info 2012/11/22 16:39:03.626 EST tid=0xf] AutoConnectionSource discovered new locators [192-168-1-3.tpgi.com.au/192.168.1.3:10334]

[config 2012/11/22 16:39:03.628 EST tid=0x10] Updating membership port.  Port changed from 0 to 59,207.
** Size of dept repository **
Size = 4
** calling  deptRepos.findOne("20") **
Department [deptno=20, name=RESEARCH]
** calling  deptRepos.findByName("ACCOUNTING") **
Department [deptno=10, name=ACCOUNTING]

** All Departments using -> deptRepos.myFindAll()
Defined as : @Query("SELECT * FROM /departments")
Collection myFindAll(); **
Department [deptno=30, name=SALES]
Department [deptno=40, name=OPERATIONS]
Department [deptno=10, name=ACCOUNTING]
Department [deptno=20, name=RESEARCH]
** Size of emp repository **
Size = 13

 ** All Employees in dept 40 using -> Collection empsInDeptno(int deptno) **
Employee [empno=7380, name=BLACK, job=CLERK, deptno=40]
Employee [empno=7381, name=BROWN, job=SALESMAN, deptno=40]
Employee [empno=7373, name=SIENA, job=CLERK, deptno=40]
all done..


For more information see the link below.

http://static.springsource.org/spring-gemfire/docs/current/reference/html/gemfire-repositories.html

Tuesday 20 November 2012

Management of GemFire 7 using gfsh command line interface

The GemFire command line interface or 'gfsh' (pronounced "gee - fish") provides a single interface that allows you to launch, manage and monitor vFabric GemFire processes, data and applications.

The GemFire 7.0 version of gfsh supports all of the commands that existed in the previous version of gfsh (released with GemFire 6.6) and also now includes functionality that was previously found in the gemfire and cacheserver scripts.
With gfsh, you can:

  • Start and stop GemFire processes, such as locators and cache servers
  • Start and stop Gateway Senders and Gateway Receiver processes
  • Deploy applications
  • Create and destroy regions
  • Execute functions
  • Manage disk stores
  • Import and export data
  • Monitor GemFire processes
  • Launch GemFire monitoring tools 
Here is a quick example of how it works.

1. Setup your environment to use GemFire 70 as shown below

export GEMFIRE=/Users/papicella/gemfire/vFabric_GemFire_70_b38623

export GF_JAVA=$JAVA_HOME/bin/java

export PATH=$PATH:$JAVA_HOME/bin:$GEMFIRE/bin

export CLASSPATH=$GEMFIRE/lib/gemfire.jar:$GEMFIRE/lib/antlr.jar:\
$GEMFIRE/lib/gfsh-dependencies.jar:$GEMFIRE/lib/gfSecurityImpl.jar:\
$GEMFIRE/lib/jackson-core-asl-1.9.9.jar:\
$GEMFIRE/lib/commons-logging.jar:\
$GEMFIRE/lib/tomcat-embed-core.jar:\
$GEMFIRE/lib/tomcat-embed-logging-juli.jar:\
$GEMFIRE/lib/tomcat-embed-jasper.jar:\
$CLASSPATH

echo ""
echo "CLASSPATH as follows..."
echo ""

echo $CLASSPATH


2. Start gfsh as shown below.
  
[Tue Nov 20 11:02:51 papicella@:~/vmware/ant-demos/gemfire/70/Demo ] $ gfsh
WARNING: JDK/lib/tools.jar is required for some GFSH commands. Please set JAVA_HOME to point to the JDK directory. Currently using JRE.
    _________________________     __
   / _____/ ______/ ______/ /____/ /
  / /  __/ /___  /_____  / _____  / 
 / /__/ / ____/  _____/ / /    / /  
/______/_/      /______/_/    /_/    v7.0

Monitor and Manage GemFire
gfsh>

3. Start a locator as shown below

start locator --name=locator1 --properties-file=gemfire.properties --bind-address=localhost --dir=/Users/papicella/vmware/ant-demos/gemfire/70/Demo/locator
  
gfsh>start locator --name=locator1 --properties-file=gemfire.properties --bind-address=localhost --dir=/Users/papicella/vmware/ant-demos/gemfire/70/Demo/locator
Starting a Locator in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/locator on localhost[10334] as locator1...
.....................................
Locator in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/locator on 192-168-1-3.tpgi.com.au[10334] as locator1 is currently online.
Process ID: 4686
Uptime: 19 seconds
GemFire Version: 7.0
Java Version: 1.6.0_35
Log File: /Users/papicella/vmware/ant-demos/gemfire/70/Demo/locator/locator1.log
JVM Arguments: -DgemfirePropertyFile=gemfire.properties -Dgemfire.launcher.registerSignalHandlers=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: /Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gemfire.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/antlr.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfsh-dependencies.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-core.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-logging-juli.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-jasper.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/ecj-3.7.2.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/spring-asm-3.1.1.RELEASE.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gemfire.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/antlr.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfsh-dependencies.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfSecurityImpl.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/jackson-core-asl-1.9.9.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/commons-logging.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-core.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-logging-juli.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-jasper.jar::

Successfully connected to: [host=192-168-1-3.tpgi.com.au, port=1099]

4. Start 2 peers as shown below

start server --name=peer1 --cache-xml-file=Pulse.xml --properties-file=gemfire.properties --locators=localhost[10334] --dir=/Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer1

start server --name=peer2 --cache-xml-file=Pulse.xml --properties-file=gemfire.properties --locators=localhost[10334] --dir=/Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer2


  
gfsh>start server --name=peer1 --cache-xml-file=Pulse.xml --properties-file=gemfire.properties --locators=localhost[10334] --dir=/Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer1
Starting a Cache server in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer1 on 192-168-1-3.tpgi.com.au[40404] as peer1...
.....
Server in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer1 on 192-168-1-3.tpgi.com.au[40001] as peer1 is currently online.
Process ID: 4687
Uptime: 2 seconds
GemFire Version: 7.0
Java Version: 1.6.0_35
Log File: /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer1/peer1.log
JVM Arguments: -Dgemfire.default.locators=192.168.1.3[10334] -DgemfirePropertyFile=gemfire.properties -Dgemfire.cache-xml-file=Pulse.xml -Dgemfire.locators=localhost[10334] -Dgemfire.launcher.registerSignalHandlers=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: /Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gemfire.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/antlr.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfsh-dependencies.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-core.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-logging-juli.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-jasper.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/ecj-3.7.2.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/spring-asm-3.1.1.RELEASE.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gemfire.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/antlr.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfsh-dependencies.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfSecurityImpl.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/jackson-core-asl-1.9.9.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/commons-logging.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-core.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-logging-juli.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-jasper.jar::

gfsh>start server --name=peer2 --cache-xml-file=Pulse.xml --properties-file=gemfire.properties --locators=localhost[10334] --dir=/Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer2
Starting a Cache server in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer2 on 192-168-1-3.tpgi.com.au[40404] as peer2...
.....
Server in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer2 on 192-168-1-3.tpgi.com.au[40002] as peer2 is currently online.
Process ID: 4688
Uptime: 2 seconds
GemFire Version: 7.0
Java Version: 1.6.0_35
Log File: /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer2/peer2.log
JVM Arguments: -Dgemfire.default.locators=192.168.1.3[10334] -DgemfirePropertyFile=gemfire.properties -Dgemfire.cache-xml-file=Pulse.xml -Dgemfire.locators=localhost[10334] -Dgemfire.launcher.registerSignalHandlers=true -Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path: /Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gemfire.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/antlr.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfsh-dependencies.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-core.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-logging-juli.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-jasper.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/ecj-3.7.2.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/spring-asm-3.1.1.RELEASE.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gemfire.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/antlr.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfsh-dependencies.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/gfSecurityImpl.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/jackson-core-asl-1.9.9.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/commons-logging.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-core.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-logging-juli.jar:/Users/papicella/gemfire/vFabric_GemFire_70_b38623/lib/tomcat-embed-jasper.jar::

5. Start Pulse to monitor the cluster over a HTTP browser

start pulse
  
gfsh>start pulse;
Running GemFire Pulse Pulse URL : http://192.168.1.3:8083/pulse/

6. The HTTP browser should be invoked where you can connect to an embedded pulse server to monitor the cluster. The username / password for this is admin/admin, Once logged in should look as follows


7. Now lets stop the system as shown below.

  
gfsh>stop server --name=peer2;
Stopping Cache Server running in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer2 on 192-168-1-3.tpgi.com.au[40002] as peer2...
Process ID: 4688
Log File: /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer2/peer2.log
....
gfsh>stop server --name=peer1;
Stopping Cache Server running in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer1 on 192-168-1-3.tpgi.com.au[40001] as peer1...
Process ID: 4687
Log File: /Users/papicella/vmware/ant-demos/gemfire/70/Demo/peer1/peer1.log
....
gfsh>stop locator --name=locator1;
Stopping Locator running in /Users/papicella/vmware/ant-demos/gemfire/70/Demo/locator on 192-168-1-3.tpgi.com.au[10334] as locator1...
Process ID: 4686
Log File: /Users/papicella/vmware/ant-demos/gemfire/70/Demo/locator/locator1.log
...
No longer connected to 192-168-1-3.tpgi.com.au[1099].

For more information about GemFire 70 gfsh command line options / commands you can just use the tab key in the shell. One example you can use to get an overview of metrics is as follows

  
gfsh>show metrics;

Cluster-wide Metrics

 Type   |        Metric         | Value
------- | --------------------- | -----
cluster | totalHeapSize         | 246
cache   | totalRegionEntryCount | 0
        | totalRegionCount      | 2
        | totalMissCount        | 0
        | totalHitCount         | 22454
        | diskReadsRate         | 0
        | diskWritesRate        | 0
        | flushTimeAvgLatency   | 0
        | totalBackupInProgress | 0
query   | activeCQCount         | 0
        | queryRequestRate      | 0

More information on gfsh can be found in the GemFire 70 documentation link below.

http://pubs.vmware.com/vfabricNoSuite/index.jsp?topic=/com.vmware.vfabric.gemfire.7.0/tools_modules/gfsh/chapter_overview.html