ASNMTAP
view release on metacpan or search on metacpan
applications/htmlroot/cgi-bin/admin/generateConfig.pl view on Meta::CPAN
$sth->bind_columns( \$test) or $rv = error_trap_DBI(*STDOUT, "Cannot sth->bind_columns: $sql", $debug, $pagedir, $pageset, $htmlTitle, $subTitle, -1, '', $sessionID) if $rv;
if ( $rv ) {
if ( $sth->rows ) {
while( $sth->fetch() ) {
if (! -e "$PLUGINPATH/$test") {
$actionItem = "<a href=\"$urlWithAccessParameters&action=updateView&plugin=$test&todo=edit\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{edit}\" title=\"Edit Plugin\" alt=\"Edit Plugin\" border=\"0\"></a>";
$matchingWarnings .= "<tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>$test</td><td>plugin configuration without plugin uploaded</td><td align=\"center\">$actionItem</td></tr>";
$countWarnings++;
} else {
my $sb = stat("$PLUGINPATH/$test");
unless ( $sb->mode == 33261 or $sb->mode == 33256 ) { # 0755 = 33261 & 0750 = 33256
$actionItem = "<a href=\"$urlWithAccessParameters&action=updateView&plugin=$test&todo=maintenance\" target=\"_blank\"><img src=\"$IMAGESURL/$ICONSRECORD{maintenance}\" title=\"Rights Plugin\" alt=\"Rights Plugin\" border=\...
$matchingErrors .= "<tr bgcolor=\"$COLORSTABLE{NOBLOCK}\"><td>$test</td><td>plugin configuration with plugin uploaded but without wanted excecution rights</td><td align=\"center\">$actionItem</td></tr>";
$countErrors++;
}
}
}
}
plugins/nagios/check_fs-stat.pl view on Meta::CPAN
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
my $now = time();
use Fcntl ':mode';
my @files = glob ("$directory/$wildcard");
my ($nDirectories, $wDirectories, $cDirectories, $nFiles, $wFiles, $cFiles) = (0, 0, 0, 0, 0, 0);
foreach (@files){
my ($mode, $mtime) = ( stat($_) )[2, 10];
my $dTime = ( defined $mtime ) ? $now - $mtime : 0;
if ( $type =~ /^[FB]$/ and S_ISREG($mode) ) {
$nFiles++;
$wFiles++ if ( $dTime > $wAge );
$cFiles++ if ( $dTime > $cAge );
print "file : $_, $now, $mtime, $dTime, $mode, $nFiles, $wFiles, $cFiles\n" if ( $debug );
} elsif ( $type =~ /^[DB]$/ and S_ISDIR($mode) ) {
$nDirectories++;
$wDirectories++ if ( $dTime > $wAge );
plugins/templates/check_file-counter.pl view on Meta::CPAN
my $wOffset = DAY * $wDays if (defined $wDays);
my $cOffset = DAY * $cDays if (defined $cDays);
my ($nFiles, $cTime, $cFiles, $wFiles) = (0, time(), 0 , 0);
my @files = glob ("$parameters/*");
use Fcntl ':mode';
foreach (@files){
my ($mode, $ctime) = ( stat($_) )[2,10];
my $dTime = $cTime - $ctime;
if ( S_ISREG($mode) ) {
$nFiles++;
$wFiles++ if ( defined $wOffset and $dTime > $wOffset );
$cFiles++ if ( defined $cOffset and $dTime > $cOffset );
}
};
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
( run in 1.108 second using v1.01-cache-2.11-cpan-49f99fa48dc )