Privet, Polzvam debian testing. Iskam da izvleka informacia cherez shell comanda. Po princip stava no zabeiazvam che izhoda ot komandata e ograni4en po golemina i po goliamata chast se izriazva. Eto kakvo slagam v snmpd.conf
exec .1.3.6.1.4.1.2021.50 shelltest /root/hashlimit.pl hashlimit prosto paravi ps aux Eto rezultata monitor:~# snmpwalk -v 1 -c xxxxx 192.168.0.1 .1.3.6.1.4.1.2021.50 UCD-SNMP-MIB::ucdavis.50.1.1 = INTEGER: 1 UCD-SNMP-MIB::ucdavis.50.2.1 = STRING: "shelltest" UCD-SNMP-MIB::ucdavis.50.3.1 = STRING: "/root/hashlimit.pl" UCD-SNMP-MIB::ucdavis.50.100.1 = INTEGER: 0 UCD-SNMP-MIB::ucdavis.50.101.1 = STRING: "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND" UCD-SNMP-MIB::ucdavis.50.101.2 = STRING: "root 1 0.0 0.1 1580 516 ? S Mar19 0:00 init [2] " UCD-SNMP-MIB::ucdavis.50.101.3 = STRING: "root 2 0.0 0.0 0 0 ? S Mar19 0:00 [migration/0]" UCD-SNMP-MIB::ucdavis.50.101.4 = STRING: "root 3 0.0 0.0 0 0 ? SN Mar19 0:00 [ksoftirqd/0]" UCD-SNMP-MIB::ucdavis.50.101.5 = STRING: "root 4 0.0 0.0 0 0 ? S< Mar19 0:00 [events/0]" UCD-SNMP-MIB::ucdavis.50.101.6 = STRING: "root 5 0.0 0.0 0 0 ? S< Mar19 0:00 [khelper]" UCD-SNMP-MIB::ucdavis.50.101.7 = STRING: "root 10 0.0 0.0 0 0 ? S< Mar19 0:00 [kthread]" UCD-SNMP-MIB::ucdavis.50.101.8 = STRING: "root 18 0.0 0.0 0 0 ? S< Mar19 0:00 [kacpid]" UCD-SNMP-MIB::ucdavis.50.101.9 = STRING: "root 93 0.0 0.0 0 0 ? S< Mar19 0:00 [kblockd/0]" UCD-SNMP-MIB::ucdavis.50.101.10 = STRING: "root 146 0.0 0.0 0 0 ? S Mar19 0:00 [pdflush]" UCD-SNMP-MIB::ucdavis.50.101.11 = STRING: "root 147 0.0 0.0 0 0 ? S Mar19 0:00 [pdflush]" UCD-SNMP-MIB::ucdavis.50.101.12 = STRING: "root 149 0.0 0.0 0 0 ? S< Mar19 0:00 [aio/0]" UCD-SNMP-MIB::ucdavis.50.101.13 = STRING: "root 148 0.0 0.0 0 0 ? S Mar19 0:00 [kswapd0]" UCD-SNMP-MIB::ucdavis.50.101.14 = STRING: "root 740 0.0 0.0 0 0 ? S Mar19 0:00" UCD-SNMP-MIB::ucdavis.50.102.1 = INTEGER: 0 UCD-SNMP-MIB::ucdavis.50.103.1 = "" Vigda se che izhoda e izriazan po golemina. Kak da uvelicha goleminata na varnatata informacia ? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ============================================================================ A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers). http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html ============================================================================