'snmp'에 해당되는 글 2건
2010. 8. 25. 15:43
[Unix]
Linux Total CPU idle
% snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.11.11.0
% snmpwalk -v 2c -c public localhost ssCpuIdle.0
Linux Total CPU Usage
% snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.11.11.0 | awk '{print 100-$4}'
% snmpwalk -v 2c -c public localhost ssCpuIdle.0 | awk '{print 100-$4}'
Linux Total CPU Usage For mrtg target
% snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.11.11.0 | awk '{print 100-$4 "\n" 100-$4}'
Invididual CPU Usage (Windows 2003, Linux)
% snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.25.3.3.1.2
% snmpwalk -v 2c -c public localhost hrProcessorLoad
Total CPU Usage (Windows 2003, Linux)
% snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.25.3.3.1.2 | awk 'BEGIN {sum = 0;}; {sum += $4} ; END {printf("%d", sum/4)}'
Total CPU Usage For mrtg target (Windows 2003, Linux)
% snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.25.3.3.1.2 | awk 'BEGIN {sum = 0;}; {sum += $4} ; END {printf("%d\n%d\n", sum/4, sum/4)}'
Get all mib value
% snmpwalk -v 2c -c public localhost > FILENAME.txt
% snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.11.11.0
% snmpwalk -v 2c -c public localhost ssCpuIdle.0
Linux Total CPU Usage
% snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.11.11.0 | awk '{print 100-$4}'
% snmpwalk -v 2c -c public localhost ssCpuIdle.0 | awk '{print 100-$4}'
Linux Total CPU Usage For mrtg target
% snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.11.11.0 | awk '{print 100-$4 "\n" 100-$4}'
Invididual CPU Usage (Windows 2003, Linux)
% snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.25.3.3.1.2
% snmpwalk -v 2c -c public localhost hrProcessorLoad
Total CPU Usage (Windows 2003, Linux)
% snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.25.3.3.1.2 | awk 'BEGIN {sum = 0;}; {sum += $4} ; END {printf("%d", sum/4)}'
Total CPU Usage For mrtg target (Windows 2003, Linux)
% snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.25.3.3.1.2 | awk 'BEGIN {sum = 0;}; {sum += $4} ; END {printf("%d\n%d\n", sum/4, sum/4)}'
Get all mib value
% snmpwalk -v 2c -c public localhost > FILENAME.txt
'Unix' 카테고리의 다른 글
Find SNMP MIB (0) | 2010.08.25 |
---|
2010. 8. 25. 15:10
[Unix]
Get all mib
% snmpwalk -v 2c -c public localhost > all_mib.txt
View all_mib.txt and find to need mib value
Example
In all_mib.txt FILE
HOST-RESOURCES-MIB::hrProcessorLoad.768 = INTEGER: 1
% snmpwalk -v 2c -c public localhost hrProcessorLoad.768
Total CPU idle in Linux (Using net-snmp)
% snmpwalk -v 2c -c public localhost 1.3.6.1.4.1.2021.11.11.0