mersenneforum.org Command line options
 Register FAQ Search Today's Posts Mark Forums Read

 2018-11-06, 14:16 #1 Gerard     Oct 2018 Stem, NC (USA) 32 Posts Command line options I am looking for a list of all the allowed command line options for "mprime". I discovered the "-d" for output, that that is about it. Is there a list available or a way to have "mprime" display one? Thanks
2018-11-06, 16:15   #2
irowiki

Sep 2018

10001012 Posts

First set:

Quote:
 ./mprime -h Usage: mprime [-cdhmstv] [-aN] [-wDIR] -c Contact the PrimeNet server, then exit. -d Print detailed information to stdout. -h Print this. -m Menu to configure mprime. -s Display status. -t Run the torture test. -v Print the version number. -aN Use an alternate set of INI and output files (obsolete). -wDIR Run from a different working directory.

There may be more in either readme.txt or undoc.txt!

2019-07-24, 17:27   #3
ssybesma

"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts

Quote:
 Originally Posted by irowiki First set There may be more in either readme.txt or undoc.txt!

I didn't see any additional CLI options for mprime in either of those two files.

There are what I consider a couple essential CLI options missing from mprime.
One is continue and the other is exit.

I need some way to automate stopping and exiting mprime so I can reboot the Linux machine it's on and then restart and continue automatically after it comes back up.

It would be nice to do this once a day or once every other day to ensure the machine doesn't freeze up so I cannot remote into it. With 8 of these Linux devices I have (soon to be 12), that's a pain to do manually every day.

Last fiddled with by ssybesma on 2019-07-24 at 17:29

2019-07-24, 21:36   #4
M344587487

"Composite as Heck"
Oct 2017

19×47 Posts

Quote:
 Originally Posted by ssybesma I didn't see any additional CLI options for mprime in either of those two files. There are what I consider a couple essential CLI options missing from mprime. One is continue and the other is exit. I need some way to automate stopping and exiting mprime so I can reboot the Linux machine it's on and then restart and continue automatically after it comes back up. It would be nice to do this once a day or once every other day to ensure the machine doesn't freeze up so I cannot remote into it. With 8 of these Linux devices I have (soon to be 12), that's a pain to do manually every day.
I'm being particularly lazy so treat these as hints. Does mprime close cleanly when you CTRL-C the process? If so you can send a SIGINT signal to mprime using the kill command to do the same thing : https://bash.cyberciti.biz/guide/Sen...l_to_Processes

To automate starting on boot and closing+rebooting periodically you can use cron: https://en.wikipedia.org/wiki/Cron

I'd look into why your machines freeze before resorting to automating periodic reboots, is it that the ssh daemon crashes and doesn't automatically restart? There's probably (definitely) a way to have systemd automatically restart daemons that crash.

2019-07-24, 22:06   #5
ssybesma

"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts

Quote:
 Originally Posted by M344587487 Does mprime close cleanly when you CTRL-C the process? is it that the ssh daemon crashes and doesn't automatically restart?
I suppose Ctrl-C will close mprime cleanly but I haven't tried it. I'd bet it works.

I don't know what caused the crash but I can try to find the correct log file. When that happened, not only could I not remote to the device but I could not ping the device either.

The crash only happened once so far out of 8 devices since I've reconfigured the Peppermint 9 Linux image I use to eliminate unneeded apps/services from running and to give the devices more RAM and swap file space. I decreased the "Nice" value all the way down to -20 on all devices after the crash happened because mprime is the only app I want running on all of them (besides TeamViewer) and it has to have the highest priority possible.

What I was hoping to do is prevent anymore prolonged downtime on any of the devices which is what happened before I reconfigured the image I used. I now have Teamviewer on all of them and it's easier for me to more quickly see when a device is unreachable since the device cannot be connected to or even pinged to, but I was hoping to not have to check them frequently.

Last fiddled with by ssybesma on 2019-07-24 at 22:11

 2019-07-24, 23:00 #6 ssybesma   "Steve Sybesma" May 2012 Brighton, CO USA 89 Posts Sending a killall -SIGINT mprime merely stopped mprime but didn't cause it to exit. I'll have to figure out how to get the app itself to exit because a PID (changes everytime) can't be used.
 2019-07-25, 02:26 #7 ssybesma   "Steve Sybesma" May 2012 Brighton, CO USA 89 Posts The command "killall mprime" causes mprime to exit completely, while the command "killall -SIGINT mprime" causes mprime to stop but not exit. Now, just have to figure out how to create a script to cause the device to reboot, but also to start up and CONTINUE mprime. When you start mprime, it doesn't actually start where it left off until you hit '4' to continue. It's in stopped mode until you do that. Last fiddled with by ssybesma on 2019-07-25 at 02:27
 2019-07-25, 06:37 #8 Prime95 P90 years forever!     Aug 2002 Yeehaw, FL 7,883 Posts mprime -d
2019-07-25, 06:51   #9
SELROC

73638 Posts

Quote:
 Originally Posted by ssybesma The command "killall mprime" causes mprime to exit completely, while the command "killall -SIGINT mprime" causes mprime to stop but not exit. Now, just have to figure out how to create a script to cause the device to reboot, but also to start up and CONTINUE mprime. When you start mprime, it doesn't actually start where it left off until you hit '4' to continue. It's in stopped mode until you do that.

The SIGINT signal is (keyboard) Interrupt, is just like you press control-C in the terminal. It is the signal that commands gpuowl to exit, but saving a checkpoint before.
The command
Code:
pkill -int <programname>
kills gracefully all instances of programname.

Last fiddled with by SELROC on 2019-07-25 at 06:53

2019-07-25, 13:15   #10
ssybesma

"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts

Quote:
 Originally Posted by SELROC The SIGINT signal is (keyboard) Interrupt, is just like you press control-C in the terminal. It is the signal that commands gpuowl to exit, but saving a checkpoint before. The command Code: pkill -int  kills gracefully all instances of programname.

The command "pkill -int mprime" only stops the program but does not exit I found. I guess '-int' is equivalent to '-SIGINT'.

I was able to get to the command line using "killall mprime" which is the same thing as manually entering 5 to exit.
If there's a more graceful way to get to the command line, perhaps I should string the two commands together?

Last fiddled with by ssybesma on 2019-07-25 at 13:31

2019-07-25, 17:28   #11
ssybesma

"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts

Quote:
 Originally Posted by Prime95 mprime -d

The 'd' switch acts to continue mprime? That's what I'm looking for.

-d Prints more detailed information to stdout. Normally mprime does not send any output to stdout.

Last fiddled with by ssybesma on 2019-07-25 at 17:33

 Similar Threads Thread Thread Starter Forum Replies Last Post pepi37 Linux 4 2015-07-16 22:06 mu5tan6 Software 14 2015-03-20 17:21 wongnog Information & Answers 1 2008-07-20 11:29 monst Software 19 2008-01-31 07:07 monst Software 7 2007-12-18 02:37

All times are UTC. The time now is 20:13.

Wed May 18 20:13:07 UTC 2022 up 34 days, 18:14, 0 users, load averages: 2.09, 1.85, 1.70