Well i had a play around when my linux SMP finished a WU, i found if you issue the command
to the actual folding process (as per previous example)
9978 ? Tl 0:00 ./fah6 -smp -verbosity 9
9982 ? S 0:00 sh -c ./FahCore_a3.exe -dir work/ -nice 19 -suffix 03
9983 ? SNl 62:11 ./FahCore_a3.exe -dir work/ -nice 19 -suffix 03 -np 4
issue the command to 9983, it closes it just as it would if you used Control+C. No worries of data corruption or resetting to 0% on the WU now
Heres a little write up which i think will help those getting into Linux (being a tutorial thread
- kill = command to kill a process
- in the format of "kill <signal type> <pid>"
- Stands for Interrupt, which is the same "signal" sent when you use Control+c
- Also can be written in the command as -2 (eg. kill -INT 0001 and kill -2 00001 are the same command and would both kill process 0001 the with an interrupt call)
- Stands for Terminate. This signal is actually called by Control+C also if you watch closely, Control+C will call "Interrupt" to stop the process (in Folding waiting until next step is completed), then immediately calls "SigTerm" to actually close the process
- Can also be written as -15 (eg, kill -SIGTERM 0001 and kill -15 0001 are the same)
- Stands for Kill. Used for process's that have hung/frozen (thus won't respond to other signals). Can also be used just to end a process outright, this is messy though as the process won't run through any shutdown routines (ie for folding, won't have time to wait till next step and save and properly shutdown cores, the whole thing just stops and disappears no matter what its in the middle of, possibly of data corruption by using this in such a fashion)
- Can also be written as -9 (eg, kill -SIGKILL 0001 and kill -9 0001 are the same)
There are many other "Signals" that can be sent (see Here
) but these are the main ones you'll ever use.
Be aware also that the first 2 (-2 and -15) are effectively 'Signaling" a process to close its self in different ways (-2 makes the process finish up what its doing in a nice clean manner, then its self calls -15 to close the process cleanly). If the process has hung or frozen, then it can not respond to signals
, Thats when you use -9, which isn't a "signal" to the process its self, but rather a signal for the "computer" to just make the process disappear.
When stopping Folding @ Home
in any linux. Its best to send the -2 (or -INT) signal to the ./FahCore_**.exe
process which can be found by logging into the user which is folding and running the ps x
Be sure to signal the right FahCore, there are 2, one is listed as ./FahCore_**.exe
with lots of arguments after it, one is listed as sh -c /FahCore_**.exe
also with lots of arguments after it. Don't signal the sh -c
process, signal the other one (it will also be the one with a large number under the "Time"
column) - See the "Code" block at the top of the page for an example
You can also get the pid of the "Folding" process by running the command top
- It will be the process at the top sucking all the CPU cycles
Hope this helps