change to not run as service

If you're new to FAH and need help getting started or you have very basic questions, start here.

Moderators: Site Moderators, FAHC Science Team

Post Reply
tmillic
Posts: 39
Joined: Wed Sep 17, 2008 4:36 pm
Hardware configuration: AMD3200+ w/ NVIDIA GT220.
Tyan S2912 with 1 Opteron 2347HE.
Via C3.
Location: Fayetteville, Arkansas

change to not run as service

Post by tmillic »

Hello,
I made the mistake of setting folding at home to run as a service during installation. I would just let it finish a work unit completely, then re-install with the correct setting, but the following command isn't working:

Code: Select all

tom@quartet:~$ sudo /etc/init.d/FAHClient start -- finish
Starting fahclient ... FAIL
tom@quartet:~$ 
Is there a way to either get the option to stop at the end of the work unit to work, or to change the options of whether to start as a service or not?
Thanks.
bollix47
Posts: 2957
Joined: Sun Dec 02, 2007 5:04 am
Location: Canada

Re: change to not run as service

Post by bollix47 »

If you have FAHControl installed you can right click on the slot and select Finish.
There is also a max-units config option:

Code: Select all

max-units               <integer=0>             Process at most this number of units, then pause.
To stop the service (i.e. FAHClient) type: sudo /etc/init.d/FAHClient stop

To remove the service type: sudo update-rc.d -f FAHClient remove
7im
Posts: 10179
Joined: Thu Nov 29, 2007 4:30 pm
Hardware configuration: Intel i7-4770K @ 4.5 GHz, 16 GB DDR3-2133 Corsair Vengence (black/red), EVGA GTX 760 @ 1200 MHz, on an Asus Maximus VI Hero MB (black/red), in a blacked out Antec P280 Tower, with a Xigmatek Night Hawk (black) HSF, Seasonic 760w Platinum (black case, sleeves, wires), 4 SilenX 120mm Case fans with silicon fan gaskets and silicon mounts (all black), a 512GB Samsung SSD (black), and a 2TB Black Western Digital HD (silver/black).
Location: Arizona
Contact:

Re: change to not run as service

Post by 7im »

To offer the best alternative, please explain why the service install is not working, and if not starting the client as a service, do you plan to start it manually each time?
How to provide enough information to get helpful support
Tell me and I forget. Teach me and I remember. Involve me and I learn.
tmillic
Posts: 39
Joined: Wed Sep 17, 2008 4:36 pm
Hardware configuration: AMD3200+ w/ NVIDIA GT220.
Tyan S2912 with 1 Opteron 2347HE.
Via C3.
Location: Fayetteville, Arkansas

Re: change to not run as service

Post by tmillic »

The service install does work, but I'd like to have the computer's resources for other things from time to time and would like to be able to let it complete a unit and stop before I intend to use it for other things. I would like to start it manually each time as well, so that it won't start and download a work unit that it won't be able to finish before being given other tasks (by me).
I don't have fahcontrol installed. There is no desktop environment at all installed for a gui program like fahcontrol.
calxalot
Site Moderator
Posts: 1103
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: change to not run as service

Post by calxalot »

You could leave the service install alone, and just set to not start the service at boot:
Create file /etc/default/fahclient with one line:

Code: Select all

ENABLE=false
You can then manually start and stop the service with the usual commands.

If you need to start the service with extra args passed to the client, you need to use '--'. eg

Code: Select all

sudo /etc/init.d/FAHClient start -- --finish
You can also start without options, and use

Code: Select all

FAHClient --send-finish
But it is probably better to just use FAHControl (which you can use remotely).

Edit: you might also want to add pause-on-start true to the client config.xml

Edit2: note that if you use --finish, the client will exit after uploading but the client will immediately respawn and get more work if you don't have pause-on-start. (because service starts client with --daemon)
Last edited by calxalot on Sat Nov 30, 2013 4:26 pm, edited 1 time in total.
tmillic
Posts: 39
Joined: Wed Sep 17, 2008 4:36 pm
Hardware configuration: AMD3200+ w/ NVIDIA GT220.
Tyan S2912 with 1 Opteron 2347HE.
Via C3.
Location: Fayetteville, Arkansas

Re: change to not run as service

Post by tmillic »

Thanks!
It looks like I had that command wrong by not having 2 sets of dashes. (Why 2?)
calxalot
Site Moderator
Posts: 1103
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: change to not run as service

Post by calxalot »

Two dashes is the standard for longopts. The first two dashes mark end of options for the start script, so anything else is passed to the client.
calxalot
Site Moderator
Posts: 1103
Joined: Sat Dec 08, 2007 1:33 am
Location: San Francisco, CA
Contact:

Re: change to not run as service

Post by calxalot »

If you use ENABLE=false, you will need to start the service with

Code: Select all

sudo /etc/init.d/FAHClient force-start
bruce
Posts: 20824
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Re: change to not run as service

Post by bruce »

tmillic wrote: the following command isn't working:

Code: Select all

tom@quartet:~$ sudo /etc/init.d/FAHClient start -- finish
Starting fahclient ... FAIL
tom@quartet:~$ 
I'm not a linux guru so don't shoot me if I' wrong. Shouldn't that be
sudo /etc/init.d/FAHClient start --finish
(no space before finish).

... or maybe
FAHClient --send-command finish
(which doesn't need the sudo).
7im
Posts: 10179
Joined: Thu Nov 29, 2007 4:30 pm
Hardware configuration: Intel i7-4770K @ 4.5 GHz, 16 GB DDR3-2133 Corsair Vengence (black/red), EVGA GTX 760 @ 1200 MHz, on an Asus Maximus VI Hero MB (black/red), in a blacked out Antec P280 Tower, with a Xigmatek Night Hawk (black) HSF, Seasonic 760w Platinum (black case, sleeves, wires), 4 SilenX 120mm Case fans with silicon fan gaskets and silicon mounts (all black), a 512GB Samsung SSD (black), and a 2TB Black Western Digital HD (silver/black).
Location: Arizona
Contact:

Re: change to not run as service

Post by 7im »

Yep.
How to provide enough information to get helpful support
Tell me and I forget. Teach me and I remember. Involve me and I learn.
Post Reply