Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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... } }

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2016-06-27 10:30 GMT
Find Nodes?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...

    Results (337 votes). Check out past polls.