Difference between revisions of "Folding@home"

From ArchWiki
Jump to: navigation, search
(Installing Folding@Home)
(See also: Fix broken links.)
(48 intermediate revisions by 20 users not shown)
Line 1: Line 1:
[[Category:Daemons and system services (English)]]
+
[[Category:Mathematics and science]]
 +
From the project [http://folding.stanford.edu/ home page]:
 +
: ''Help Stanford University scientists studying Alzheimer's, Huntington's, Parkinson's, and many cancers by simply running a piece of software on your computer. The problems we are trying to solve require so many calculations, we ask people to donate their unused computer power to crunch some of the numbers. In just 5 minutes... Add your computer to over 333,684 others around the world to form the world's largest distributed supercomputer.''
  
= What is Folding@Home =
+
== Installation ==
From the [http://aur.archlinux.org/packages.php?do_Details=1&ID=11852&O=0&L=&C=&K=folding&SB=&SO=&PP=&do_MyPackages=&do_Orphans=&SeB= AUR package page] "Folding@Home is a distributed computing project which studies protein folding, misfolding, aggregation, and related diseases."
+
  
Please see the [http://folding.stanford.edu/ Folding@Home site] for a fuller description.
+
Install {{AUR|foldingathome}} from the [[AUR]].
  
= Installing Folding@Home =
+
== Configuration ==
  
Folding@Home is no longer in the community repository due to licensing issues. However, it is still possible to build it from [[AUR]]. If you are familiar with PKGBUILDs and AUR then build it and skip to configuration.
+
Run {{ic|/opt/fah/FAHClient --configure}} as root to generate a configuration file at {{ic|/opt/fah/config.xml}}. (the Arch Linux team number is 45032) Alternately, you can write {{ic|opt/fah/config.xml}} by hand and use {{ic|/opt/fah/sample-config.xml}} as a reference. With a config file in place, you can start the daemon, check it's status, and make the daemon automatically start at boot time.
  
To install manually, first download the tarball at the [http://aur.archlinux.org/packages.php?ID=11852 Folding@Home AUR page]. Open a console and untar the tarball. cd to the resulting directory and:
+
$ cd /opt/fah
 +
# ./FAHClient --configure
 +
# systemctl start foldingathome
 +
$ systemctl status foldingathome
 +
# systemctl enable foldingathome
  
makepkg
+
=== The graphical way ===
  
and if there are no errors you will be left with a package called foldingathome-version-number.pkg.tar.gz.
+
You can manage the daemon by opening a web browser and heading to http://localhost:7396/. Alternately, you can install {{AUR|fahcontrol}} and use the FAHControl program.
  
Run
+
The daemon can also be controlled remotely. Instructions for doing so are listed in {{ic|/opt/fah/sample-config.xml}}. Remember to open firewall ports if necessary.
sudo pacman -U foldingathome-version-number.pkg.tar.gz
+
being sure to replace version-number first ;)
+
  
If all went well, Folding@Home should now be installed.
+
=== The terminal way ===
  
= Configuration =
+
To see the current progress of foldingathome, simply {{ic|$ tail /opt/fah/log.txt}}.
  
Firstly, you will want to open your /etc/conf.d/foldingathome config file, with your editor of choice.
+
The behaviour of foldingathome can be customized by editing {{ic|/opt/fah/config.xml}}. Some options that can be specified:
  
sudo nano /etc/conf.d/foldingathome
+
* bigpackets, defines whether you will accept memory intensive work loads. If you have no problem with Folding@home using up more of your RAM, then set this to big. Other settings are normal and small.
 +
* passkey, to uniquely identify you. Though not needed, it provides some measure of security. For details, see [http://folding.stanford.edu/English/FAQ-passkey]
 +
<passkey v='passkey'/>
 +
* Slots for CPU or GPU
 +
<slot id='0' type='CPU'/>
  
The config is self explanatory, if you wish to have Folding@Home run as a user other than root (handy on single user systems, probably more secure on multi-user systems), or in a different group, then change these values.
+
== Multi-Core CPUs and Folding@home ==
  
Now run the Folding@Home process for the first time with
+
As of version 7.x, multi-core CPUs no longer require any special configuration. If you are using version 6.x, read on.
  
sudo /etc/rc.d/foldingathome start
+
=== A quick note on hyperthreading ===
  
give it a few seconds and then run
+
{{Accuracy|"Hyperthreading is usually enabled in the BIOS by default, and we recommend that it stays enabled, as the SMP cores can use it to process Work Units faster." [http://folding.stanford.edu/English/FAQ-SMP#ntoc6]}}
  
sudo /etc/rc.d/foldingathome stop
+
If you have a single-core hyperthreading CPU, you may be tempted to follow the multi-core instructions. It is highly recommenced that you do '''not''' do this as the Folding@home team prefers fewer results quickly, than more results slowly. There is also a time-limit on work-units, so if it runs slower, your work-units may not be returned in time, and so distributed to another user. If you have one core, run one folding process.
  
You will find under your /opt/fah/ directory, either new files or a new folder, if you set the user variable in /etc/conf.d/foldingathome. You will find a file called client.cfg, either in the /opt/fah dir or the /opt/fah/FAH_USER folder.
+
=== Multiple Folding@home installs ===
  
sudo nano /opt/fah/client.cfg
+
Multiple installations of FAH on a single machine are useless, as in v7, you can use slots for every workload. The software is uniform now for GPU and CPU.
or
+
nano /opt/fah/FAH_USER/client.cfg  # Replace FAH_USER first
+
  
 +
== Monitoring work-unit progress ==
  
The most important settings here are:
+
There are several ways of monitoring the progress of your FAH clients, both on the command line and by GUI.
  
 +
The FAHControl software distributed by folding at home provides you with efficient means to control remote hosts.
 +
Just add another client with the corresponding button "Add" and enter the name, ip address, port and password (if you set one) and hit save. The software should now try to establish
 +
a connection to the remote host and show you the progress in a seperate client tab.
  
*username, username associated to the work-units you return (not related to the FAH_USER variable in /etc/conf.d/foldingathome).
+
In AUR there is {{AUR|fahmon}}, which provides a GUI with the ability to watch multiple clients and get info on the work-unit itself. Fahmon has a dedicated site at [http://www.fahmon.net/ http://www.fahmon.net/]
  
*team, the team number you wish to contribute points to (earned for work units returned), you will of course want to fill in 45032, the arch-linux team number ;)
+
On the CLI, you can add a command to your shell configuration file (e.g: ''.bashrc'' or ''.zshrc''). Replace ''fah_user'' with the actual user first.
  
*bigpackets, defines whether you will accept memory intensive work loads. If you have no problem with Folding@Home using up more of your RAM, then set this to yes (at least 512MB of RAM recommended).
+
{{bc|
 
+
fahstat() {
*machineid, covered in the Multi-Core section.
+
        echo
 
+
        echo $(date)
 
+
        echo
After editing that, run
+
        cat /opt/fah/''fah_user''/unitinfo.txt
 
+
}
sudo /etc/rc.d/foldingathome start
+
}}
 
+
again, to start Folding@Home up.
+
 
+
 
+
Assuming it all ran correctly, you'll want to put it in /etc/rc.conf to run on startup, so
+
 
+
sudo nano /etc/rc.conf
+
 
+
and add @foldingathome to your DAEMONS variable (the @ causes it to start in the background, so as not to slow startup, see [[Daemons]]).
+
<br>Remember, this is @foldingathome-smp for the SMP client!
+
 
+
 
+
Folding@Home is now installed and running!
+
 
+
 
+
= Multi-Core Cpu's and Folding@Home =
+
 
+
== A Quick Note On Hyperthreading ==
+
If you have a single-core hyperthreading CPU, you may be tempted to follow the multi-core instructions. It's highly recommenced that you '''''don't''''' do this as the Folding@Home team prefers fewer results quickly, than more results slowly. There's also a time-limit on work-units, so if it runs slower, your work-units may not be returned in time, and so distributed to another user. If you have one core, run one folding process.
+
 
+
== Multiple  Folding@Home Installs ==
+
=== Setting up Multiple Folding@Home installs ===
+
It's very simple to set up an extra install, although after each (rare) upgrade of the Folding@Home package, you will have to perform some maintenance, unless you wish to build separate packages with custom PKGBUILDS / scripts (beyond the scope of this tutorial). This method ''should'' also scale to however many cores/processors you have.
+
 
+
First, stop Folding@Home if it's running
+
 
+
sudo /etc/rc.d/foldingathome stop
+
 
+
next
+
 
+
sudo cp -r /opt/fah /opt/fah2
+
 
+
If you wish to call it something different, then by all means do. This tutorial will assume you're using /opt/fah2 for your second install and that you have the FAH_USER directory.
+
 
+
Now
+
 
+
rm -rf /opt/fah2/FAH_USER/work  /opt/fah2/FAH_USER/queue.dat
+
 
+
 
+
if they exist, this way the new process won't start working on the same work-unit as the original thread.
+
 
+
You now have to open up the config for the new process
+
 
+
nano /opt/fah2/FAH_USER/client.cfg
+
 
+
and change the '''machineid''' to a number different to the one in /opt/fah/client.cfg.
+
 
+
If you're using the bigpackets option in client.cfg, you should only have it set to yes for '''one''' of your Folding@Home processes as it can overwhelm your system unless you have plenty of free RAM (1GB at least).
+
 
+
=== Editing Init Scripts ===
+
Now comes the fun part. A second init script needs to be created and a little editing needs to be done, but this way you can turn each process on and off as wanted and it's simpler than one script managing both.
+
 
+
 
+
First, some initial editing has to be done to the current script and saved under another name
+
 
+
sudo nano /etc/rc.d/foldingathome
+
 
+
 
+
After
+
 
+
. /etc/rc.conf
+
. /etc/rc.d/functions
+
. /etc/conf.d/foldingathome
+
 
+
Add
+
 
+
FAH_VER=504
+
 
+
 
+
This is to cut down on later maintenance.
+
 
+
 
+
Next, change
+
 
+
PID=`pidof -o %PPID /opt/fah/FAH504-Linux.exe`
+
 
+
to
+
 
+
PID=`pgrep -f /opt/fah/FAH${FAH_VER}-Linux.exe -u $FAH_USER`
+
 
+
The reason for this is that pidof detects the first and second Folding@Home process as the same and so stopping one init script will kill both processes. On the other hand, pgrep will find the process' associated filename/location. The "-u $FAH_USER" part is tacked on as a precaution, in case you are doing something strange with Folding@Home threads and users. You'll also notice the FAH_VER has slipped in there.
+
 
+
There should be two more instances of /opt/fah/FAH504-Linux.exe, change them to
+
 
+
/opt/fah/FAH${FAH_VER}-Linux.exe
+
 
+
 
+
Next, find the lines
+
add_daemon foldingathome
+
rm_daemon foldingathome
+
 
+
and change them to something like
+
add_daemon foldingathome1
+
rm_daemon foldingathome1
+
+
+
You can also change the
+
 
+
stat_busy "Starting Folding@Home"
+
+
stat_busy "Stopping Folding@Home"
+
 
+
lines to have some extra description such as "on Core 1" if you need to.
+
+
+
Now save the file as /etc/rc.d/foldingathome1 , this is to prevent it being over-written by a package upgrade.
+
 
+
 
+
Make a copy of the script
+
 
+
sudo cp /etc/rc.d/foldingathome1 /etc/rc.d/foldingathome2
+
 
+
Now you have to find and replace instances of /opt/fah with /opt/fah2 in this script, double checking you aren't getting any false positives (there shouldn't be any, but scripts change). Make sure you get the one in the PID variable, otherwise the whole pgrep bit was a bit pointless ;)
+
 
+
Also, find the lines
+
add_daemon foldingathome1
+
rm_daemon foldingathome1
+
 
+
again, and change them to something like
+
add_daemon foldingathome2
+
rm_daemon foldingathome2
+
 
+
Now, save this script and open up /etc/rc.conf and add @foldingathome1 and @foldingathome2 to the DAEMONS variable. Start up the two processes
+
 
+
sudo /etc/rc.d/foldingathome1 start
+
sudo /etc/rc.d/foldingathome2 start
+
 
+
and if all goes well, you've got 2 Folding@Home processes running!
+
 
+
=== Maintenance ===
+
 
+
When upgrading the Folding@Home package, it's recommended you stop both Folding@Home init-scripts first
+
 
+
sudo /etc/rc.d/foldingathome1 stop
+
sudo /etc/rc.d/foldingathome2 stop
+
 
+
On upgrading, /opt/fah/FAH504-Linux.exe will be replaced with a new version, this needs to be copied into your /opt/fah2 directory and the old executable deleted.
+
 
+
You then just have to change the FAH_VER variable in ''both scripts'' to reflect the new version number. You can then restart both scripts with
+
 
+
sudo /etc/rc.d/foldingathome1 start
+
sudo /etc/rc.d/foldingathome2 start
+
 
+
It may also be worth checking that there have been no other significant changes to the updated original script.
+
 
+
=== Alternative: Single Init Script ===
+
 
+
I couldn't get the above method to work with the current (6.02) version of the client. I found an old script on the forums and modified it slightly which works just fine on my system.
+
 
+
#!/bin/bash
+
#/etc/rc.d/foldingathome
+
#
+
# Starts the Folding@Home client in the background
+
+
. /etc/rc.d/functions
+
+
case "$1" in
+
  start)
+
    stat_busy "Starting Folding@Home"
+
    cd /opt/fah/
+
    /opt/fah/fah6 > /opt/fah/myfah.log &
+
    cd /opt/fah2/
+
    /opt/fah2/fah6 > /opt/fah2/myfah.log &
+
    stat_done
+
    ;;
+
  stop)
+
    stat_busy "Stopping Folding@Home"
+
    killall fah6
+
    stat_done
+
    ;;
+
  restart)
+
    stop
+
    start
+
    ;;
+
  *)
+
    echo $"Usage: $0 {start|stop|restart}"
+
    RETVAL=1
+
+
esac
+
exit 0
+
 
+
Just make sure you don't forget to follow the first section under "Setting up Multiple Folding@Home installs".
+
 
+
== Folding@Home SMP Support ==
+
 
+
=== About ===
+
There is now a Folding@Home client available for 64-bit multi-processor or multi-core computers (aka SMP). The creators of Folding@Home suggest the SMP client runs best on quad core machines but many people run it on dual cores with no trouble. This client is definitely NOT recommended for single-core CPUs with Hyperthreading. So, if your machine meets the requirements (Arch 64-bit, true multi-core/processor) you may want to give the SMP client a try instead of running two of the standard client!
+
+
+
Setup is identical to that of the standard client EXCEPT for the following:
+
 
+
* the name of the package in the [http://aur.archlinux.org/packages.php?do_Details=1&ID=11964&O=0&L=&C=&K=folding&SB=&SO=&PP=&do_MyPackages=&do_Orphans=&SeB= AUR is foldingathome-smp]
+
* lib32-glibc is required to install and run the client (this is reflected as a dependency in the PKGBUILD)
+
* the package installs to /opt/fah-smp
+
* the configuration script in /etc/conf.d is foldingathome-smp
+
* the daemon that should be added to /etc/rc.conf is foldingathome-smp
+
 
+
 
+
=== Migrating ===
+
 
+
When migrating from the standard FAH client/s to SMP, you may wish to finish off the work units currently running but without the FAH client downloading new ones. This is possible through the init-scripts as long as you make sure to check the status of the current work-unit before shutting down / rebooting.
+
+
This may seem a bit over the top and whether you do it depends on how committed you are to returning all work-units sent to your box. At the worst, your work-unit will be distributed to someone else after the cut-off date.
+
+
+
To do this, stop the folding client/s
+
sudo /etc/rc.d/foldingathome1 stop
+
sudo /etc/rc.d/foldingathome2 stop
+
+
open up your /etc/rc.d/foldingathome file/s and change
+
+
su $FAH_USER -c "/opt/fah/FAH504-Linux.exe -verbosity 9 > /opt/fah/$FAH_USER/myfah.log" &
+
 
+
to
+
 
+
su $FAH_USER -c "/opt/fah/FAH504-Linux.exe -oneunit -verbosity 9 > /opt/fah/$FAH_USER/myfah.log" &
+
 
+
+
+
This will force the FAH client to only finish its current work-unit and upload it without downloading a new one. The problem arises in that if you reboot (or restart the init-scripts) after it's finished and sent back the work-unit, it will download a new one to finish and send back. You will just have to monitor the status of the work-unit before you restart, and if it's at 100% and the end of /opt/fah/FAH_USER/FAHlog.txt says the work-unit has been returned, you can remove that script from the DAEMONS= line in /etc/rc.conf.
+
 
+
 
+
If you know how, you can probably find a way of stopping it from doing this, maybe with a check in the init-script which stops it running when the work-unit file is no longer in the /opt/fah/FAH_USER/work directory.
+
+
+
If you're currently on i686 arch, you will also need to migrate to X86_64 arc, and it would be a good idea to read the [[Arch64_FAQ]]
+
 
+
=== Troubleshooting ===
+
 
+
==== Can't find ./mpiexec ====
+
 
+
If you are using the $FAH_USER variable, you will find on starting the smp client that it can't find ./mpiexec , this is because it's in the /opt/fah-smp/ directory and not your local one. Copy it to /opt/fah-smp/$FAH_USER and it should run fine.
+
+
+
==== SMP client not doing any work / stalling ( NNODES=4 ) ====
+
 
+
( This is adapted from the [http://folding.stanford.edu/English/FAQ-SMP folding@home SMP FAQ] )
+
 
+
If you run
+
sudo /etc/rc.d/foldingathome-smp start
+
 
+
from the console, you will get some output. If this output stalls with a
+
NNODES=4
+
line and top/htop shows the smp-client running but with no CPU usage, you will need to check your local network settings. Check that your /etc/hosts file is set up with 127.0.0.1 linked to the hostname you set up in /etc/rc.conf.
+
 
+
= Monitoring Work-Unit Progress =
+
There are several ways of monitoring the progress of your FAH client/s, both on the command line and by GUI.
+
 
+
In AUR there is silent blades [http://aur.archlinux.org/packages.php?do_Details=1&ID=7788&O=0&L=&C=&K=folding&SB=&SO=&PP=&do_MyPackages=&do_Orphans=&SeB= fahmon], which provides a GUI with the ability to watch multiple clients and get info on the work-unit itself. Fahmon has a dedicated site at [http://www.fahmon.net/ http://www.fahmon.net/]
+
 
+
On the CLI, you can add a command to your .bashrc , .zshrc or .whateverrc :
+
 
+
fahstat() {
+
echo
+
echo `date`
+
echo
+
cat /opt/fah/FAH_USER/unitinfo.txt   #(replacing FAH_USER first)
+
}
+
  
 
Or for multiple clients :
 
Or for multiple clients :
  
 +
{{bc|
 
  fahstat() {
 
  fahstat() {
 
         echo
 
         echo
         echo `date`
+
         echo $(date)
 
         echo
 
         echo
         echo "Core 1:";cat /opt/fah/FAH_USER/unitinfo.txt     #(replace FAH_USER first)
+
         echo "Core 1:";cat /opt/fah/''fah_user''/unitinfo.txt
 
         echo
 
         echo
         echo "Core 2:";cat /opt/fah2/FAH_USER/unitinfo.txt     #(replace FAH_USER first)
+
         echo "Core 2:";cat /opt/fah2/''fah_user''/unitinfo.txt
 
  }
 
  }
 +
}}
 +
 +
Also, replacing {{ic|cat}} with {{ic|tail -n1}} will give just the percentage of work unit complete.
  
Also, replacing cat with tail -n1 will give just the percentage of work unit complete.
+
On foldingathome-smp 6.43, the ''unitinfo.txt'' file is not placed inside the user folder. The correct directory would be {{ic|/opt/fah-smp/unitinfo.txt}}.
  
 +
== See also ==
  
= More Resources =
+
* Folding@home [http://folding.stanford.edu/ site]
[http://folding.stanford.edu/ Folding@Home Site]
+
* Folding@home [http://folding.stanford.edu/home/faq/ FAQ]
+
* Folding@home [http://folding.stanford.edu/home/guide/configuration-guide/ Configuration Guide]
[http://folding.stanford.edu/English/FAQ Folding@Home FAQ]
+
* Folding@home [http://folding.stanford.edu/home/faq/faq-smp SMP Client FAQ]
+
* Arch Folding@home [http://fah-web.stanford.edu/cgi-bin/main.py?qtype=teampage&teamnum=45032 team page]
[http://folding.stanford.edu/English/FAQ-Configure Folding@Home Configuration FAQ]
+
* Extended Arch team statistics in [http://folding.extremeoverclocking.com/team_summary.php?s=&t=45032 extremeoverclocking.com]
+
+
+
[http://aur.archlinux.org/packages.php?do_Details=1&ID=11964&O=0&L=&C=&K=foldingathome&SB=&SO=&PP=&do_MyPackages=&do_Orphans=&SeB= Folding@Home SMP Client on AUR]
+
+
[http://folding.stanford.edu/English/FAQ-SMP Folding@Home SMP Client FAQ]
+
+
+
+
[http://vspx27.stanford.edu/cgi-bin/main.py?qtype=teampage&teamnum=45032 Arch Folding@Home team page]
+
+
[http://folding.extremeoverclocking.com/team_summary.php?s=&t=45032 Extended Arch team statistics on extremeoverclocking.com]
+

Revision as of 00:01, 27 November 2013

From the project home page:

Help Stanford University scientists studying Alzheimer's, Huntington's, Parkinson's, and many cancers by simply running a piece of software on your computer. The problems we are trying to solve require so many calculations, we ask people to donate their unused computer power to crunch some of the numbers. In just 5 minutes... Add your computer to over 333,684 others around the world to form the world's largest distributed supercomputer.

Installation

Install foldingathomeAUR from the AUR.

Configuration

Run /opt/fah/FAHClient --configure as root to generate a configuration file at /opt/fah/config.xml. (the Arch Linux team number is 45032) Alternately, you can write opt/fah/config.xml by hand and use /opt/fah/sample-config.xml as a reference. With a config file in place, you can start the daemon, check it's status, and make the daemon automatically start at boot time.

$ cd /opt/fah
# ./FAHClient --configure
# systemctl start foldingathome
$ systemctl status foldingathome
# systemctl enable foldingathome

The graphical way

You can manage the daemon by opening a web browser and heading to http://localhost:7396/. Alternately, you can install fahcontrolAUR and use the FAHControl program.

The daemon can also be controlled remotely. Instructions for doing so are listed in /opt/fah/sample-config.xml. Remember to open firewall ports if necessary.

The terminal way

To see the current progress of foldingathome, simply $ tail /opt/fah/log.txt.

The behaviour of foldingathome can be customized by editing /opt/fah/config.xml. Some options that can be specified:

  • bigpackets, defines whether you will accept memory intensive work loads. If you have no problem with Folding@home using up more of your RAM, then set this to big. Other settings are normal and small.
  • passkey, to uniquely identify you. Though not needed, it provides some measure of security. For details, see [1]
<passkey v='passkey'/>
  • Slots for CPU or GPU
<slot id='0' type='CPU'/>

Multi-Core CPUs and Folding@home

As of version 7.x, multi-core CPUs no longer require any special configuration. If you are using version 6.x, read on.

A quick note on hyperthreading

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: "Hyperthreading is usually enabled in the BIOS by default, and we recommend that it stays enabled, as the SMP cores can use it to process Work Units faster." [2] (Discuss in Talk:Folding@home#)

If you have a single-core hyperthreading CPU, you may be tempted to follow the multi-core instructions. It is highly recommenced that you do not do this as the Folding@home team prefers fewer results quickly, than more results slowly. There is also a time-limit on work-units, so if it runs slower, your work-units may not be returned in time, and so distributed to another user. If you have one core, run one folding process.

Multiple Folding@home installs

Multiple installations of FAH on a single machine are useless, as in v7, you can use slots for every workload. The software is uniform now for GPU and CPU.

Monitoring work-unit progress

There are several ways of monitoring the progress of your FAH clients, both on the command line and by GUI.

The FAHControl software distributed by folding at home provides you with efficient means to control remote hosts. Just add another client with the corresponding button "Add" and enter the name, ip address, port and password (if you set one) and hit save. The software should now try to establish a connection to the remote host and show you the progress in a seperate client tab.

In AUR there is fahmonAUR, which provides a GUI with the ability to watch multiple clients and get info on the work-unit itself. Fahmon has a dedicated site at http://www.fahmon.net/

On the CLI, you can add a command to your shell configuration file (e.g: .bashrc or .zshrc). Replace fah_user with the actual user first.

fahstat() {
        echo
        echo $(date)
        echo
        cat /opt/fah/fah_user/unitinfo.txt
}

Or for multiple clients :

 fahstat() {
         echo
         echo $(date)
         echo
         echo "Core 1:";cat /opt/fah/fah_user/unitinfo.txt
         echo
         echo "Core 2:";cat /opt/fah2/fah_user/unitinfo.txt
 }

Also, replacing cat with tail -n1 will give just the percentage of work unit complete.

On foldingathome-smp 6.43, the unitinfo.txt file is not placed inside the user folder. The correct directory would be /opt/fah-smp/unitinfo.txt.

See also