mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2019-06-07, 15:06   #1
lukerichards
 
lukerichards's Avatar
 
"Luke Richards"
Jan 2018
Birmingham, UK

12016 Posts
Default Run CADO automatically on boot.

Any suggestions?

Following on from my thread on autostarting pre-emptible VM instances in Google Cloud, the next job is getting Cado to run successfully on boot and on this I don't know where to start.
lukerichards is offline   Reply With Quote
Old 2019-06-07, 16:02   #2
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11·347 Posts
Default

I use script files on my linux machines, that are invoked via Startup. I suppose Windows could do the same with .bat files.
EdH is offline   Reply With Quote
Old 2019-06-07, 16:24   #3
chris2be8
 
chris2be8's Avatar
 
Sep 2009

2·1,039 Posts
Default

What OS do they run?

If Linux you could set up an @reboot entry in your ID's crontab to run a script whenever the system is booted up.

Or the script that boots up the instance could wait until it's up (eg ping it every few seconds until it's up), then ssh onto it to start cado.

Chris
chris2be8 is offline   Reply With Quote
Old 2019-06-07, 16:38   #4
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

72338 Posts
Default

Just to echo what others are saying: Run crontab -e and enter on a line
Code:
@reboot cd /path/to/cado; ./cado whatever &
. Save the file. To see what you have in your cron table use crontab -l. HTH.

Last fiddled with by paulunderwood on 2019-06-07 at 16:40
paulunderwood is offline   Reply With Quote
Old 2019-06-07, 17:20   #5
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11·347 Posts
Default

I haven't used crontab in a long while for anything. (I should probably refamiliarize myself.) I've been using the GUI Startup method. Is there an advantage to using crontab instead?
EdH is offline   Reply With Quote
Old 2019-06-07, 17:39   #6
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,739 Posts
Default

Quote:
Originally Posted by EdH View Post
I haven't used crontab in a long while for anything. (I should probably refamiliarize myself.) I've been using the GUI Startup method. Is there an advantage to using crontab instead?
Unless you have automatic desktop login, it would not start until you login to the desktop. "cron" will start it on boot regardless. This is useful for server machines (running headless).

Last fiddled with by paulunderwood on 2019-06-07 at 18:01
paulunderwood is offline   Reply With Quote
Old 2019-06-08, 02:55   #7
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11·347 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Unless you have automatic desktop login, it would not start until you login to the desktop. "cron" will start it on boot regardless. This is useful for server machines (running headless).
Ah, yes. I had forgotten the login necessity. Although I am running headless, the machines do engage an auto-login* and I access them both via ssh/vnc and ssh direct.

*My Debian machines no longer allow me to login to a GUI environment at all since the last upgrade. I am now limited in some of the things I can do with them. For a specific, I can no longer run Primo on them.

Thanks for the info.
EdH is offline   Reply With Quote
Old 2019-06-08, 03:21   #8
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

1110100110112 Posts
Default

Quote:
Originally Posted by EdH View Post
Ah, yes. I had forgotten the login necessity. Although I am running headless, the machines do engage an auto-login* and I access them both via ssh/vnc and ssh direct.

*My Debian machines no longer allow me to login to a GUI environment at all since the last upgrade. I am now limited in some of the things I can do with them. For a specific, I can no longer run Primo on them.

Thanks for the info.
Is X broken on the Debian machines? I don't suppose ssh -X xxx.xxx.xxx.xxx allows you to run X applications? If you have the time try apt-get install --reinstall gnome or whatever desktop environment you were using.

If you need to purge the configuration files instead try apt-get purge gnome && sudo apt-get install gnome.

Last fiddled with by paulunderwood on 2019-06-08 at 04:15
paulunderwood is offline   Reply With Quote
Old 2019-06-08, 15:54   #9
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11·347 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Is X broken on the Debian machines? I don't suppose ssh -X xxx.xxx.xxx.xxx allows you to run X applications? If you have the time try apt-get install --reinstall gnome or whatever desktop environment you were using.

If you need to purge the configuration files instead try apt-get purge gnome && sudo apt-get install gnome.
(I'm afraid I've diverted this thread - sorry.)


Thank you for the help. I did try the reinstall - more later. I tried changing to lightdm on one of the machines a while back and that made it worse. On the other, I can still get a VNC connection (via ssh), but what appears to be happening, is that the user is logged in and immediately taken to a locked background. There is something acting like a stuck key that disallows any unlock attempt. Any actual keystroke is quickly removed and the message "Authentication error" is continuously displayed. This happened identically on both machines when I upgraded them to jessie.
EdH is offline   Reply With Quote
Old 2019-06-08, 17:56   #10
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,739 Posts
Default

Quote:
Originally Posted by EdH View Post
(I'm afraid I've diverted this thread - sorry.)


Thank you for the help. I did try the reinstall - more later. I tried changing to lightdm on one of the machines a while back and that made it worse. On the other, I can still get a VNC connection (via ssh), but what appears to be happening, is that the user is logged in and immediately taken to a locked background. There is something acting like a stuck key that disallows any unlock attempt. Any actual keystroke is quickly removed and the message "Authentication error" is continuously displayed. This happened identically on both machines when I upgraded them to jessie.
Have you tried creating a new user on the problematic Debian boxes? Can you log in with this new account? It might be that there is some "." file in the users' home directories preventing old users logging in. I have had problems with .Xauthority files in the past.

Last fiddled with by paulunderwood on 2019-06-08 at 20:32
paulunderwood is offline   Reply With Quote
Old 2019-06-10, 07:01   #11
lukerichards
 
lukerichards's Avatar
 
"Luke Richards"
Jan 2018
Birmingham, UK

25·32 Posts
Default

And we have liftoff!

Non-pre-emptible micro instance costing $4 a month with a script which pings an eight-core pre-emptible instance every 5 minutes and, if receives no reply, assumes it is down and restarts it.

Pre-emptible instance then boots and runs CADO from crontab.
lukerichards is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically stopping P-1 to benchmark? Why? Uncwilly Software 2 2018-02-23 05:24
Several Assignments not automatically unreserved sixblueboxes PrimeNet 8 2014-03-05 21:59
Automatically updating factordb chris2be8 FactorDB 9 2012-05-03 10:20
Automatically start Prime95 on the mac koekie Software 2 2012-02-06 15:39
Automatically starting mprime. xode Software 8 2004-10-20 14:47

All times are UTC. The time now is 08:17.


Sat Jul 17 08:17:03 UTC 2021 up 50 days, 6:04, 1 user, load averages: 1.71, 1.66, 1.47

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.