[Xymon] hpux-meminfo.c, modified ksh script.
Jason Fredricksen
jasonajfredricksen at gmail.com
Thu Mar 10 22:07:00 CET 2011
Hello,
Another way to do it via top:
#!/usr/bin/ksh
# 10 DEC 2010 Daniel Grahek
# This script properly calculates memory values on HP-UX 11iv3 Itanium
systems
# This script replaces the binary hpux-meminfo in client/bin directory.
# version 1.0
# Distributed under GPL v2 license.
TMPF=/tmp/`basename $0`.$$
top -d 1 -s 1 -f $TMPF
FREEKB=`grep Memory $TMPF | awk ' { print $8 } ' | tr -d K`
rm $TMPF
FREEREPORT=`echo $FREEKB / 1024 |/usr/bin/bc`
TOTAL=`/usr/sbin/swapinfo |grep ^memory |awk {'print $2'}`
TOTALREPORT=`echo $TOTAL / 1024 |/usr/bin/bc`
echo Total:$TOTALREPORT
echo Free:$FREEREPORT
may be better ways.
Tanks everyone,
Jason F.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20110310/59e63e39/attachment.html>
More information about the Xymon
mailing list