![]() |
|
|
#1 |
|
May 2003
23·3 Posts |
Hi all,
I've written a little shellscript that will monitor mprime under linux. It will restart mprime should it not be running. Can shut mprime off, if a certain temperature of the cpu is exceeded or if an UPS is running on batteries. It can also log all output created by the -d option to a logfile. It is configurable and can be downloaded from http://fb.design.fh-dortmund.de/matt...rmprime.tar.gz I'd love to get some feedback and suggestion for additional features. So long, Matthes |
|
|
|
|
|
#2 |
|
Jan 2003
138 Posts |
Not related to temperature, but I use this little perl-script often to see how far a calculation has come by reading the saved pXXXXXX file. I think I found it (or a modified version) on the mailinglist many years ago. You run it with the pXXXXXX (or qXXXXXX) filename as argument:
[code:1] #!/usr/bin/perl $file = shift || die; open (FILE,"<$file") || die; read(FILE,$temp,6); ($type, $counter) = unpack("sL",$temp); print "$type $counter\n"; close (FILE); [/code:1] The first number of the output is the FFT size, the second the current iteration as the p-file was saved. -- Jørgen |
|
|
|
|
|
#3 |
|
"Mike"
Aug 2002
25·257 Posts |
Here are two of my old scripts... Please don't laugh at them, I'm sure there are more efficient ways to accomplish these tasks...
The first generates a "signature" with all of your stats... UserID [a/b/c/d/e/f/g] URL Where: a = LL rank on George's list... b = LL P90 years on George's list... c = LL rank on PrimeNet list... d = LL P90 years on PrimeNet list... e = Factoring rank on PrimeNet list... f = Factoring P90 years on PrimeNet list... g = P90 years per day on PrimeNet list... Whew! Anyways, here is the script: [code:1]#!/bin/sh /opt/sfw/bin/wget -O - -q "http://www.mersenne.org/top2.htm" | grep "Ars Technica Team Prime Rib" | awk '{printf ("Xyzzy [%3d/%2.2f", $1, $7)}' ; /opt/sfw/bin/wget -O - -q "http://mersenne.org/ips/tops.shtml" | grep "Team_Prime_Rib" | awk '{printf ("/%2d/%3.3f", $1, $4)}' ; /opt/sfw/bin/wget -O - -q "http://mersenne.org/primenet/ftop101to500.txt" | grep "Team_Prime_Rib" | awk '{printf ("/%3d/%1.3f", $1, $5)}' ; /opt/sfw/bin/wget -O - -q "http://mersenne.org/cgi-bin/primenet_report.pl?UserID=Team_Prime_Rib&UserPW=tpr" | tr -d '\015' | grep '^Team_Prime_Rib' | awk '{printf ("/%3.2f] http://www.teamprimerib.com/\n", $6)}'[/code:1] Here is what the output looks like: [code:1]Xyzzy [131/91.33/90/107.923/135/7.360/725.49] http://www.teamprimerib.com/[/code:1] Obviously, this needs to be tweaked depending on where you are in the stats... You also have to put the proper user information in... The second script just pulls the stats every hour so you can monitor them... [code:1]#!/bin/sh /opt/sfw/bin/wget -O - -q "http://mersenne.org/cgi-bin/primenet_report.pl?UserID=Team_Prime_Rib&UserPW=tpr" | grep '^Team_Prime_Rib' | tr -d '\015' | awk '{printf ("[%2.3f/%3d/%1.3f/%2d/%3.2f] ", $2, $3, $4, $5, $6)}' [/code:1] The output to the log file looks like this: [code:1][78.606/220/3.754/18/523.19] Mon Oct 15 19:40:02 EDT 2001 [78.606/220/3.754/18/523.19] Mon Oct 15 19:45:01 EDT 2001 [78.606/220/3.754/18/523.19] Mon Oct 15 19:50:02 EDT 2001[/code:1] I think everyone goes through a stage where the stats consume our every thought, and back then I was definitely obsessed... |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Monitoring software on Linux, i-Nex ('CPU-Z'), Psensor, top | VictordeHolland | Linux | 4 | 2017-03-25 17:15 |
| compiling mprime on linux | graysky | Software | 6 | 2011-03-14 07:00 |
| mprime and linux | Echoblade | Information & Answers | 3 | 2007-06-24 22:28 |
| monitoring a Linux version | Carlo Monari | Software | 4 | 2004-12-11 17:26 |
| MPrime on Linux | optim | Software | 13 | 2003-12-06 04:27 |