Tryag File Manager
Home
-
Turbo Force
Current Path :
/
proc
/
self
/
root
/
usr
/
local
/
sysadm
/
bin
/
Upload File :
New :
File
Dir
//proc/self/root/usr/local/sysadm/bin/snmp_libchroot.pl
#!/usr/bin/perl # Set this to your base OID: $baseOid = '.1.3.6.1.4.1.10025.3.3'; $reqMethod = $ARGV[0]; $reqOid = $ARGV[1]; # Set all vars to 0. my ($jails) = (0); # See how many jails there are $jails = `ls /chroot/jails | wc -l`; # Actually print the SNMP data if ($reqMethod eq '-n') { # GETNEXT if ( $reqOid eq $baseOid ) { print "$baseOid.0\ninteger\n$jails\n"; } } elsif ( $reqMethod eq '-g' ) { #GET if ( $reqOid eq $baseOid || $reqOid eq $baseOid.".0" ) { print "$baseOid.0\ninteger\n$jails\n"; } } # Print nothing if the OID didn't match.