Operating System - HP-UX
1822143 Members
3824 Online
109640 Solutions
New Discussion юеВ

Average memory utilization

 
SOLVED
Go to solution
Vishu
Trusted Contributor

Average memory utilization

Hi,

please help in taking the average memory utilization of HP-UX 11.00 server for one week. As for disk and CPU usage, we can have from sar command. which command we will use for memory.

Thanks
18 REPLIES 18
Sharma Sanjeev
Respected Contributor

Re: Average memory utilization

Hi vishu

The commands sar and vmstat

For example, sample CPU utilisation every 2 seconds for 5 iterations:

sar -u 2 5

or For memory utilisation every 2 seconds for 5 iterations:

vmstat 2 5

look at the avm and free fields

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Michal Kapalka (mikap)
Honored Contributor

Re: Average memory utilization

hi,

use glance or gpm ( gui )

mikap
Vishu
Trusted Contributor

Re: Average memory utilization

Thanks Sanjeev and Michal,

But i dont have the glance installed in my server...

and if vmstat helps, then i need it for one complete week. By anyway, i can add it to cron or any other way.

Thanks
Michal Kapalka (mikap)
Honored Contributor

Re: Average memory utilization

hi,

i don't like top but in some cases could be used.

maybe the top will help you.

mikap
Steven E. Protter
Exalted Contributor

Re: Average memory utilization

Shalom,

the sar commands will work.

This script will give you a complete performance snapshot using sar that will meet your needs:

http://www.hpux.ws/?p=6

No cost uses sar

production code.

Glance is available on your OS CD for 60 day evaluation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vishu
Trusted Contributor

Re: Average memory utilization

in top output, i found following line as memory


Memory: 772800K (271340K) real, 585612K (233832K) virtual, 669856K free Page# 1/15

can you please tell me in detail, what each field is showing. My server RAM is 4096MB, but i have not seen anything in GB in this output.

Plz suggest.
James R. Ferguson
Acclaimed Contributor

Re: Average memory utilization

Hi Vishu:

On of the "best" tools for doing what you want to do is 'glance' and 'measureware'. The reason is that 'glance' is architected to "understand" the HP-UX kernel. 'top' and 'sar' are more generic UNIX tools. With 'glance'/'measureware' you can collect and graph long term metrics,

Regards!

...JRF...
Vishu
Trusted Contributor

Re: Average memory utilization

Thanks James,

but i am trying with glance too on one server and trying to extract the data for today, but it is replying with the error :-

# ./extract -xp -r /tmp/moni -g -b today 14:00 -e today 15:00 -f stdout


Unable to read record from logfile, size returned = 0
Unable to read record from logfile, size returned = 0
Memory fault(coredump)

Plz suggest.
Nido
Trusted Contributor

Re: Average memory utilization

Hello Vishu,

>>>>Unable to read record from logfile, size returned = 0
>>>>Memory fault(coredump)

Check the status of measureware daemons:
#mwa status

Check the log files in:
/var/opt/perf/datafiles/log*

if its showing zero in size; try restarting mwa:

#mwa stop ; mwa start

Let me know the outcome.

Cheers!!

" Let Villagers Be Happy!! "
Vishu
Trusted Contributor

Re: Average memory utilization

Well Nido,

Here are the outputs of the commands :-

root # mwa status
MeasureWare scope status:
WARNING: scopeux is not active (MWA data collector)

MeasureWare background daemon status:
(Should always be running when the system is up)
Running ttd (Transaction Tracker daemon) pid 1372

MeasureWare server status:
WARNING: alarmgen is not active (alarm generator)
WARNING: agdbserver is not active (alarm database server)
Running perflbd (location broker) pid 28562

The following data sources have running repository servers:
PID DATA SOURCE
Running rep_server 29803 SCOPE
root #


root # cd /var/opt/perf/datafiles
root # ll log*
-rw-r--r-- 1 root root 3348296 Jul 1 18:55 logappl
-rw-r--r-- 1 root root 10431046 Jul 1 18:55 logdev
-rw-r--r-- 1 root root 1391798 Jul 1 18:55 logglob
-rw-r--r-- 1 root root 3192 Jul 1 18:55 logindx
-rw-r--r-- 1 root root 20882164 Jul 1 18:55 logproc
-rw-r--r-- 1 root root 3954348 Jul 1 18:55 logtran
root # date
Wed Jul 1 19:18:37 CDT 2009
root #

root # ps -ef | grep -i mwa
root 4611 4284 0 19:19:33 pts/tb 0:00 grep -i mwa
root #


One query, i grep for mwa process, but did not find any. then how come the log files are updated till 1st July. Plz put some light on it.

thanks
Nido
Trusted Contributor

Re: Average memory utilization

Hi Vishu,

>>>>WARNING: scopeux is not active (MWA data collector)
>>>>WARNING: alarmgen is not active (alarm generator)
>>>>WARNING: agdbserver is not active (alarm database server)

Try restarting mwa:
mwa stop ; mwa start

If its not solving the problem:
Then first copy all log files to different location and empty the logs.

ll /var/opt/perf/datafiles/log*

Try restarting mwa again:

Let me know hows the extract output.

Good Luck!!
" Let Villagers Be Happy!! "
Karl oliver
Frequent Advisor

Re: Average memory utilization

hi Vishu
I use a utility
memdetail . I think i got the utility from this forum. sample output below
You could put this in crontab .
The output from this is the same as glance provides
memdetail

Memory Stat total used avail %used
physical 16357.0 11153.1 5203.9 68%
active virtual 5279.8 4959.4 320.4 94%
active real 4438.3 4203.1 235.1 95%
memory swap 16357.0 6995.2 9361.8 43%
device swap 16384.0 4662.4 11721.6 28%
Vishu
Trusted Contributor

Re: Average memory utilization

Karl,

Can you please provide the full path to this memdetail utility. and the syntax to use it.

Thanks
Karl oliver
Frequent Advisor

Re: Average memory utilization

sorry I dont know location of code . But someone on this forum will.
Maybe you could open a thred asking this ?
Karl
Vishu
Trusted Contributor

Re: Average memory utilization


Can anyone help in getting this memdetail utility and usage syntax, which Karl is telling about.

Thanks
Dennis Handly
Acclaimed Contributor
Solution

Re: Average memory utilization

>Can anyone help in getting this memdetail?

Using a forums search finds Geoff's reply:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1179723
Vishu
Trusted Contributor

Re: Average memory utilization

Thanks Dennis...

i got what is required... Really helpful..full points.

Thanks everyone for your inputs on it.
Vishu
Trusted Contributor

Re: Average memory utilization

closing the thread.

Thanks