Results 1 to 14 of 14

Thread: DF and linux problems Part 2

  1. #1
    Junior Member freeiso's Avatar
    Join Date
    Feb 2003
    Location
    Ulysses PA
    Posts
    23

    DF and linux problems Part 2

    hi again its me

    i have a new problem, i want to cron foldit
    what i have so far is this

    if
    ls /fold-fat/distribfold/foldtrajlite.lock >nul
    /fold-fat/distribfold/foldit
    goto end
    else
    :End

    will that work of i put it in
    cron.hourly
    yes i'm using RH

    ty
    Wha you talkin to me

    Distribfold B0xen
    duron 1.3 & duron 800
    total = 2.1 ghz

  2. #2
    Hmmmm--
    Are you wanting to do an hourly check to see if foldit is running?
    if so, couldn't you just issue the ./fold-fat/distribfold/foldit command hourly, or is it going to start multiple instances? If it recognizes the process is already running, it would be simpler.

  3. #3
    Junior Member freeiso's Avatar
    Join Date
    Feb 2003
    Location
    Ulysses PA
    Posts
    23
    i want to check if running and if it is do nothing
    else start foldit
    every hour
    Wha you talkin to me

    Distribfold B0xen
    duron 1.3 & duron 800
    total = 2.1 ghz

  4. #4
    How 'bout this


    #!/bin/bash
    if test -f /fold-fat/distribfold/foldtrajlite.lock
    then
    # file exists, so start foldit.
    /fold-fat/distribfold/foldit

    else
    # file does NOT exist, so do nothing.

    exit
    fi


    Stole that off a website and modified it for your conditions (I hope)

  5. #5
    Junior Member freeiso's Avatar
    Join Date
    Feb 2003
    Location
    Ulysses PA
    Posts
    23
    seems to have worked

    only time will tell

    ty

    now i only need to get my linux box connected to the www and i'm good to go
    Wha you talkin to me

    Distribfold B0xen
    duron 1.3 & duron 800
    total = 2.1 ghz

  6. #6
    Originally posted by freeiso
    seems to have worked

    only time will tell

    ty

    now i only need to get my linux box connected to the www and i'm good to go
    I'm new to DF with Linux, just asking how do you tell if foldit is running ? Cos there are no graphical indication.......

  7. #7
    one way would be to open a terminal and run the "top" command- foldit should be using the bulk of the cpu

  8. #8
    Senior Member
    Join Date
    Sep 2002
    Location
    Meridian, Id
    Posts
    742
    Originally posted by Hua Luo Han
    I'm new to DF with Linux, just asking how do you tell if foldit is running ? Cos there are no graphical indication.......
    Also you can use this
    http://www.free-dc.org/forum/showthr...inux+benchmark

    or this
    http://www.free-dc.org/forum/showthr...ht=linux+dfgui


  9. #9
    Target Butt IronBits's Avatar
    Join Date
    Dec 2001
    Location
    Morrisville, NC
    Posts
    8,619
    open a command shell, cd to where the client is working.
    cat progress.txt ... wait a couple of seconds
    cat progress.txt ... you will see a difference in the output.

  10. #10
    Thanks guys !!! BTW what diff between the gcc and intel compiler version of linux text clent as seen on the df download page ?

  11. #11
    Target Butt IronBits's Avatar
    Join Date
    Dec 2001
    Location
    Morrisville, NC
    Posts
    8,619
    IC is faster than the gcc I believe.

  12. #12
    Senior Member
    Join Date
    Mar 2002
    Location
    MI, U.S.
    Posts
    697
    Originally posted by rshepard, edited a bit by me
    Code:
    #!/bin/bash
    if test -f /fold-fat/distribfold/foldtrajlite.lock 
    then
        # file exists, so start foldit.
        /fold-fat/distribfold/foldit
    fi
    
    # If file does NOT exist, this will do nothing, as long as the script ends here.
    Shouldn't you only be starting the client if foldtrajlite.lock does not exist?

    If so, something like this might be better:

    Code:
    #!/bin/bash
    
    if ! [ -f /fold-fat/distribfold/foldrajlite.lock ] ; then
        cd /fold-fat/distribfold
        ./foldit
    fi
    Couple of other things with this: The foldit script doesn't work unless the current directory is the one that holds the script. With cron, I believe the current directory is your home, but of course I could be wrong. I used [ ... ] as a shorthand for test. The ! negates the test condition. I've also put the then on the same line as the if -- this is another shorthand.

  13. #13
    Shouldn't you only be starting the client if foldtrajlite.lock does not exist?
    You may be correct-- I'm not running the DF client, so I don't know if the lock is associated with a running client or one that has halted. my impression from the original question was that it is the latter...

  14. #14
    This is the title that appears ECL's Avatar
    Join Date
    Apr 2002
    Location
    Nothing to see here, move along...
    Posts
    147
    The lock file is created by the client when it executes and is supposed to prevent another instance from starting. The client will remove the lock file when it shuts down. The lock file can occasionally get left behind if the client is killed abruptly, or if the lock file's permissions get changed (touched by root, for instance).

    In any case, if a lock file exists, you don't want to start the client - check for an existing instance. If there isn't one, you can whack the lock file and start up.

Posting Permissions

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