mersenneforum.org  

Go Back   mersenneforum.org > New To GIMPS? Start Here! > Information & Answers

Reply
 
Thread Tools
Old 2018-11-06, 14:16   #1
Gerard
 
Gerard's Avatar
 
Oct 2018
Stem, NC (USA)

910 Posts
Question 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
Gerard is offline   Reply With Quote
Old 2018-11-06, 16:15   #2
irowiki
 
Sep 2018

3·23 Posts
Default

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!
irowiki is offline   Reply With Quote
Old 2019-07-24, 17:27   #3
ssybesma
 
"Steve Sybesma"
May 2012
Brighton, CO USA

5916 Posts
Default

Quote:
Originally Posted by irowiki View Post
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
ssybesma is offline   Reply With Quote
Old 2019-07-24, 21:36   #4
M344587487
 
M344587487's Avatar
 
"Composite as Heck"
Oct 2017

2·3·5·29 Posts
Default

Quote:
Originally Posted by ssybesma View Post
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.
M344587487 is offline   Reply With Quote
Old 2019-07-24, 22:06   #5
ssybesma
 
"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts
Default

Quote:
Originally Posted by M344587487 View Post
<snip> Does mprime close cleanly when you CTRL-C the process?
<snip>

<snip> 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
ssybesma is offline   Reply With Quote
Old 2019-07-24, 23:00   #6
ssybesma
 
"Steve Sybesma"
May 2012
Brighton, CO USA

10110012 Posts
Default

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.
ssybesma is offline   Reply With Quote
Old 2019-07-25, 02:26   #7
ssybesma
 
"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts
Default

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
ssybesma is offline   Reply With Quote
Old 2019-07-25, 06:37   #8
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

769110 Posts
Default

mprime -d
Prime95 is offline   Reply With Quote
Old 2019-07-25, 06:51   #9
SELROC
 

23×23×31 Posts
Default

Quote:
Originally Posted by ssybesma View Post
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
  Reply With Quote
Old 2019-07-25, 13:15   #10
ssybesma
 
"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts
Default

Quote:
Originally Posted by SELROC View Post
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.


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
ssybesma is offline   Reply With Quote
Old 2019-07-25, 17:28   #11
ssybesma
 
"Steve Sybesma"
May 2012
Brighton, CO USA

89 Posts
Default

Quote:
Originally Posted by Prime95 View Post
mprime -d

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


The readme.txt file says this about the 'd' switch and that's why I had to ask:


-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
ssybesma is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail from command line pepi37 Linux 4 2015-07-16 22:06
Windows command line mu5tan6 Software 14 2015-03-20 17:21
command line switch wongnog Information & Answers 1 2008-07-20 11:29
NewPGen from the command line monst Software 19 2008-01-31 07:07
MultiSieve from the command line (on Windows) monst Software 7 2007-12-18 02:37

All times are UTC. The time now is 02:49.


Wed Dec 8 02:49:18 UTC 2021 up 137 days, 21:18, 1 user, load averages: 1.83, 1.90, 1.63

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.