So the bad news is that swapinfo (on HP-UX 11iv3 ia64 at least) does not take into account shared memory space memory utilization.
We orginally tested the script on some idle servers with no databases running at the time and it looked good there. After starting up a bunch of oracle databases the output did not look right. Further investigation showed that swapinfo was reporting an incomplete picture of memory, we compared with kmeminfo and glance. Back to the drawing board for scripts.
~~Earl
-----Original Message----- From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Williams, Doug (Consultant-RIC) Sent: Thursday, March 03, 2011 7:09 AM To: henrik at hswn.dk; Jason Fredricksen Cc: xymon at xymon.com Subject: Re: [Xymon] hpux-meminfo.c patch
./mytest.sh
Total:49122 Free:42732
cat mytest.sh
#!/usr/bin/sh
FREE=/usr/sbin/swapinfo |grep ^memory |awk {'print $4'}
FREEREPORT=echo $FREE / 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
uname -r
B.11.23
swapinfo -ta
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 1048576 0 1038336 0% 0 - 1 /dev/vg00/lvol2 dev 83853312 0 83852288 0% 0 - 0 /dev/vgev08_swap_r0_1/lvswap reserve - 3775900 -3775900 memory 50301020 6543124 43757896 13% total 135202908 10319024 124872620 8% - 0 -
swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME dev 1024 0 1014 0% 0 - 1 /dev/vg00/lvol2 dev 81888 0 81887 0% 0 - 0 /dev/vgev08_swap_r0_1/lvswap reserve - 3686 -3686 memory 49122 6390 42732 13% total 132034 10076 121947 8% - 0 -
-----Original Message----- From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of henrik at hswn.dk Sent: Thursday, March 03, 2011 9:00 AM To: Jason Fredricksen Cc: xymon at xymon.com Subject: Re: [Xymon] hpux-meminfo.c patch
Hi Jason,
On Tue, 22 Feb 2011 08:15:14 -0600, Jason Fredricksen <jasonajfredricksen at gmail.com> wrote:
This patch for hpux-meminfo.c may help due to 11iv3 page sizes 4096 ,8192 ,16384 ,65536.
I was sent another solution back in December which replaces the hpux-meminfo utility with a bit of shell scripting:
FREE=/usr/sbin/swapinfo |grep ^memory |awk {'print $4'}
FREEREPORT=echo $FREE / 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
(the original message is http://lists.xymon.com/archive/2010-December/030100.html from Earl Flack)
Can you confirm if this shell script works OK for you ? I would much rather use standard shell-tools than a custom C program that I have difficulty supporting.
Also, anyone with access to older HP/UX versions ? I would be most interested to hear if Earl's shell version to get the memory info works on other HP/UX versions as well.
Regards, Henrik
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
NOTICE: This e-mail, including attachments, contains information that may be confidential, protected by the attorney/client or other privileges, or exempt from disclosure under applicable law. Further, this e-mail may contain information that is proprietary and/or constitutes a trade secret. This e-mail, including attachments, constitutes non-public information intended to be conveyed only to the designated recipient of this communication, please be advised that any disclosure, dissemination, distribution, copying, or other use of this communication or any attached document is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail and promptly destroy all electronic and printed copies of this communication and attached documents.