climateprediction.net home page
How do I shut down?

How do I shut down?

Questions and Answers : Macintosh : How do I shut down?
Message board moderation

To post messages, you must log in.

AuthorMessage
old_user1172

Send message
Joined: 25 Aug 04
Posts: 1
Credit: 4,565
RAC: 0
Message 4686 - Posted: 26 Sep 2004, 21:54:16 UTC

Hi. I\'m not very good at Computers. What do i do, when the project is running, the terminal is open and I want to shut my mac down? Cause when I start it again, I have to reload the model. Don\'t I loose everything that has been calculated before?
Thanks.
ID: 4686 · Report as offensive     Reply Quote
old_user1
Avatar

Send message
Joined: 5 Aug 04
Posts: 907
Credit: 299,864
RAC: 0
Message 4711 - Posted: 27 Sep 2004, 12:08:31 UTC

you should probably "Ctrl+C" in the terminal window, the model saves every 144 timesteps so if you are past that it will start up where it left off (rounded down to the last 144 timestep boundary you are at). I'm afraid I'm not very good at Macs, but there is probably a way to startup CPDN/BOINC as a "service" or "daemon" so it will startup and shutdown automatically?

ID: 4711 · Report as offensive     Reply Quote
old_user1764

Send message
Joined: 26 Aug 04
Posts: 15
Credit: 1,320,185
RAC: 0
Message 4745 - Posted: 28 Sep 2004, 7:36:55 UTC

Basic install instructions for cpdn. Includes running another boinc project, and using cron to automatically start boinc running.

1) Copy the boinc client into a folder. I use my home folder for things like this instead of Applications since they are always run from the command line and the terminal starts in your home folder.

1a) cd into wherever the folder is.

2) I rename the client boinc, so that when I write a cron job to start it I don't have to change it if the boinc version changes. If I need to know the version I run ./boinc -version.

3) If the client won't run I do:

ls -alrt (or) ls -l

if boinc looks like this:

-rw-r--r-- 1 clint clint 1137820 10 Sep 23:26 boinc

then I run:

chmod +x boinc

then it should look like this:

-rwxr-xr-x 1 clint clint 1137820 10 Sep 23:26 boinc

and actually work.

4) Then start the client up with ./boinc. Then paste the URL and then the id that you get when you register for a project. Then watch to see that it successfully downloads both some data and the projects worker. If it seems to be going okay then use top to check to see that it is running two workers so that both processors are being fully used.

5) Then stop the client with Control-C or Command-.. After it stops start it again with:

./boinc -attach_project

Then paste in the new URL and id. Check to see if that runs okay. When there are two projects then of the four workers (on a dualie) only two will be running at any one time, with that changing around once an hour.

6) Stop the client again and then start it the way that I plan to using cron:

nohup ./boinc > output.log &

nohup keeps it from being killed if you close the terminal window or log out. This is very necessary on a linux box, but it doesn't seem to matter that much in OSX. I found one situation that it makes a difference and I don't remember what that was. I run it anyway.

> output.log puts the output, which you normally see in the terminal, into the file output.log. If you do >> output.log then it will append it onto the end of file, this is useful if you are having problems as the old file doesn't get overwritten. Otherwise the single > keeps the file from just getting bigger and bigger.

The & means that the process runs in the background, you get the terminal back right away.

You can watch the output.log by running:

tail -f output.log

but I have found that using the console takes up less cpu time and you can scroll up easily to see the whole file. If you just double click on any file with .log it will open the console.

7) Then I run:

crontab -e

and add the line:

@reboot cd ~/boinc/;nohup ./boinc > output.log &

The @reboot means that it runs when ever the machine first starts up, even before you log in. The ~ means my home directory, and then the next part starts the action. When you go to reboot it the boinc client gets the same signal that it normally gets if you are running in the terminal and hit Control-C, so it shuts down the same way. If you need to stop it from running run:
killall boinc
and it will stop that process which will shut down the workers.

So at this point the client is running on both processors, if one project runs out of work the other one will run automatically. If the machine reboots then the client will start up right away. If I want to look at what is going on then I open console and look at output.log. If you quit console with windows open then they will be opened the next time that you run it.
ID: 4745 · Report as offensive     Reply Quote
Profile old_user5994

Send message
Joined: 31 Aug 04
Posts: 239
Credit: 2,933,299
RAC: 0
Message 5362 - Posted: 14 Oct 2004, 15:47:07 UTC

For a different way, I have one in the install part of my documentation... pictures and everything...

It gets you to about the same place so, either way will work ...

Carl,

Are you going to add this process to your install page? If not, might I put it into mine?

I collect these things so that there are versions available for more people ...
ID: 5362 · Report as offensive     Reply Quote
old_user1556

Send message
Joined: 26 Aug 04
Posts: 3
Credit: 258,386
RAC: 0
Message 6478 - Posted: 29 Nov 2004, 23:15:47 UTC - in response to Message 4745.  

Ummm... How does one SAVE the crontab file? I tried every ctrl-key combo I could think of...

> Basic install instructions for cpdn. Includes running another boinc project,
> and using cron to automatically start boinc running.
>
> 1) Copy the boinc client into a folder. I use my home folder for things like
> this instead of Applications since they are always run from the command line
> and the terminal starts in your home folder.
>
> 1a) cd into wherever the folder is.
>
> 2) I rename the client boinc, so that when I write a cron job to start it I
> don't have to change it if the boinc version changes. If I need to know the
> version I run ./boinc -version.
>
> 3) If the client won't run I do:
>
> ls -alrt (or) ls -l
>
> if boinc looks like this:
>
> -rw-r--r-- 1 clint clint 1137820 10 Sep 23:26 boinc
>
> then I run:
>
> chmod +x boinc
>
> then it should look like this:
>
> -rwxr-xr-x 1 clint clint 1137820 10 Sep 23:26 boinc
>
> and actually work.
>
> 4) Then start the client up with ./boinc. Then paste the URL and then the id
> that you get when you register for a project. Then watch to see that it
> successfully downloads both some data and the projects worker. If it seems to
> be going okay then use top to check to see that it is running two workers so
> that both processors are being fully used.
>
> 5) Then stop the client with Control-C or Command-.. After it stops start it
> again with:
>
> ./boinc -attach_project
>
> Then paste in the new URL and id. Check to see if that runs okay. When there
> are two projects then of the four workers (on a dualie) only two will be
> running at any one time, with that changing around once an hour.
>
> 6) Stop the client again and then start it the way that I plan to using cron:
>
> nohup ./boinc > output.log &
>
> nohup keeps it from being killed if you close the terminal window or log out.
> This is very necessary on a linux box, but it doesn't seem to matter that much
> in OSX. I found one situation that it makes a difference and I don't remember
> what that was. I run it anyway.
>
> > output.log puts the output, which you normally see in the terminal, into
> the file output.log. If you do >> output.log then it will append it onto
> the end of file, this is useful if you are having problems as the old file
> doesn't get overwritten. Otherwise the single > keeps the file from just
> getting bigger and bigger.
>
> The & means that the process runs in the background, you get the terminal
> back right away.
>
> You can watch the output.log by running:
>
> tail -f output.log
>
> but I have found that using the console takes up less cpu time and you can
> scroll up easily to see the whole file. If you just double click on any file
> with .log it will open the console.
>
> 7) Then I run:
>
> crontab -e
>
> and add the line:
>
> @reboot cd ~/boinc/;nohup ./boinc > output.log &
>
> The @reboot means that it runs when ever the machine first starts up, even
> before you log in. The ~ means my home directory, and then the next part
> starts the action. When you go to reboot it the boinc client gets the same
> signal that it normally gets if you are running in the terminal and hit
> Control-C, so it shuts down the same way. If you need to stop it from running
> run:
> killall boinc
> and it will stop that process which will shut down the workers.
>
> So at this point the client is running on both processors, if one project runs
> out of work the other one will run automatically. If the machine reboots then
> the client will start up right away. If I want to look at what is going on
> then I open console and look at output.log. If you quit console with windows
> open then they will be opened the next time that you run it.
>
ID: 6478 · Report as offensive     Reply Quote

Questions and Answers : Macintosh : How do I shut down?

©2024 climateprediction.net