• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Running F@H at Startup on Linux

PoW

Limp Gawd
Joined
Mar 12, 2001
Messages
347
I'm having a bit of trouble doing this, I tried a method that I picked up from googling in which I edited my rc.local file with something like this:

cd /root
./FAH502-Linux.exe

I thought that this would simply start folding upon startup like adding something to the startup folder in windows. Much to my dismay my comp started folding immediately upon startup not even pausing at a login prompt or getting close to GNOME. I would like to be able to have F@H run in the background yet still allow me to work on the system and not have to start F@H upon every startup.

Any recommendations are appreciated
 
Here is my rc.local file. I use realVNC to log into my headless linux box to do work, and EM3 uses samba to track the client. If you start it in the background, you can always open a terminal window and use vi to check the log files. Note: I have not updated this client to FAH5 yet, but will soon.
I hope this helps. David


touch /var/lock/subsys/local

# This line will start fah as user david with no output to a terminal window
su – david --command=”cd /home/david/FAH3-1; ./FAH4Console-Linux.exe –forceSSE > /dev/null 2>&1 &”

# This line will start realVNC server.
cd /user/local/bin
vncserver

# This line will start samba
cd /bin
smbstart
 
To run fah in the background with no output to the screen your rc.local file should look something like this:

cd /dir/where/fah/is/installed
./FAH502-Linux.exe > /dev/null &

Fah will start in the background, you'll be able to log in to X like normal. You won't know it's running, much like the Windows service. Open a console and run top, you should see Fah using close to 100% cpu time shortly after startup.

If you can't get in to X because the client is running and won't let you log in use something like Putty and ssh into the box. Log in, do a startx and when your in edit the rc.local file. You might want to kill the client then and do a ./rc.local to see if it starts how you want it too, and/or reboot to see that it comes up right.
 
So I gather if I just add this command to my rc.local file I will have no trouble.

cd /root
./FAH502-Linux.exe > /dev/null &

I just want to double check because Ive gotten this comp totally setup the way I want and I dont want to screw it up in a way I cannot recover with my limited linux knowledge :confused:

Thanks!
 
Yep.

That will cause it to send it's output to /dev/null, not to the screen. It'll run in the background but you won't know it's there unless you check your running services. You can always check the client.cfg file too if you want to see it's progress and/or verify that it's running.
 
PoW said:
So I gather if I just add this command to my rc.local file I will have no trouble.

cd /root
./FAH502-Linux.exe > /dev/null &

I just want to double check because Ive gotten this comp totally setup the way I want and I dont want to screw it up in a way I cannot recover with my limited linux knowledge :confused:

Thanks!

Just make sure that you have client version 5.02, otherwise adjust accordingly. Whatever your client name is should come after the ./ and before the >, with no spaces between it and ./ and one space before >
 
excellent thanks guys i tried it out a few seconds ago and it works perfectly
 
Here's Gentoo's init script:



Code:
start() {
        ebegin "Starting Folding@Home"
        for (($CPU; CPU != 0; CPU--))
        do
                cd /opt/foldingathome/client${CPU}/
                nice -n 20 su foldingathome -c "/opt/foldingathome/client${CPU}/foldingathome ${FOLD_OPTS}" &
        done
        eend $?
}

stop() {
        ebegin "Stopping Folding@Home"
        for I in FahCore*.exe
        do
                killall -q $I >/dev/null
        done
        killall foldingathome >/dev/null
        eend $?
}

Relevant conf settings:

Code:
# Config file for /etc/init.d/foldingathome

# Enter options here to be passed to the Folding client:
#
#  -oneunit     Instruct the client to quit following the completion of one work unit.
#  -verbosity x Sets the output level, from 1 to 9 (max). The default is 3
#  -pause       Pause after finishing & trying to send current unit
#  -forceasm    Force core assembly optimizations to be used if available
#  -forceSSE    On machines with an AMD processor, Core_78 gives priority to 3DNow over
#               SSE -- this overrides that.
#  -advmethods  Request to be assigned any new Cores or work units.
#
# A full listing of options can be found here:
# [url]http://www.stanford.edu/group/pandegroup/folding/console-userguide.html[/url]
# But use of other options are not recommended when using the Folding client
# as a service.
#
FOLD_OPTS="-advmethods"

# Number of clients to run
#
# Folding@Home isn't multithreaded, so if you're running multiple CPU's
# you will need to run a client to run for each of your CPU's in order
# to achieve the best performance for Folding@Home. Up to a maximum of 8.
# Ex. A dual CPU system would use CPU=2
#
CPU=1

/me gets an idea for a bootable Gentoo LiveCD with F@H...
 
Back
Top