Operating System - HP-UX
1753797 Members
7630 Online
108799 Solutions
New Discussion юеВ

Re: How can I get these information?

 
SOLVED
Go to solution
Livia
Advisor

How can I get these information?

Hi,
I have two questions about "sar"

SYNOPSIS
sar [-ubdycwaqvmAMPS] [-p psetid] [-o file] t [n]
sar [-ubdycwaqvmAMPS] [-p psetid] [-s time] [-e time] [-i sec] [-f
file]

1. I can use sar -p / sar -g on Solaris and sar -B on Linux to get pages page-in / pages page-out information.
However, on HP-UX, sar does not have -p/g/B parameter.
How can I get pages page-in / pages page-out information on HP-UX?


2. I can use sar -r -f to get the free memory in the past on Linux/Solaris.
But HP-UX does not support this parameter to sar.
How can I get free memory information on HP-UX?

P.S. Using
vmstat 1 2 | tail -1 | awk '{printf "%d\n", ($5*4)}'
output to a file in cron job is probably a solution to this. Is there any other solutions?
6 REPLIES 6
whiteknight
Honored Contributor
Solution

Re: How can I get these information?


Hi Livia,

1) use Glance tool is the best solution to look at your KB Page IN/ KB Page Out

2) How to get free memory information on hpux?

Again use Glance tool

Glance -> Memory Report (at the bottom, left hand side will show Free memory)

See my attachment

WK

Please assign points
Problem never ends, you must know how to fix it
Livia
Advisor

Re: How can I get these information?

Thanks whiteknight.

But I need to get historical information. (I usually use sar to get information of a whole month from /var/adm/sa/sadd) It seems glance only provide information about current status ?

So I have to run glance in cron job?
whiteknight
Honored Contributor

Re: How can I get these information?

hi Livia,


yes you can. But your need to use glance via cron

The following is an sample script:

#!/usr/bin/ksh
export TERM=hp
export PATH=$PATH:/opt/perf/bin
/opt/perf/bin/glance -adviser_only >/tmp/gl.log 2>/dev/null &
exit 0

Now schedule and launch the above script via cron.

cd /opt/perf/paperdocs/C
# ls
GP-install.pdf concepts.pdf gpinst.pdf metrics.txt
adviser.pdf gp-metrics.txt metrics.pdf

=> you can refer to this adviser.pdf to learn more.

WK

Please assign points

Problem never ends, you must know how to fix it
Bill Hassell
Honored Contributor

Re: How can I get these information?

vmstat provides page out data (the po column) and also free memory stats. But like most flavors of Unix, free memory is a very poor measurement of usage since using all of RAM is a good thing as long as the page out rate is in the single digits (ie, 0-9).

Since you have Glance, you probably have Measureware (try: mwa status) which automatically keeps many days of logs on more than 200 measurements. If you look at the /ope/perf/paperdocs directory you'll see the documentation on mwa and how to use the extract command to get all the stats you will ever need.


Bill Hassell, sysadmin
Livia
Advisor

Re: How can I get these information?

Thanks, whiteknight. It works!

To Bill Hassel:
Seems I do not have "Measureware"......anyway, thanks for your reply :)
Livia
Advisor

Re: How can I get these information?

use glance and cron instead of sar
http://www.hp.com.tw/ssn/unix/0702/unix070203.asp