![]() |
![]() |
#1 |
"David Kirkby"
Jan 2021
Althorne, Essex, UK
26×7 Posts |
![]()
I'm trying to get mprime to start to run when a linux machine is booted, but can't seem to get this to work. Any help appreciated.
I have two operating systems of interest - Centos 7.8 (same as Redhat 7.8) and Debian 10. Both use systemd to start processes, but I can't seem to get it to work. I found this web page https://wiki.debian.org/systemd/Services on using systemd. I want to start primed as user "gimps" in the directory /home/gimps, but even my attempt to not mess with the directory and username fail. The default is to start as root in the directory /root. I have the following in /etc/systemd/system/mprime.service Code:
[Unit] Description=GIMPS After=network.target remote-fs.target nss-lookup.target [Service] Type=simple Restart=always WorkingDirectory=/home/gimps ExecStart=/usr/local/bin/mprime [Install] WantedBy=multi-user.target root@4-CORE:~# cat /etc/systemd/system/mprime.service [Unit] Description=GIMPS After=network.target remote-fs.target nss-lookup.target [Service] Type=simple Restart=always WorkingDirectory=/home/gimps ExecStart=/usr/local/bin/mprime [Install] WantedBy=multi-user.target Code:
root@4-CORE:~# systemctl daemon-reload root@4-CORE:~# systemctl enable mprime.service root@4-CORE:~# systemctl start mprime.service root@4-CORE:~# systemctl status mprime.service ● mprime.service - GIMPS Loaded: loaded (/etc/systemd/system/mprime.service; enabled; vendor preset: e Active: failed (Result: signal) since Sun 2021-03-14 19:55:57 CET; 27s ago Process: 3841 ExecStart=/usr/local/bin/mprime (code=killed, signal=SEGV) Main PID: 3841 (code=killed, signal=SEGV) Mar 14 19:55:57 4-CORE systemd[1]: mprime.service: Service RestartSec=100ms expi Mar 14 19:55:57 4-CORE systemd[1]: mprime.service: Scheduled restart job, restar Mar 14 19:55:57 4-CORE systemd[1]: Stopped GIMPS. Mar 14 19:55:57 4-CORE systemd[1]: mprime.service: Start request repeated too qu Mar 14 19:55:57 4-CORE systemd[1]: mprime.service: Failed with result 'signal'. Mar 14 19:55:57 4-CORE systemd[1]: Failed to start GIMPS. I've tried starting mprime as a "simple" service, as well as "mprime -d" as forking. Neither work for me. Can anyone help me out? |
![]() |
![]() |
![]() |
#2 | |
"Jacob"
Sep 2006
Brussels, Belgium
1,823 Posts |
![]() Quote:
I would try again after moving all the mprime files to the /home/mprime folder. If you want another configuration you should delve in the undoc.txt file. Jacob |
|
![]() |
![]() |
![]() |
#3 |
"Composite as Heck"
Oct 2017
22×32×52 Posts |
![]()
You can learn systemd daemons if you like, but it's probably easier to just use a cron job, which on systemd systems will be a systemd service: https://www.cyberciti.biz/faq/linux-...system-reboot/
Even if you wanted to do it the "native" systemd way you'd probably use the cron replacement called timers instead of rolling your own daemon: https://opensource.com/article/20/7/systemd-timers |
![]() |
![]() |
![]() |
#4 |
Aug 2015
22×17 Posts |
![]()
If you want this to work without root, place the following into ~/.config/systemd/user/mprime.service for the user that will run mprime.
Code:
[Unit] Description=Prime95 client [Service] Type=simple ExecStart=/usr/local/bin/mprime -d -w%h/mprime-data KillMode=process KillSignal=SIGINT Restart=always [Install] WantedBy=multi-user.target Code:
systemctl enable --user mprime.service Code:
loginctl enable-linger <user> |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Howto start mprime automically for (Debian) Linux | joblack | Software | 26 | 2018-11-05 11:18 |
mprime 28.9 - occassional segmentation fault during start | pessoft | Software | 0 | 2016-06-13 20:58 |
Installing mprime on Linux | lidocorc | Software | 9 | 2009-11-06 20:59 |
mprime and linux | Echoblade | Information & Answers | 3 | 2007-06-24 22:28 |
MPrime on Linux | optim | Software | 13 | 2003-12-06 04:27 |