![]() |
![]() |
#1 |
Oct 2018
Stem, NC (USA)
2×5 Posts |
![]()
I am running FreeBSD 11.2 / amd64 with the latest version of mprime for that system.
I have discovered that "mprime" does not create a "PID" file. I am starting "mprime" with a startup script in the "rc.d" directory. It would be easier if "mprime" actually created a "PID" file. I am wondering if it is something that might be considered in future versions? ![]() Thanks! |
![]() |
![]() |
![]() |
#2 |
Sep 2018
4516 Posts |
![]()
You could try creating it like so:
https://superuser.com/questions/2384...om-bash-script I had to do something similar once on my webserver to get monit to monitor a process that didn't create a pid file either. Speaking of that... I wonder if I could use monit to start/restart mprime... Last fiddled with by irowiki on 2018-11-02 at 18:35 |
![]() |
![]() |
![]() |
#3 |
P90 years forever!
Aug 2002
Yeehaw, FL
41·193 Posts |
![]()
I'll look into adding this for the next release.
|
![]() |
![]() |
![]() |
#4 |
Oct 2018
Stem, NC (USA)
1010 Posts |
![]() |
![]() |
![]() |
![]() |
#5 |
Sep 2003
A1B16 Posts |
![]()
The file local.txt gets updated with a Pid= line when mprime runs. Would that be sufficient?
|
![]() |
![]() |
![]() |
#6 | |
Oct 2018
Stem, NC (USA)
2×5 Posts |
![]() Quote:
Not really. Programs like https://mmonit.com/monit/ use the PID file to determine if the application is running. It is also used in "rc" startup scripts in FreeBSD. In FreeBSD, "man 3 pidfile" gives a good bit of info on how to create and use the PID file. ![]() |
|
![]() |
![]() |
![]() |
#7 |
Sep 2018
3·23 Posts |
![]()
I'll dig up one of my monit pid creation scripts from my webserver for you and post it when I can.
|
![]() |
![]() |
![]() |
#8 | |
Oct 2018
Stem, NC (USA)
A16 Posts |
![]() Quote:
I have done that myself; however, it is not really the best idea. The program that is started should create the PID and remove it when it terminates. It should also check for any stale PID files and remove them upon startup. It is for those very reasons that I abandoned that idea. I am not looking to reinvent the wheel here. |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Aouessare-El Haddouchi-Essaaidi "test": "if Mp has no factor, it is prime!" | wildrabbitt | Miscellaneous Math | 11 | 2015-03-06 08:17 |
"ERROR: Unable to open spool file." | no1hasdisid | Software | 1 | 2013-05-06 05:24 |
what's the point of "Iterations between results file outputs"? | ixfd64 | Software | 3 | 2012-08-01 18:55 |
mprime on FC4 on x86_64 : "cannot execute binary file" | T.Rex | Software | 9 | 2006-09-01 21:21 |
Would Minimizing "iterations between results file" may reveal "is not prime" earlier? | nitai1999 | Software | 7 | 2004-08-26 18:12 |