gearman stop start restart command

nlper picture nlper · Apr 2, 2015 · Viewed 12.7k times · Source

What are the command to start, restart and stop gearman?

So far I know:

gearadmin --shutdown # stop
gearmand -d # I believe it is to restart. Not sure.

Any idea for managing gearman?

Answer

Vinod Tigadi picture Vinod Tigadi · May 20, 2015

If you want to restart the gearmand, then you should use the shell script gearman-job-server. Type the command as sudo service gearman-job-server restart which STOPs and STARTs the server

---------------------- More Information If you need it -----------------------

I assume you have some small confusion over here. It's all because of Terminologies. The name of the application is Gearman which is a Message-Queue System.

I am answering with the assumption tha you are working with Linux OS. When you try installing the Gearman, the application that gets installed is gearmand which is a Job-Server/executable file. Something like Apache for example. Refer the link http://manpages.ubuntu.com/manpages/precise/en/man8/gearmand.8.html for the command reference.

Then what's the gearman? gearman is the Client Program/Application, with which you can talk to the gearmand. With gearman you can run client and worker functions from the command line. Refer the link http://manpages.ubuntu.com/manpages/precise/en/man1/gearman.1.html for the command reference.

So what's gearadmin? It's the tool which allows you to run Admin commands against your gearmand Refer the link: http://manpages.ubuntu.com/manpages/precise/en/man1/gearadmin.1.html

Now coming to your questions about the command gearmand. From the shell if you run the command as gearmand, the Job Server starts and gets attached to your Shell Process. For ex: if you run php from shell the php runs and starts waiting for your commands right? Same way. If you want to run Gearmand as a background process, then you should run with the param as -d which makes it run as a daemon

So gearmand -d makes it run as Daemon. Not a restart command.

Hope this helps to answer your question and also to clarify in case if you have any confusion over the naming.