![]() |
|
|
#1 |
|
Feb 2014
22×3×7 Posts |
Us Linux folk have options on how our system boots. That said, most modern flavors of Linux have converted to something called "systemd". This boot "manager" starts daemons differently than us grey beards are used to. So, I thought I'd document what/how I've done to get my systemd machine (aka Ubuntu 17.10) to run mprime at bootup.
Note: Use these steps after you have ran mprime -m to configure your system's profile. First, change directory to the location where the boot scripts are stored: Code:
cd /etc/systemd/system Code:
sudo nano mprime.service Code:
[Unit] Description=GIMPS mprime service After=network.target [Service] Type=simple User=daxm WorkingDirectory=/home/daxm/mersenne/mprime ExecStart=/home/daxm/mersenne/mprime/mprime -d Restart=on-abort [Install] WantedBy=multi-user.target Save that file by typing control-x press y and then press ENTER. Change the file to be executable with this command: Code:
sudo chmod 755 mprime.service Code:
sudo systemctl enable mprime.service Code:
systemctl start mprime.service Code:
sudo systemctl status mprime.service If you modify your mprime.service file. You'll need to issue the following command to reload systemd with the changes: Code:
sudo systemctl daemon-reload |
|
|
|
|
|
#2 |
|
Feb 2014
22×3×7 Posts |
I forgot to attribute my learning about how to build a Unit file. I used the following website:
https://www.devdungeon.com/content/c...-service-files |
|
|
|
|
|
#3 |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3·29·83 Posts |
Surely the final command could be replaced with something like systemctl reload mprime.service? So that systemctl doesn't reload *all* running services, rather just the one you want.
|
|
|
|
|
|
#4 | |
|
Feb 2014
8410 Posts |
Quote:
Code:
sudo systemctl restart mprime.service Last fiddled with by daxmick on 2018-01-04 at 23:42 |
|
|
|
|
|
|
#5 |
|
Feb 2014
8410 Posts |
As an aside, you can use the following command to look at the "log" for this service:
Code:
journalctl -u mprime.service |
|
|
|
|
|
#6 |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3×29×83 Posts |
|
|
|
|
|
|
#7 |
|
"Oliver"
Mar 2005
Germany
100010101112 Posts |
There is no need to set the executable bit on mprime.service.
Oliver |
|
|
|
|
|
#8 |
|
Feb 2014
22×3×7 Posts |
|
|
|
|
|
|
#9 |
|
Oct 2017
++41
7D16 Posts |
Thanks for sharing. This could be in the mprime package.
|
|
|
|
|
|
#10 |
|
Dec 2012
The Netherlands
2·23·37 Posts |
|
|
|
|
|
|
#11 |
|
Feb 2014
5416 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Disk starting to go | Chuck | Hardware | 8 | 2013-05-20 06:40 |
| Starting new bases | MrOzzy | Conjectures 'R Us | 104 | 2010-03-18 22:11 |
| mprime starting | spaz | Software | 9 | 2009-05-03 06:41 |
| starting mprime at boot time on a multicore pc | tha | Software | 6 | 2008-10-15 23:38 |
| Automatically starting mprime. | xode | Software | 8 | 2004-10-20 14:47 |