Does someone know how to start or stop a Daemon?

Message boards : Server programs : Does someone know how to start or stop a Daemon?
Message board moderation

To post messages, you must log in.

AuthorMessage
Huiping Yao

Send message
Joined: 21 Jun 08
Posts: 27
China
Message 18731 - Posted: 22 Jul 2008, 13:06:09 UTC

Hi, everyone

Daemons including feeder,sample_work_generator are started when you run the bin/start script, and killed when you run bin/stop.

Does someone know how to start/stop one Daemon,not all Daemons? Or we could only start/stop all?
ID: 18731 · Report as offensive
Kunsheng Chen

Send message
Joined: 3 Jun 08
Posts: 40
United States
Message 18752 - Posted: 23 Jul 2008, 2:22:30 UTC - in response to Message 18731.  

Hi, everyone

Daemons including feeder,sample_work_generator are started when you run the bin/start script, and killed when you run bin/stop.

Does someone know how to start/stop one Daemon,not all Daemons? Or we could only start/stop all?



I think the best way is to remove the daemon you want to stop from config.xml. ./bin/start will check config.xml first.

ID: 18752 · Report as offensive
Chris Elliott

Send message
Joined: 23 Jul 08
Posts: 4
Message 18754 - Posted: 23 Jul 2008, 2:54:37 UTC

While changing the config.xml file does work, if you want a quick fix you could just run sudo ps -a | grep $DAEMON_NAME and then sudo kill PROCESS_ID. To start a daemon, if it is in the bin folder, then you could, for example, run sudo ./feeder -d 3 from the bin folder.
ID: 18754 · Report as offensive
Profile Ananas

Send message
Joined: 27 Jun 06
Posts: 305
Germany
Message 18844 - Posted: 26 Jul 2008, 1:29:02 UTC

Linux has a command "killall" that handles the ps/grep/kill stuff internally
ID: 18844 · Report as offensive
Huiping Yao

Send message
Joined: 21 Jun 08
Posts: 27
China
Message 18865 - Posted: 27 Jul 2008, 2:13:18 UTC

hi,

I have tested or used kill/killall to kill one deamon. But in a moment, the deamon will automatically restart(using bin/status, the status of the daemon is running).

The command kill or killall is different from bin/stop, because after using bin/stop, the deamon will not restart until you use bin/start.

Could someone tell why the daemon will automatically restart after using kill or killall?
ID: 18865 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 19001 - Posted: 31 Jul 2008, 22:44:54 UTC - in response to Message 18865.  

Could someone tell why the daemon will automatically restart after using kill or killall?

Because it's still enabled in config.xml. Disable it there first.

ID: 19001 · Report as offensive

Message boards : Server programs : Does someone know how to start or stop a Daemon?

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.