1,626,312 th visitor since 2017.2.1 ( Today : 625 )
Computer ???
No. 272
Name. swindler
Subject. snmp memory사용량 script
Main Cate. Linux
Sub Cate.
Date. 2007-11-28 14:53
Hit. 2865 (211.36.27.8)
File.
tot=`cat /proc/meminfo | grep '^MemTotal' | awk '{print $2}'`
free=`cat /proc/meminfo | grep '^MemFree' | awk '{print $2}'`
buffer=`cat /proc/meminfo | grep '^Buffers' | awk '{print $2}'`
cached=`cat /proc/meminfo | grep '^Cached' | awk '{print $2}'`

#echo $tot
#echo $free
#echo $buffer
#echo $cached

used=$(($tot-$free-$buffer-$cached))
used=$(($used*1024))

echo $used
echo $used

[바로가기 링크] : http://coolx.net/cboard/computer/272



Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)