Message boards :
Number crunching :
Is there?....or...I want....!
Message board moderation
Author | Message |
---|---|
Send message Joined: 14 Nov 05 Posts: 32 Credit: 712,132 RAC: 60 |
Is there a Command line interface I could use to periodically scan the LHC@HOME main web page for the absence of a string (such as "Up. Out of Work.) |
Send message Joined: 14 Jul 05 Posts: 275 Credit: 49,291 RAC: 0 |
Is there a Command line interface I could use to periodically scan the LHC@HOME main web page for the absence of a string (such as "Up. Out of Work.) Scraping the complex-layout main web page for that will probably be very painful. How about the XML server_status? |
Send message Joined: 14 Nov 05 Posts: 32 Credit: 712,132 RAC: 60 |
OK - where does that file live? If my machine was an AIX machine with Korn shell, I could just use the LYNX browser, redirect the output into a file and grep for that string. Probably all on one command line (separated by &&'s of course) |
Send message Joined: 14 Nov 05 Posts: 32 Credit: 712,132 RAC: 60 |
Then use CRON to schedule it every 15 minutes... |
Send message Joined: 7 Nov 05 Posts: 19 Credit: 248,179 RAC: 0 |
Assuming you're on some kind of *nix with libxml2 installed: [ `/usr/bin/xmllint http://lhcathome.cern.ch/lhcathome/server_status.php?xml=1 | awk -F\\> '/results_ready_to_send/{print $2}' | sed 's/<.*$//'` -gt 0 ] && (cd $BOINCHome; ./boinc_cmd --project http://lhcathome.cern.ch/lhcathome/ update It's quick and dirty but it should be cronable with a bit of tweaking for your system. HTH |
Send message Joined: 2 Sep 04 Posts: 378 Credit: 10,765 RAC: 0 |
When I played with boinc on knoppix on my old pc, I used to use Boinctop to see what boinc was running, however it doesn't query the servers. You might want to check out the boinc bash script addon listed at http://boinc.berkeley.edu/addons.php I'm not the LHC Alex. Just a number cruncher like everyone else here. |
Send message Joined: 14 Nov 05 Posts: 32 Credit: 712,132 RAC: 60 |
Assuming you're on some kind of *nix with libxml2 installed: Nope - I'm on WINDERS. That's my problem. Thanx anyway |
Send message Joined: 16 Dec 05 Posts: 1 Credit: 11,468 RAC: 0 |
If you have Perl installed this should work: <code> use warnings; use strict; use LWP::Simple; my $url = 'http://lhcathome.cern.ch/lhcathome/'; my $content = get $url or die 'Could not fetch page'; my $re = qr/([^<]+)/; for ( $content =~ m!<h2>Server Status</h2>\\n$re<br />$re<br />!){ print "$_\\n"; } </code> Perl for windows can be downloaded from activestate.com |
©2024 CERN