Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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?

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 romping around the Monastery: (16)
As of 2015-12-01 13:51 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (11 votes), past polls