mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Lounge

Reply
 
Thread Tools
Old 2003-07-10, 15:08   #1
Matthes
 
Matthes's Avatar
 
May 2003

23·3 Posts
Default Little shellscript for monitoring mprime under linux

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
Matthes is offline   Reply With Quote
Old 2003-07-10, 22:18   #2
Jorgen
 
Jan 2003

10112 Posts
Default

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
Jorgen is offline   Reply With Quote
Old 2003-07-11, 01:13   #3
Xyzzy
 
Xyzzy's Avatar
 
Aug 2002

3×2,837 Posts
Default

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

Thread Tools


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

All times are UTC. The time now is 01:36.


Sat Oct 1 01:36:51 UTC 2022 up 43 days, 23:05, 0 users, load averages: 0.91, 1.09, 1.11

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔