PDA

View Full Version : Console Background Operation




stromie952
Feb 19, 2003, 09:28 PM
I want to run the folding command line client, but I do not want to have a console window up while it is running, nor do I want to have the Terminal loaded at all.

I want to have the folding client run as a background process instead of in an active terminal window.

I want to help out (with my new 1Ghz iMac and a couple other computers I have access to at my university), but I can't seem to be able to figure this out. This would make it much easier to run it on the other machines and also I would definitely like it on my machine.

Any help would be appreciated.

Thanx



howard
Feb 20, 2003, 12:02 AM
talk to mc68k, pm him or something, he knows how to do that..i don't unfortunatly...are you new to the folding team? if so welcome! by the way i like your sig, homestarrunner is hilarious

Rower_CPU
Feb 20, 2003, 12:23 AM
Are you comfortable with the Terminal?

I can tell you how to do it, if you want to try.

stromie952
Feb 20, 2003, 03:03 AM
I am fairly confident in the Terminal and would be glad to give it a shot if you would be so kind as to help me out with the details.

:-)

Falleron
Feb 20, 2003, 03:58 AM
I would quite like to know as well. Currently, I have a terminal window minimised into my dock.

Rower_CPU
Feb 20, 2003, 12:42 PM
OK, here goes (mc68k can correct me if I'm wrong ;) ):

Open the Terminal and type "crontab -e". This will install a new crontab. Here's a little page that describes what crontabs do : http://kb.indiana.edu/data/afiz.html

You will now be in the vi editor. This sucker is much trickier than pico, so you have to watch your step. Hit "i" to make sure you're in "insert mode", then type the following.
@reboot cd /Your/Path/To/F@H/; ./OSX-3.24 (-local)

All of that should be on one line. Let me explain what it does. It issues the command that whenever your machine reboots it should cd into your F@H directory, then run it. I put the -local switch in paranthesis, because you may or may not be using it. If you are, use it here, otherwise leave it off.

If you make a mistake in typing you won't be able to use the delete key to take out the mistake. You'll have to hit escape, position the cursor, then hit "x" to remove the letter(s). Then hit "i" to return to insert mode. Once you're done and it's correct, hit escape and type ":wq" to save out the crontab. You should get an affirmation that it was installed. Restart your machine to test it out.

Hope this was straightforward enough...

stromie952
Feb 20, 2003, 02:48 PM
I get everything except the -local switch.

What does that do?

I looked in the help for the Folding Command Line client and didn't see it listed among the options it has.

crazzyeddie
Feb 20, 2003, 03:33 PM
I found another way to do this, but it isnt automatic, its nice for on-the-fly if youre going to leave your computer, or want to start/stop F@H.

Open F@H however you usually do.
Type ctrl-z
(It should say process suspended, and you should have a promt.)
Type bg

Now you have a promt again, type top to show your processes. You should see FahCore using processor time, as a percent (usually more than 50% if youre just reading this).

Also, if you want to bring it back to the front, just type fg . This works for all Unix apps, have fun.

sparkleytone
Feb 20, 2003, 04:18 PM
or just run it with the & operator. that usually works as well

mc68k
Feb 20, 2003, 06:08 PM
heres what i would do:

the character & at the end of any expression signals the OS to send that process to the background. Any backgrounded process will still run after the Terminal window is closed.

so for example, if you wanted to run F@H in the background:

./OSX-3.24 &

all the info associated with F@H will be stored in:
/Users/[username]/Library/Folding@home

The switch -local is to make the current directory the target directory for the information instead of the default location listed above.

./OSX-3.24 -local &

stromie952
Feb 24, 2003, 12:09 AM
One more question.

Is it possible to have the graphical client look elsewhere than the users folder so I can check progress?

mc68k
Feb 24, 2003, 12:28 AM
Originally posted by stromie952
One more question.

Is it possible to have the graphical client look elsewhere than the users folder so I can check progress? no it's only default.

what do you mean by check progress? can't you already do that?

stromie952
Feb 24, 2003, 01:33 PM
Very, very true. I was just being stupid or something. :D

Thanx for pointing that out to me

G4scott
Feb 25, 2003, 07:26 PM
Do all or any of these techniques get F@H running behind the login screen?

Also, is it possible to fold while other users are logged on?

And how do I find out the progress of my folding with the console?

Rower_CPU
Feb 25, 2003, 07:28 PM
Mine does. :) (behind login and with other users)

G4scott
Feb 25, 2003, 07:33 PM
Originally posted by Rower_CPU
Mine does. :) (behind login and with other users)

OK, I did the ctrl-Z and BG thing, and it runs in the background without the terminal being open. It's running under my user name. When I log out, does it keep on running, or do I have to install it as the root user or something to get it to do this?

mc68k
Feb 25, 2003, 07:35 PM
Originally posted by G4scott
Do all or any of these techniques get F@H running behind the login screen?as long as the task is backgorunded, it doesn't matter how it was doneó so yes.
Also, is it possible to fold while other users are logged on?yes it is.
And how do I find out the progress of my folding with the console? if you left everything default, go to:

/Users/[username]/Library/Folding@home/work

you will find a file called logfile_0#.txt

this will have all the information you need.

mc68k
Feb 25, 2003, 07:39 PM
Originally posted by G4scott
OK, I did the ctrl-Z and BG thing, and it runs in the background without the terminal being open. It's running under my user name. When I log out, does it keep on running, or do I have to install it as the root user or something to get it to do this? with non-root admin accounts ive been able to get it to run at the login window.

the best way to find out is to run it, bg it, log in as another user, and use top in the terminal to find out if it's still running.

G4scott
Feb 25, 2003, 07:42 PM
thanks mc68k... I'm quite new to the terminal, but I've gotten it up and running on my iBook. I'm going to get it going on my 1ghz DP G4. I need to set it up to start every time the computer is booted. Does the method described at the beginnign of this thread do this?

Also, what's that Quartz Extreme thing in your download folder?

mc68k
Feb 25, 2003, 08:07 PM
Originally posted by G4scott
thanks mc68k... I'm quite new to the terminal, but I've gotten it up and running on my iBook. I'm going to get it going on my 1ghz DP G4. I need to set it up to start every time the computer is booted.my DP script does the reboot stuff for you.

Does the method described at the beginnign of this thread do this?yes it does. vi is a bitch if you don't know how to use it, so you can make a plain text file with one line (using some editor like pico).

@reboot pathname to client (OSX-3.24) &

then type in:

sudo crontab -u username pathname to file

type in your password. this file is now your crontab for that user.

check to see if it runs by rebooting. then first thing open terminal and type in top

Also, what's that Quartz Extreme thing in your download folder? that's the program used in the power of x videos at macworld. it's for benchmarking QE.