Register
It is currently Fri Apr 18, 2014 2:03 am

folding at home client monitor for puppylinux


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Thu Nov 08, 2007 11:24 am   

Joined: Thu Nov 08, 2007 8:23 am
Posts: 1
I'm working on a script to monitor my folding at home client. So far I have a "somewhat" working text version that will print all of the info that I want to see in 5 second intervals. Here's the original script:

Code:
#!/bin/bash


until [ "$selection" = "*" ]; do
    clear
    echo === lm_sensors monitor ====
    /usr/bin/sensors     #
    echo === Folding @ Home Status ====
    echo === CPU 1 Progress Report ====
    tail -n1 /home/pyrael/foldingathome/CPU1/FAHlog.txt | grep "%"
    sleep 5
    clear
    echo === Folding @ Home Status ====
    echo === CPU 2 Progress Report ====
    tail -n1 /home/pyrael/foldingathome/CPU2/FAHlog.txt | grep "%"
    sleep 5
    clear
    echo === Folding @ Home Status ===
    echo === Status Of All Clients ===
    service folding status
    sleep 5
done



as the script is now, it will show me:
Quote:
=== lm_sensors monitor ====
adm1021-i2c-0-2b
Adapter: SMBus PIIX4 adapter at 0850
Board Temp: +54°C (low = -55°C, high = +127°C)
CPU Temp: +66°C (low = -5°C, high = +110°C)

adm1021-i2c-0-4e
Adapter: SMBus PIIX4 adapter at 0850
Board Temp: +56°C (low = -55°C, high = +127°C)
CPU Temp: +67°C (low = -5°C, high = +110°C)


lm79-i2c-0-2d
Adapter: SMBus PIIX4 adapter at 0850
VCore 1: +3.30 V (min = +3.10 V, max = +3.50 V)
VCore 2: +2.96 V (min = +2.67 V, max = +3.33 V)
+3.3V: +2.99 V (min = +2.67 V, max = +3.33 V)
+5V: +3.31 V (min = +3.20 V, max = +3.52 V)
+12V: +7.60 V (min = +7.24 V, max = +7.96 V)
-12V: -10.40 V (min = -11.18 V, max = -9.68 V)
-5V: -1.35 V (min = -2.70 V, max = -0.43 V)
fan1: 2057 RPM (min = 1095 RPM, div = 8)
fan2: 2057 RPM (min = 675 RPM, div = 8)
fan3: 0 RPM (min = -1 RPM, div = 2) ALARM
temp: +30.0°C (high = +75°C, hyst = +70°C)
vid: +2.00 V

=== Folding @ Home Status ====
=== CPU 1 Progress Report ====

[16:53:50] Completed 960000 out of 1500000 steps (64%)





=== Folding @ Home Status ====
=== CPU 2 Progress Report ====

[16:55:06] Completed 960000 out of 1500000 steps (64%)




=== Folding @ Home Status ===
=== Status Of All Clients ===

['folding' ver. 5.8]

Status of running FAH client(s) on 2 processor(s):
Status on all possible FAH client(s):
FAH504-Linux.exe (pid 2203 2242) is running
Status on all possible FAH cores (FahCore_81.exe):
FahCore_81.exe (pid 2247 2251 2271 2272 2273 2300 2301 2302) is running
Status on all possible 'FaH' scripts:
FaH (pid 2202 2241) is running


Status of FAH client(s): OK



What I am trying to do now, Is to make this little script work with Xdialog.

I can make a tailbox using:
Code:
case $? in
  0)
    echo "OK.";;
  1)
    echo "Cancel pressed.";;
  255)
    echo "Box closed.";;
esac
Xdialog --title "CPU 2" --tailbox /home/pyrael/foldingathome/CPU2/FAHlog.txt 24 120

case $? in
  0)
    echo "OK.";;
  1)
    echo "Cancel pressed.";;
  255)
    echo "Box closed.";;
esac


and I can do similar using Xdialog to output the service folding status. right now I use all tail boxes for these

what I would like to do is make the log files an optional choice --perhaps clicking on a button to open the log in a log-box

and the default view being a progress box or equivalent.

also, I'd like to display the lm_sensors output inthe same manner (a tail box or equivalent)

My problem is getting the progress info from the f@h client and sending it to the progress box.

I was using tail -n1 /home/pyrael/foldingathome/CPU1/FAHlog.txt | grep "%" in the script as posted above, but that will display the whole line. Perhaps I am thinking backwards, but I am assuming that I should be able to use just the (nn%) part of the log to tell the progress box where to draw the indicator. but I am stumped as how to get ONLY that part of the line from grep.

Anyone have any Ideas?

***For "MUCH" later on in the devel of this thing:
I'd like to contain all of the boxes in one container (Not sure if Xdialog will do that)


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP