Page 1 of 3 123 LastLast
Results 1 to 25 of 57

Thread: F@H under Linux guide

  1. #1
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    How to setup the Linux F@H client as an rc to run at boot time. I'll try to make this a guide that requires no Linux knowledge.

    Get the Linux client. I'm assuming you're using FAH3Console-Linux.exe and that you've managed to put a good copy of FAH3Console-Linux.exe in the /tmp directory.

    Login to a command prompt on your Linux box, as user root.

    Execute the following commands (in <b>bold</b> from that command prompt:

    <b>mkdir /home/fah
    mv /tmp/FAH3Console-Linux.exe /home/fah
    chown -R root:root /home/fah
    chmod +x /home/fah/FAH3Console-Linux.exe</b>

    The first run of FAH3Console-Linux.exe must be made from the command prompt, to setup the folding group, etc. To do this, at the command prompt type:

    <b>/home/fah/FAH3Console-Linux.exe (Enter)</b>

    The Linux client acts just like the Windows command prompt client, just answer the questions and let it begin folding. Check to see if it's doing "the right thing" the same as for the windows command prompt client. It's working correctly? Good, now Control-C the running client to stop it.

    Now, we need to create the file /etc/rc.d/init.d/fah with the following lines in it. This is the "batch" file that will start up your client when Linux boots.

    Copy the italics text of the text file below, and paste it into notepad. Modify the file if you changed any of my default assumptions.

    Highlight and copy the entire modified text of the notepad window, then login to your Linux box as user root.

    From the Linux command prompt:

    1. Key in

    <b>vi /etc/rc.d/init.d/fah (Enter)</b>

    2. Key in

    <b>i</b> (Do NOT press Enter)

    3. Paste the text you copied from the notepad window

    4. Key in

    <b>Esc</b> (The Escape key, do NOT press Enter)

    5. Key in

    <b>:wq</b> (do not press Enter).

    You should now be back at the Linux command prompt.

    This is the text to be pasted (in italics):
    -------------------------------------------
    <i>#!/bin/sh
    #
    # Startup script for Folding @ Home
    #
    # chkconfig: 2345 90 01
    # description: F@H Linux client
    # Source function library.
    . /etc/rc.d/init.d/functions

    # Source networking configuration.
    . /etc/sysconfig/network

    # Check that networking is up.
    [ ${NETWORKING} = "no" ] && exit 0

    RETVAL=0

    # See how we were called.
    case "$1" in
    start)
    echo -n "Starting f@h: "
    daemon <b>/home/fah/startfah.sh</b>
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/fah
    ;;
    stop)
    echo -n "Shutting down f@h: "
    killproc <b>FAH3Console-Linux.exe</b>
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && rm -f /var/lock/fah
    ;;
    *)
    echo "Usage: fah {start|stop}"
    exit 1
    esac

    exit $RETVAL</i>
    ------------------------
    End of text to be pasted

    You've finished creating the "batch" file necessary to start F@H on boot.

    Permissions on /etc/rc.d/init.d/fah should be -rwxr-xr-x, owner root and group root. To do this, from the command prompt key in:

    <b>chown root:root /etc/rc.d/init.d/fah
    chmod +x /etc/rc.d/init.d/fah</b>

    We need to tell Linux to run this at boot, and set it up to do so. Key in:

    <b>chkconfig --add fah</b>

    to setup the appropriate run-level links.

    The Linux F@H client doesn't run in the background by default (doesn't run as a daemon, or "service" in Windows terminology). So, we need to create a wrapper that makes the client behave as a deamon.

    Copy this text into a notepad window, then highlight it, copy it and follow the directions below:

    This is the text to be pasted (in italics):
    -------------------------------------------
    <i>#!/bin/sh
    cd /home/fah
    /home/fah/FAH3Console-Linux.exe -forceasm -advmethods >/dev/null 2>&1 &
    exit 0</i>
    ------------------------
    End of text to be pasted

    From the Linux command prompt:

    1. Key in

    <b>vi /home/fah/startfah.sh (Enter)</b>

    2. Key in

    <b>i</b> (Do NOT press Enter)

    3. Paste the text you copied from the notepad window

    4. Key in

    <b>Esc</b> (The Escape key, do NOT press Enter)

    5. Key in

    <b>:wq</b> (do not press Enter).

    You should now be back at the Linux command prompt.

    Make startfah.sh owned by root and executable:

    <b>chown root:root /home/fah/startfah.sh
    chmod +x /home/fah/startfah.sh</b>

    Finally, start up the client like this:

    <b>service fah start</b>

    I'd try a planned reboot to see if this all works as desired. If it is working properly, the Linux box should boot up and you can see if the F@H client is running by running:

    <b>ps -ef | grep FahCore (Enter)</b>
    Last edited by sjohnson; 02-14-2003 at 04:24 AM.

  2. #2
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    Ok, all seems to work good with that. I have yet to reboot, but it's late, and I'm just glad it's folding again.
    The only thing you stated that I had a problem with was :wq. It did nothing for me, so i just hit ESC, closed the terminal, opened another one and continued with the directions.

  3. #3
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    One other thing. When I reboot, I don't know if it's working or not.
    Service fah start gives me "unrecognized service"

    The only way around it that I k know of is to reinstall.

  4. #4
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    If "service fah start" says "unrecognized service" the install has gone bad. That failure of being to use ":wq" is also disturbing, I can only guess that you or the system missed a step somewhere.

    In our PM's you mentioned to me that you installed f@h off the root (/) directory. If so, your best plan would be to reinstall. If that's impossible, I could modify the instructions to take the "/" install into account and PM them to you. Off to work now
    The plural of "anecdote" is not "data."

  5. #5
    Banned
    Join Date
    Oct 2002
    Posts
    823
    thisll work with redhat right? Ive got some werk to do on a linux box...

  6. #6
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    Well, it didn't work on 7.2 and dosen't on 8.0 either. It never did.
    But if I reinstall it will work perfectly. (had a power failure apparently )

    Oh on the :wq thing. If I hit enter after I type it, it works. Closes the [I] and goes back to normal konsole, but hitting the esc key has the same effect. It's changes modes between (I'm guessing at this part) an editing mode and regular konsole.

    I don't think there will be a problem with reinstalling. I'll try it tonight and get back with you.

    I may go back to RH 7.2 as well, I don't really dig 8.0 all that much.

    BTW, many thanks for all you help.



    shray, Yes it will work with red hat.

  7. #7
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Quicky, on lunch break. Works fine on my 7.2 box. Will be back later tonight. Hopefully we can work the kinks out of my guide or ??, get it work right anyways...
    The plural of "anecdote" is not "data."

  8. #8
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    Ehh.. I dunno what all screwed up when it lost power, but It's not letting me install it. I'm going back to 7.2. I'll post when I get it going again.

  9. #9
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Good luck! I'm going to be building a replacement for my Pent MX200 router in a few weeks, I'll be giving it another look-see then as well.
    The plural of "anecdote" is not "data."

  10. #10
    Banned
    Join Date
    Oct 2002
    Posts
    823
    i just tried it....

    does this mean its working?
    [root@localhost fah]# ps -ef | grep FahCore
    root 1370 1367 99 17:17 pts/0 00:00:06 ./FahCore_65.exe -dir work/ -suf
    root 1374 1314 0 17:17 pts/0 00:00:00 grep FahCore
    [root@localhost fah]#

  11. #11
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Looks good to go, shray!
    The plural of "anecdote" is not "data."

  12. #12
    Banned
    Join Date
    Oct 2002
    Posts
    823
    thanks.. very nice guide. Good its sticky..
    but
    vi /etc/rc.d/init.d/startfah.sh (Enter)

    is not the place you should vi. it should be in the fah folder.
    since you're
    chown root:root /home/fah/startfah.sh
    chmod +x /home/fah/startfah.sh
    over there.

  13. #13
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Thank you, shray. Mistake noted and edited in the guide.
    The plural of "anecdote" is not "data."

  14. #14
    Banned
    Join Date
    Oct 2002
    Posts
    823
    Hey now how do i change flaggies.. I need -forceasm and -advmethods.

  15. #15
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Find this in the guide:

    This is the text to be pasted (in italics):
    -------------------------------------------
    #!/bin/sh
    cd /home/fah
    /home/fah/FAH3Console-Linux.exe >/dev/null 2>&1 &
    exit 0
    ------------------------


    and change it to this:

    This is the text to be pasted (in italics):
    -------------------------------------------
    #!/bin/sh
    cd /home/fah
    /home/fah/FAH3Console-Linux.exe -forceasm -advmethods >/dev/null 2>&1 &
    exit 0
    ------------------------


    Then restart the client or reboot to restart it.

    I can change the guide if this should be the default.

  16. #16
    Banned
    Join Date
    Oct 2002
    Posts
    823
    cool! Edit it in! ITs better any way than plan old folding..

  17. #17
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Umh, I'm unfamiliar with that setting, will let Smizack make the call on whether or not that gets edited in.
    The plural of "anecdote" is not "data."

  18. #18
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    Originally posted by sjohnson
    Umh, I'm unfamiliar with that setting, will let Smizack make the call on whether or not that gets edited in.
    I need hardass to inform me on this one first.

  19. #19
    Hardass
    Guest
    Those 2 flags are public knowledge and good to be published. But only those 2 in public forum.

  20. #20
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Thanks, gents. The guide is edited to include the flags.
    The plural of "anecdote" is not "data."

  21. #21
    Registered User
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    19
    Has anyone tested the new linux version? (B console)
    It can be a figure of my imagination, but I think its really running a whole lot faster than the versions on my windows PCs...
    Nice thread also, very complete and just what I needed
    [size=0.1] [M]adshrimp Folding Squad[/size]

  22. #22
    Banned
    Join Date
    Oct 2002
    Posts
    823
    show us a log

  23. #23
    Registered User
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    19
    # Linux Console Edition B
    Folding@home Client Version 3.24
    http://foldingathome.stanford.edu
    email:help@foldingathome.stanford.edu
    Arguments: -forceasm -advmethods
    ...
    [10:35:35] Writing local files
    [10:35:35] Extra SSE boost OK.
    [10:35:39] Writing local files
    [10:35:39] Completed 0 out of 100000 steps (0%)
    [10:36:59] Writing local files
    [10:36:59] Completed 1000 out of 100000 steps (1%)
    [10:38:21] Writing local files
    [10:38:21] Completed 2000 out of 100000 steps (2%)
    [10:39:39] Writing local files
    [10:39:39] Completed 3000 out of 100000 steps (3%)
    [10:41:01] Writing local files
    [10:41:01] Completed 4000 out of 100000 steps (4%)
    [10:42:15] Writing local files
    [10:42:15] Completed 5000 out of 100000 steps (5%)
    [10:43:30] Writing local files
    [10:43:30] Completed 6000 out of 100000 steps (6%)
    [10:44:47] Writing local files
    [10:44:47] Completed 7000 out of 100000 steps (7%)
    [10:46:03] Writing local files
    [10:46:03] Completed 8000 out of 100000 steps (8%)
    [10:47:21] Writing local files
    [10:47:21] Completed 9000 out of 100000 steps (9%)
    [10:48:37] Writing local files
    [10:48:37] Completed 10000 out of 100000 steps (10%)
    [10:49:57] Writing local files
    [10:49:57] Completed 11000 out of 100000 steps (11%)
    [10:50:17]
    [10:50:17] Folding@home Core Shutdown: INTERRUPTED
    ...
    [10:50:57] (Starting from checkpoint)
    [10:50:57] Protein: p536_BBA5_ext
    [10:50:57]
    [10:50:57] Writing local files
    [10:50:57] Completed 11000 out of 100000 steps (11%)
    [10:50:57] Extra SSE boost OK.
    [10:52:12] Writing local files
    [10:52:12] Completed 12000 out of 100000 steps (12%)
    [10:53:26] Writing local files
    [10:53:26] Completed 13000 out of 100000 steps (13%)
    [10:54:39] Writing local files
    [10:54:39] Completed 14000 out of 100000 steps (14%)
    [10:57:19] Completed 15000 out of 100000 steps (15%)
    [10:58:37] Writing local files
    [10:58:37] Completed 16000 out of 100000 steps (16%)
    [10:59:58] Writing local files
    [10:59:58] Completed 17000 out of 100000 steps (17%)
    [11:01:16] Writing local files
    [11:01:16] Completed 18000 out of 100000 steps (18%)
    [11:02:32] Writing local files
    [11:02:32] Completed 19000 out of 100000 steps (19%)
    [11:03:50] Writing local files
    [11:03:50] Completed 20000 out of 100000 steps (20%)
    [11:05:05] Writing local files
    [11:05:05] Completed 21000 out of 100000 steps (21%)
    [11:06:19] Writing local files
    [11:06:19] Completed 22000 out of 100000 steps (22%)
    [11:07:33] Writing local files
    [11:07:33] Completed 23000 out of 100000 steps (23%)
    [11:08:46] Writing local files
    [11:08:46] Completed 24000 out of 100000 steps (24%)
    [11:10:04] Writing local files
    [11:10:04] Completed 25000 out of 100000 steps (25%)
    [11:11:17] Writing local files
    [11:11:17] Completed 26000 out of 100000 steps (26%)
    [11:12:31] Writing local files
    [11:12:31] Completed 27000 out of 100000 steps (27%)
    [11:13:45] Writing local files
    [11:13:45] Completed 28000 out of 100000 steps (28%)
    [11:14:59] Writing local files
    [11:14:59] Completed 29000 out of 100000 steps (29%)
    [11:16:13] Writing local files
    [11:16:13] Completed 30000 out of 100000 steps (30%)
    [11:17:27] Writing local files
    [11:17:27] Completed 31000 out of 100000 steps (31%)
    [11:18:41] Writing local files
    [11:18:41] Completed 32000 out of 100000 steps (32%)
    [11:19:55] Writing local files
    [11:19:55] Completed 33000 out of 100000 steps (33%)
    [11:21:10] Writing local files
    [11:21:10] Completed 34000 out of 100000 steps (34%)
    [11:22:32] Writing local files
    [11:22:32] Completed 35000 out of 100000 steps (35%)
    [11:23:48] Writing local files
    [11:23:48] Completed 36000 out of 100000 steps (36%)
    [11:25:02] Writing local files
    [11:25:02] Completed 37000 out of 100000 steps (37%)
    [11:26:16] Writing local files
    [11:26:16] Completed 38000 out of 100000 steps (38%)
    [11:27:29] Writing local files
    [11:27:29] Completed 39000 out of 100000 steps (39%)
    [11:28:43] Writing local files
    [11:28:43] Completed 40000 out of 100000 steps (40%)
    [11:29:56] Writing local files
    [11:29:56] Completed 41000 out of 100000 steps (41%)
    [11:31:11] Writing local files
    [11:31:11] Completed 42000 out of 100000 steps (42%)
    [11:32:31] Writing local files
    [11:32:31] Completed 43000 out of 100000 steps (43%)
    [11:33:51] Writing local files
    [11:33:51] Completed 44000 out of 100000 steps (44%)
    [11:35:15] Writing local files
    [11:35:15] Completed 45000 out of 100000 steps (45%)
    [11:36:38] Writing local files
    [11:36:38] Completed 46000 out of 100000 steps (46%)

    P4 2.53, not entirely dedicated, been surfing :$
    Last edited by Magnum_; 05-22-2003 at 02:39 AM.
    [size=0.1] [M]adshrimp Folding Squad[/size]

  24. #24
    Registered User
    Join Date
    Aug 2003
    Posts
    4
    hey
    seen as this is the linux section i think i'll post here
    well anyway i have folding running on my linux gateway!!
    but this causes a problem becuase the internet seems to timeout after about 30 mins has anybody else had this problem?

    Kane

  25. #25
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Kind of the wrong thread, but I'll try to help. Why not start a new thread and give a little more detail - like posting the last 30-40 lines of the FAHlog.txt file plus explaining what you mean by "internet seems to timeout". K?
    The plural of "anecdote" is not "data."

Page 1 of 3 123 LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •