Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > Team MacNN > Graphical progress monitor for folding@home console version

Graphical progress monitor for folding@home console version
Thread Tools
bousozoku
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Mar 19, 2003, 12:47 PM
 
I have used Java to build a progress monitor for up to 2 processes. It runs on any machine with Java2 v.1.3.1 and a home directory, which leaves out Win95 and Win98.) My intention was to get more Mac OS X users to fold, but others may find it useful as well.

Currently, it supports Tinker and Gromacs cores. I'm working on the SPG format now as well as adding a timer for automatic progress updates.

It's available at http://www.mindspring.com/~us019818/fp

Thanks!
folding@home is good for you.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Mar 19, 2003, 04:39 PM
 
Doesn't work at all for me.
Which file are you supposed to select?
The FAHLog.txt file?
If so it still doesn't work.
Also note that users that run nohup'd will have a nohup.out file instead of a FAHLog.txt file that is being updated.
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Mar 19, 2003, 07:03 PM
 
I guess you didn't see the example of the file chooser. If you see something wrong with the setup instructions, please let me know.

You need to pick the logfile_xx.txt where xx is the number of the work unit. This would be in the work folder. If you're using a single processor Mac and version 3, it should be in Library/folding@home/work under your user folder. If you're using dual processors and the -local flag, it would be in the work folder under whatever folder you created.

Thanks!
folding@home is good for you.
     
enola
Dedicated MacNNer
Join Date: Sep 2001
Location: California
Status: Offline
Reply With Quote
Mar 19, 2003, 11:31 PM
 
Didn't work for me either and I am selecting the logfile_xx.txt in the work directory. But I'm wondering if it's because I've got java 1.4.1 installed. I know that 1.3.1 is still available but don't know how to get that jar file to use the older version.
     
enola
Dedicated MacNNer
Join Date: Sep 2001
Location: California
Status: Offline
Reply With Quote
Mar 19, 2003, 11:37 PM
 
Okay, got it to work now. I didn't read the directions fully. I didn't hit the save settings button. So I selected the log file, clicked the save settings button, then clicked the update button.

But the bummer is top shows java now using up 50% of the CPU.
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Mar 20, 2003, 11:58 AM
 
Originally posted by enola:
Okay, got it to work now. I didn't read the directions fully. I didn't hit the save settings button. So I selected the log file, clicked the save settings button, then clicked the update button.

But the bummer is top shows java now using up 50% of the CPU.
Java takes different slices of the machine, but since v1.4.1, it's taking a lot more.

I keep the window minimised until I want to update progress. After seeing it update, I minimise again. This way, it doesn't seem to bother folding a whole lot.

After I get the time installed, this will provide automatic updates. For those with a larger dock, they'll be able to see the changes in the dock.
folding@home is good for you.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Mar 20, 2003, 06:02 PM
 
I got it working.
You know you can speficy in the diaglog which file to choose. "Please locate your logfile_XX.txt file" or something.

Java sucks up way too much CPU though, so it isn't worth it to except to pop it open to see where you are before you dump or shutdown or something.
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Mar 20, 2003, 10:42 PM
 
Originally posted by mikkyo:
I got it working.
You know you can speficy in the diaglog which file to choose. "Please locate your logfile_XX.txt file" or something.

Java sucks up way too much CPU though, so it isn't worth it to except to pop it open to see where you are before you dump or shutdown or something.
Excellent!

I'll see if I can modify the title of the dialog box.

As I said earlier, I keep it minimised in the dock. The CPU usage stays near zero.

[EDIT] I've changed the look-and-feel to the Java look-and-feel and it cut CPU percentage from nearly 50 percent to less than 1 percent for me.[/EDIT]
( Last edited by bousozoku; Mar 24, 2003 at 12:13 AM. )
folding@home is good for you.
     
Shaktai
Mac Elite
Join Date: Jan 2002
Location: Mile High City
Status: Offline
Reply With Quote
Mar 29, 2003, 03:15 AM
 
An updated version is available that uses far fewer clock cycles then the original. Not as pretty looking, but much more functional.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Mar 30, 2003, 12:56 PM
 
Originally posted by bousozoku:

[EDIT] I've changed the look-and-feel to the Java look-and-feel and it cut CPU percentage from nearly 50 percent to less than 1 percent for me.[/EDIT]
Excellent.
Much better than before.

You should write up a bug saying that the apple theme takes 40% more CPU than the java theme just sitting in a dialog box.
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Mar 30, 2003, 11:44 PM
 
Originally posted by mikkyo:
Excellent.
Much better than before.

You should write up a bug saying that the apple theme takes 40% more CPU than the java theme just sitting in a dialog box.
If I sent Apple a bug report like that and they were to respond publicly, they would have to say that Aqua itself takes up too much CPU time and makes the system much slower than it should be, despite Quartz Extreme. It's not just in Java that it's taking too much.
folding@home is good for you.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
Mar 31, 2003, 01:05 AM
 
You should write up a bug report whatever you think.
Sitting in a dialog, should not suck 40% cpu, aqua, quartz, or XWindows, period.
I mean you aren't even drawing to the screen.
Sure ther is a progess bar with a blitting texture but that should be in VRAM if it is being reused.
Write it up, provide both your .jars as examples, and maybe some Apple folks will get into F@H investigating it.
Bonus if you mention Team MacNN in there somewhere.
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Apr 5, 2003, 09:02 PM
 
Originally posted by mikkyo:
You should write up a bug report whatever you think.
Sitting in a dialog, should not suck 40% cpu, aqua, quartz, or XWindows, period.
I mean you aren't even drawing to the screen.
Sure ther is a progess bar with a blitting texture but that should be in VRAM if it is being reused.
Write it up, provide both your .jars as examples, and maybe some Apple folks will get into F@H investigating it.
Bonus if you mention Team MacNN in there somewhere.
I'll consider it, but I have a hunch that Java performance isn't anywhere near done since the internal version is 1.4.1_01 instead of 1.4.1_02, as it should be. Apple doesn't like to admit to developers that they've done anything wrong. You should see some of the intermittent bug fix logs for Eudora. "Fixed xx as a workaround since Apple doesn't give a..."
folding@home is good for you.
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Apr 28, 2003, 06:04 PM
 
I made a minor, major change to Gromacs log processing which now correctly shows progress.
folding@home is good for you.
     
proux
Mac Enthusiast
Join Date: Jun 2000
Location: ny
Status: Offline
Reply With Quote
May 3, 2003, 11:59 AM
 
If it is anywhere close to what Seti Menu is, it would be awsome!
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
May 3, 2003, 03:11 PM
 
I haven't seen the SETI menu, so I don't know. Please, take a look the web site for my monitor. Let me know if you have suggestions.

By the way, the Gromacs estimated time to completion is work quite well now and the updated monitor has been uploaded to the web site.
folding@home is good for you.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
May 24, 2003, 02:36 PM
 
How's the monitor all your clients version coming along?
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
May 24, 2003, 11:14 PM
 
It's going slowly. I think that I should probably quit my summer classes and just work on it instead.

It seems that I do programming or graphic design but not both at the same time.
folding@home is good for you.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 25, 2003, 01:16 AM
 
mikkyo, how much did you want monitored, and is apache / php installed on all your boxes? If what you want is not too complex, I could hack up a basic reporting utility. Something to hold until bousozoku comes through with a polished solution.

If you want monitoring only (no control functions) and were willing to place the fold clients in an apache-served folder on each box, then php would only be needed for the master client that collects the data. Alternatively, the work folder or main logfile could be symlinked into the apache filesystem.

Right now, I've been working, and doing backend stats modifications to remove filesystem dependencies. Should be working on Ranks, which is about halfway there, but it's somehow easier to tackle an alternative small project on the side. Stats sigs perhaps, or something like this.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
May 25, 2003, 06:31 AM
 
It would be nice to monitor all your boxes from one machine.
I haven't had time to play much, but it isn't really that hard. If you stick a symlink to the unitinfo.txt file in you Sites directory on each mac and turn on apache, you can get eveything you need (except the CPU usage of the core) to know that everything is going ok.
A little bit of scripting and you could have master monitor that knows the IPs of all your machines and grabs the status of them all anytime you want by requesting that info file.

I was thinking of going a little beyond all that and having a cron job on each machine that runs every 15 minutes and dumps out to a published text file the CPU usage of the Core (so you know it is really running) the current protein and completed amount.

Bousozoku's idea of a monitor on each client that pushes data to a master every XX minutes is great. That way setup would be cake, you just install the monitor and tell it what the IP of the master is.
I bet everyone with more than 3 machines would love to have something like this.

Now a plugin for the XServe Server Status montior would be even more ideal. Heh.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 25, 2003, 04:42 PM
 
Ok, it's all written up. Gives a table output with all monitored clients - no limit on how many. Data shown is the client name (customizable), Status, Protein, Progress, Arrive time, Due time, Last update. It flags clients that have not updated in "too long" (customizable global and per-client) as well as flagging a few other odd conditions.

During debugging, I could not seem to pull any data from the symlinked unitinfo.txt file. There is no 403 error, and permissions on the symlink (and the original file) allow everyone read access. A browser will not load the file through apache -- blank page results. Dropping the symlink on a browser shows the file contents correctly.

Apache config seems to allow following symlinks, and I put it in the user's options file as well, then restarted Apache. No dice. The symlink reads as zero K in an Apache directory listing. Actual file is 142 bytes, symlink itself is 44K. Could this be the problem? Need a little help here.
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
May 25, 2003, 08:29 PM
 
mikkyo:

I'm sorry that I've had my time on something else lately. I will do my best to get the thing working properly as soon as I am able. Perhaps, after the term is closer to under control, I'll have more time.

Thanks for understanding.

reader50:

Thanks for making such good stats and offering to apply them toward this need. I could, and want to, learn a lot from you.
folding@home is good for you.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 25, 2003, 08:52 PM
 
Problems tracked down. Apache does not like Finder aliases. Use unix aliases instead:
ln -s /path/to/file.stupidextension /path/to/new/location/optionalAliasName

Also, I was hitting permissions problems because I was trying to follow a user's Sites symlink into the root user's Desktop space.

ClientCheck v0.1c (3.8 K)

Edit the file for your needs. User-adjust section is at the top, clearly marked. Reference key is provided just below the user-adjust section. There is no limit to how many clients can be tracked.

PHP (Apache really) needs write permission for where ever the data file gets written. Default is the same folder as the script.

Unix symlink each unitinfo.txt file to a place where Apache can reach it on the client boxes (Apache must be running on each client box). Put the ClientCheck file itself on a box with Apache and PHP both running. Hit with browser, reload for fresh info.

bousozoku, kman42 ... just want to say that I don't plan to compete. Consider this a stopgap measure until you guys get around to beefing up your own utilities for our larger farmers. I'll fix any major bugs, but am unlikely to add new features.

If someone wants to mess with the code, send me a copy. Chances are it will be fine with me. We need more people coding on the team.

Edits: 0.1a = bugfix, 0.1b = nicer colortags, 0.1c = display controls
( Last edited by reader50; May 26, 2003 at 03:22 PM. )
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
May 25, 2003, 10:20 PM
 
reader50:

I am constantly aware of your desire to put the team first. If people do not know this, they should know it now. Your statistics displays are quite revered by other teams and I wish that i was so good at doing that sort of thing. We all have our strengths. You have my admiration.
folding@home is good for you.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 26, 2003, 03:12 AM
 
Anyone who downloaded ClientCheck before this post needs to download a fresh copy. I reversed two comparison operators, normally running clients would be reported as backsliding.

This bug did not affect the data file. Just replace the ClientCheck.php file.

Note: if you use this utility to check a number of remote clients scattered across the internet, you will probably need to increase the php runtime limit in the php.ini file. Otherwise the script will time out before checking all 173 of your remote installs.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
May 26, 2003, 04:07 AM
 
reader50: Cool! You rock!
     
kman42
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
May 26, 2003, 10:53 AM
 
Originally posted by reader50:
bousozoku, kman42 ... just want to say that I don't plan to compete. Consider this a stopgap measure until you guys get around to beefing up your own utilities for our larger farmers. I'll fix any major bugs, but am unlikely to add new features.
Hey, the more people working on diverse solutions, the better as far as I'm concerned. I'm just in it for the Cocoa practice and to help out the community if anyone finds my little app useful. That's why I put up the source code for download. I'd love to see someone with more Cocoa skills run with it and make it ultra cool. That being said, I am planning to work on the Rendezvous stuff today and on through the week.

kman
     
kman42
Professional Poster
Join Date: Sep 2000
Location: San Francisco
Status: Offline
Reply With Quote
May 26, 2003, 11:49 AM
 
Hey bousozoku,
How about writing your networking code to use Rendezvous, so that our apps can interoperate? Since your app is written in Java and can be run on other platforms, it would be cool if my app could get info from yours and vise versa. We'd have to work out a common set of interface guidelines, but there's not really that much info that needs to be passed. For the basics, all we need is the info in the unitinfo file. Or even more simply, all we'd have to do is pass the directory containing that file.

Anyway, I just thought it would be cool if our apps could talk to one another. Let me know.

kman
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
May 26, 2003, 07:41 PM
 
Originally posted by kman42:
Hey bousozoku,
How about writing your networking code to use Rendezvous, so that our apps can interoperate? Since your app is written in Java and can be run on other platforms, it would be cool if my app could get info from yours and vise versa. We'd have to work out a common set of interface guidelines, but there's not really that much info that needs to be passed. For the basics, all we need is the info in the unitinfo file. Or even more simply, all we'd have to do is pass the directory containing that file.

Anyway, I just thought it would be cool if our apps could talk to one another. Let me know.

kman
I would consider looking at it once there is enough time. I'm not even sure if Apple has created Java wrappers for Rendezvous, but I wouldn't know enough to write them...so far. I've written plenty of wrappers in C++ to hide C but there's a world of difference between Java and C++. <beats head against wall again>
folding@home is good for you.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
May 27, 2003, 08:42 PM
 
So to get reader50s ClientCheck running on OSX Client, one has to
Get PHP
http://us4.php.net/get/php-4.3.1.tar.bz2/from/a/mirror

Once it is expanded, you have to have DeveloperTools installed, open Terminal and do:
cd /wherever the hell you expanded/php-4.3.1
./configure --with-apxs

(Lots of spew for awhile)
then
make
(must have DevTools to have make)
(Lots of spew for awhile)
sudo make install
(Provide your password to let it install)

Edit /etc/httpd/httpd.conf
For those vi savvy
sudo vi /etc/httpd/httpd.conf
Jump to the editing section below.

For normal folks, this file has to be editted as root, so you get to do voodoo in Terminal in order to use a normal text editing program..
Copy the file to your home directory
cp /etc/httpd/httpd.conf ~/
Edit the file in TextEdit
open -e ~/httpd.conf

Editing:
Scroll to the section way down in the file near this comment
# AddType allows you to tweak mime.types without actually editing it, or to
add this under one of the AddType lines there already
AddType application/x-httpd-php .php
Save the file.

If you were using vi, you are done.
If you were using TextEdit you need to copy it back as root in Terminal.
sudo cp ~/httpd.conf /etc/httpd/httpd.conf

Now go to SystemPreferences and Select Sharing and turn off/on Personal Web Sharing to reload the config file you edited.

Now the tricky part.
Apache don't like to share stuff outside the directory it is sharing in.
This is a security feature.
You could turn it off, or run F@H within your Sites directory, or copy the unitinfo.txt file periodically with cron to the ~/Sites directory, which is what I did.
The symlink won't work without allowing apache to follow links outside the Sites Directory.
So I added to my existing crontab file for F@H this line..
0,15,30,45 * * * * cp /Applications/Folding/unitinfo.txt /Users/yourname/Sites/unitinfo.txt
which copies the unitinfo file every 15 minutes from my Applications/Folding directory (where I have the CLUI client installed) to my home/Sites directory, making it available for the ClientCheck program.
If you don't have a crontab already set up, you can make a plain text file in text edit and save it in your F@H (to keep track of) add that line above, call the file something like foldingtab.
To add a cron file for your user do
crontab nameoffile
or to add it to root's crontab so it runs all the time the machine is on
sudo crontab nameoffile

Now stick ClientCheck.php in your Sites folder, edit it to point to your clients. It will look something like
$Client[$n]['Address'] = "http://www.your.com/~yourname/unitinfo.txt";
$Client[$n]['Name'] = "MyClient1";

Duplicate the whole section as instructed in the ClientCheck.php file and add our other client URLs, names.
Save and hit it in your favorite web browser.
http://www.your.com/~yourname/ClientCheck.php

Whew..
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
May 27, 2003, 08:44 PM
 
Probably ought to have that in another thread instead of continuing to pollute this one with other stuff.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 27, 2003, 08:56 PM
 
It should not be that hard. You do *not* have to compile PHP to get it running on OSX. Apple supplies a basic PHP install already, though it's probably installed by the Dev Tools disk. The ClientCheck utility does not need the most advanced or latest PHP, Apple's basic version would be fine.

If you want a jazzier PHP install with GD and other functions, download a precompiled install pkg from:
http://www.entropy.ch/software/macosx/php/
Detailed instructions are included on the page.

Apple leaves the PHP install turned off, just turn Apache ("websharing") off in System Preferences. Then edit the Apache config file at /private/etc/httpd/httpd.conf to uncomment the php Addtype lines - which should already be there. I use BBEdit Lite while logged in as the root user. Save, and turn Apache back on.

I chose to let Apache follow symlinks on my system, those with constant internet connections and a fixed IP may not want to allow that.

I'd wondered why mikkyo wasn't posting any feedback on the utility. Never dreamed he was having so much trouble getting it going.
-ps cron it hourly for the most current and accurate update times.
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
May 28, 2003, 01:27 AM
 
PHP is definatley part of OS X Server.
In OS X Client, in httpd.conf there are 2 commented out php lines:
#AddModule mod_php4.c
and
#LoadModule php4_module libexec/httpd/libphp4.so

Uncommenting those, and adding this
AddType application/x-httpd-php .php

then stopping the web sharing and restarting via System Preferences yields ClientCheck.php loading as a text file.
I checked and yes there is a libphp4.so in /usr/libexec/httpd.
Hrmmm...

If you
sudo apachectl stop
then
sudo apachectl start

ClientCheck.php loads as expected.
This was the source of all my problems.
The System Preferences GUI method of turning on and off Apache may not actually reload the config file. Maybe waiting 5 minutes in between would..
     
mikkyo
Senior User
Join Date: Feb 2002
Location: Silly Valley, Ca
Status: Offline
Reply With Quote
May 28, 2003, 01:44 AM
 
Originally posted by reader50:
I'd wondered why mikkyo wasn't posting any feedback on the utility. Never dreamed he was having so much trouble getting it going.
-ps cron it hourly for the most current and accurate update times.
Heh. Now you know.
Why the hell is PHP provided but not on by default??
So are you saying hourly unitinfo.txt copies would be more accurate than 15 minute copies for some reason?

BTW, since I'm using cron to do the copy, I figure I might as well append the FAHCore.xx CPU time to the file and then modify ClientCheck to pick up that too.
That way you can see if no FACore is running, which usually means something is screwed.
     
reader50
Administrator
Join Date: Jun 2000
Location: California
Status: Offline
Reply With Quote
May 28, 2003, 03:04 AM
 
Hourly was what came to mind first, vs checking manually a few times a day. Cronning it causes the datafile to note more accurately when the client has updated. If you check manually for the first time in 6 hours, the client will have updated "now" because that is when ClientCheck caught it updating. But the client could have frozen 4 hours ago, after updating one time. 15 minute checks would be very accurate.

I'm following your suggestion on the dedicated thread. (hint)

Edit: This thread has been linked to, but the ClientCheck version last posted here is obsolete and no longer on the server. The dedicated thread with latest version link is here.
( Last edited by reader50; Dec 25, 2003 at 04:01 PM. )
     
bousozoku  (op)
Forum Regular
Join Date: May 2001
Location: Oviedo, Floriduh USA
Status: Offline
Reply With Quote
Aug 9, 2003, 02:53 PM
 
I've updated again to correct some problems when switching proteins. I've also changed it to auto-update on startup. Percentages display in the title, so you can see them when the application is minimised, but I'm still working on implementing the timer.
folding@home is good for you.
     
iMacfan
Senior User
Join Date: Sep 2000
Location: UK
Status: Offline
Reply With Quote
Aug 10, 2003, 05:42 AM
 
Hi,

Great idea, only first time I loaded it, I couldn't find the log file, so thought that I would do it later. I quitted, found the log file, but now when I load your app, I get a menu title (like I can see Safari in bold right now), but no window. Any ideas?

Thanks,

David
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:51 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,