Running gfsh Commands on the OS Command Line
You can run some gfsh
commands directly from your operating system’s prompt by preceding the command with gfsh
. This can be useful for Unix shell or Windows batch scripting. For example:
$ gfsh start locator --name=locator2 --port=10335
To see which gfsh commands are available directly on the prompt:
$ gfsh help
Running Multiple gfsh Commands on the OS Command Line
To run multiple commands directly on the command line,
use the -e
option followed by the gfsh
command within
quote marks. For example:
prompt>gfsh -e "start locator --name=locator1" -e "start server --name=server1"
prompt>gfsh -e "start jconsole"
prompt>gfsh -e "connect --locator=remotehost[10334]" -e "rebalance" -e "gc"