Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Actively monitor space

by ww (Bishop)
on Aug 07, 2012 at 13:48 UTC ( #985989=note: print w/ replies, xml ) Need Help??


in reply to Actively monitor space

Clumsy pseudo-pseudo-code... from one who doesn't work with clusters... nor have any ken of their peculiarities, but could something like this conceivably work?

# monitor disk space in a cluster # create @list_machines -- which do you need to check my $i = 0; # create counter (flag) for $_(@list machines) { my $machine = $_; # select machine # This and the next line == +the WEAK POINTS? # log in/open $machine # if necessary, my @dirs = selection of dirs to check for change my $dir (@dirs) { readdir the dirs in preceding line; # dir /as for win + to obtain dir of all files in all subdirs write dir results to local RAM file, $dir.$machine.$i $i++; if ( $i == 2 ) { $i = 0; } next; } } sleep (some amount of time); for $_(@list machines) { my $machine = $_; # select machine if ( (exists $dir.$machine.0) && (exists $dir.$machine.1) ) { compare those two files (diff, df, pure-perl list comparison) ...PROFIT... } }


Comment on Re: Actively monitor space
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985989]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-08-23 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (172 votes), past polls