http://www.perlmonks.org?node_id=985989


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