BLOG main image
분류 전체보기 (65)
Ubuntu (6)
Laravel (2)
VMware (2)
Unix (2)
OpenSuse (2)
수영 (51)
Visitors up to today!
Today hit, Yesterday hit
daisy rss
tistory 티스토리 가입하기!
'snmp'에 해당되는 글 2건
2010. 8. 25. 15:43
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

'Unix' 카테고리의 다른 글

Find SNMP MIB  (0) 2010.08.25
2010. 8. 25. 15:10

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

'Unix' 카테고리의 다른 글

SNMP CPU  (0) 2010.08.25
prev"" #1 next