|
|
crontab for BOINC
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2004
Status:
Offline
|
|
Hi all
at
http://forums.macnn.com/showthread.p...on#post2122191
A short crontab program is described. Adapted to my choice of names, it contains one line:
@reboot cd /Applications/boinc; /usr/bin/nohup ./boinc &
When I install and run ("crontab boinctab") this file, I get
"boinctab":2: bad day-of-month
crontab: errors in crontab file, can't install
Can anyone help out?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status:
Offline
|
|
This is on MacOSX correct?
The @reboot isn't supported on other machines.
Your file should look like this, with a newline at the end.
-------boinctab-------
@reboot cd /Applications/boinc; /usr/bin/nohup ./boinc &
________________
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Nov 2002
Location: Santa Barbara CA
Status:
Offline
|
|
I like to add something so that you can see what is going on:
@reboot cd /Applications/boinc; /usr/bin/nohup ./boinc > output.log &
This puts the output that you would see in the terminal if you were running without the & in the output.log file. The best way to look at that file is to use the console application. If you double click on the file since it has the .log it will open the console. If you do not close the window in console, you just quit instead, then the next time you open console it will open output.log again also.
If you use >> instead of >, then it will add the output on to the old file. Just using one starts it over with a new file every time, which keeps it from growing. If you are having problems then >> would be the way to go as it keeps the old output.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2004
Status:
Offline
|
|
My crontab seems to be working now. Apparently all I needed was a blank line at the end of the file!
Someone might do well to compile all these hints to get BOINC going on OS-X into one webpage.
|
|
|
|
|
|
|
|
|
Administrator
Join Date: Jun 2000
Location: California
Status:
Offline
|
|
Originally posted by mikkyo:
This is on MacOSX correct?
The @reboot isn't supported on other machines.
...
@reboot is supported on other operating systems. I checked a debian box just to be sure, @reboot is in the man page (crontab5)
You're probably thinking of the @AppleNotOnBattery tag, which is used to schedule executions on laptops only if they are plugged in.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status:
Offline
|
|
Last time I looked none of the standard cron installs supported @reboot on anything other than OS X. Good to see some of the nixes are finally catching up.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2004
Status:
Offline
|
|
Hi
I just got into CERN's BOINC related project.
But I don't know how to turn off the crontab boinctab to allow me to attach to the new project.
Also, I didn't see "Team MacNN" on their list. Do you wish for me to create one?
|
|
|
|
|
|
|
|
|
Administrator
Join Date: Jun 2000
Location: California
Status:
Offline
|
|
I'll create one tonight. But I'd heard that project does not have a Mac worker just yet, and is in closed beta.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2004
Status:
Offline
|
|
I poked around their bulletin boards and discovered they apparently are giving a MAC version of their specific software a very low priority.
I gave one of my MACs the login, but the project rejected the request to download the work.
I have one of my PC machines working for them at the moment. And plan to add them to my home machine in a moment. It might be fun to create a MAC team for a project that doesn't support MACs!
Anyway, I'll still need to know how to cancel a crontab process for when Predictor comes back on line.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jan 2002
Location: Mile High City
Status:
Offline
|
|
Originally posted by reader50:
I'll create one tonight. But I'd heard that project does not have a Mac worker just yet, and is in closed beta.
They just opened up the closed beta to an additional 1000 participants. Project is scheduled to go public, September 29th. You are correct, there is no Mac worker yet. I believe they just recently added a Linux worker, so hopefully a Mac worker will be available soon.
|
|
|
|
|
|
|
|
|
Administrator
Join Date: Jun 2000
Location: California
Status:
Offline
|
|
Originally posted by ditchhook:
...
Anyway, I'll still need to know how to cancel a crontab process for when Predictor comes back on line.
Open a Terminal.
crontab -e (Return)
You are viewing your crontab in a CLI text editor. Move around as desired with the arrow keys. If you want to delete something, move over the beginning of it and press the x key.
If you want to add text, or delete in a more normal way, press i to enter insert mode. When you are finished inserting, press Esc to escape back to command mode.
When you are done editing (and are back in command mode) press:
:wq (Return)
You're done, the edited crontab has been saved. As for that final command:
: = enter special commands.
w = write changes to disk.
q = quit the text editor.
If you make a mistake and want to change your mind, type:
:q (Return)
... to exit the editor without saving any changes.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Sep 2004
Status:
Offline
|
|
Right now I have a crontab set up (as instructed here) to run BOINC at reboot. If I open a terminal window and type "./boinc -attach_project" I am told it is already running (because of my crontab). I wish to stop boinc, then attach to predictor when they are back up, but I don't know how unless I shut down the crontab instructions I installed (called boinctab). I don't wish to modify my boinctab, I simply wish to temporarily shut it down or somehow get access to BOINC again to add a new project.
Are you saying the only way to do this is to "erase" the contents of the boinctab and reboot?
|
|
|
|
|
|
|
|
|
Administrator
Join Date: Jun 2000
Location: California
Status:
Offline
|
|
You can issue a kill command to BOINC, but not having run BOINC yet, I don't know if that causes problems or not.
I'll let one of our BOINC experts answer that one. If you want to try anyway, fire up Terminal and type:
top (Return)
You will get a list of running processes. Note the PID of the BOINC process - the PID (Process ID number) is usually the leftmost column. Then stop top by typing:
q or Q (no Return)
and type:
kill xxx (Return)
... where xxx is the PID number that you found for BOINC. Doing this is much the same as giving BOINC a Control-C interrupt. If BOINC will not quit this way, you can give it a force-quit by typing:
kill -9 xxx (Return)
Don't use this version if you don't have to. It doesn't give BOINC a chance to shut down, instead BOINC is removed from the CPU schedule and it's RAM is freed up.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Nov 2002
Location: Santa Barbara CA
Status:
Offline
|
|
It works fine to kill the boinc process. You do not want to kill the hadsm3se process, which is the one that actually does all of the work, as data would be lost and the boinc process would probably start it up again anyway. This is from my output.log file the last time I killed boinc.
1yiv_100112330 - PH 1 TS 039248 - 08/03/1813 16:00 - H:M:S=0120:01:42 AVG=11.01 DLT=44.07
1w99_100109364 - PH 1 TS 041172 - 18/04/1813 18:00 - H:M:S=0127:48:19 AVG=11.18 DLT= 4.52
1w99_100109364 - PH 1 TS 041173 - 18/04/1813 18:30 - H:M:S=0127:48:23 AVG=11.17 DLT= 4.61
2004-09-14 16:48:38 [---] Received signal 15
2004-09-14 16:48:39 [---] Exit requested by user
CPDN Monitor got quit request...
Detaching shared memory...
1yiv_100112330 - PH 1 TS 039249 - 08/03/1813 16:30 - H:M:S=0120:01:47 AVG=11.01 DLT= 4.69
CPDN Monitor got quit request...
Detaching shared memory...
Signal 15 is the default value for kill. After you kill it and then run the attach project it will keep running in the terminal doing work. If you then stop it with Control-C or Command-., you can then start it up with the same line that you use in cron and it will run in the background and you can quit terminal.
|
|
|
|
|
|
|
|
|
Administrator
Join Date: Jun 2000
Location: California
Status:
Offline
|
|
Originally posted by ditchhook:
...
I just got into CERN's BOINC related project.
...
Also, I didn't see "Team MacNN" on their list. Do you wish for me to create one?
Originally posted by reader50:
I'll create one tonight.
...
You need a user account to create a team, and they have disabled new user accounts until they expand the user base again.
Please don't found us one if you have an account, we try to end up with all the different team access stuff available to the team leaders. A team founder can access user emails on this project, as well as kick members, and disband the team.
The team access pass is typically the same as the pass on the founder's personal account. I'll keep checking it regularly for the next opportunity to get in, and start us a Team MacNN. Hopefully, that will happen at the same time as a Mac client announcement.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status:
Offline
|
|
To easily kill your boinc app at any time try
killall -m boinc*
Don't make any typos though, -m means match, the * after boinc is the wildcard, and means 'and anything else'. So in effect you are saying 'kill anything that starts with boinc'.
This is easier than typing
killall boinc_4.06_powerpc_apple_darwin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|