Operating System - HP-UX
1833738 Members
2409 Online
110063 Solutions
New Discussion

Monitoring of system performances

 
SOLVED
Go to solution

Monitoring of system performances

Hi to all, I'm creating a script to get the CPU load, memory and disk utilization, LAN status, etc. I'm using the commands top, bdf, lanscan for this purpose. Is the real memory utilization already reflected in the output of the top command or are there any other command to use. I've tried to check with vmstat but it seems that the command is not sufficient to check for the memory usage. Are there any command to actually get the free memory at an instant. The script will be added to cron so that it will be processed at least thrice daily.

TIA
8 REPLIES 8
Michael Tully
Honored Contributor

Re: Monitoring of system performances

Have you looked at using glance? glance and measureware allow you to capture all sorts of matrixes not only for monitoring but also reporting. On your apps CD set there is a trial version for 60 days.
Anyone for a Mutiny ?
Tim Adamson_1
Honored Contributor

Re: Monitoring of system performances

Hi,

If you have the latest q4 patch installed, try /usr/contrib/Q4/bin/kmeminfo* files.

Tim.
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.

Re: Monitoring of system performances

Sir, I'm limited only to the commands available in the system. We are not allowed at this time to make some modifications in our server specially to install new software because it is in production. Also, the app CD's you mentioned wasn't turned-over to our group.

I'm particularly interested in the free memory usage. Is there a command to get the actual free memory?

Thanks
Con O'Kelly
Honored Contributor
Solution

Re: Monitoring of system performances

Hi

As Michael said Glance & Measureware are the best tools for gathering historical & realtime performance information.

If you don't have Glance/MWA then look at using sar to capture performance info. You can set it up to run from cron so you are continually gathering performance data.
Add the following entry to cron to gather perf data from sar every 15mins:
0,15,30,45 * * * * /usr/lbin/sa/sa1
Ensure /var/adm/sa directory is created.
See sa1 man page for more details.

vmstat is also good for looking at free memory
For example:
# vmstat 1 2 | tail -1 | awk '{printf "%d MB \n", ($5*4)/1024 }'

This shows free memory on the system in MB.

Cheers
Con
Tim Adamson_1
Honored Contributor

Re: Monitoring of system performances

Hi,

I made a generic statement about the latest q4 patch. Without knowing your OS version it is hard to say which patch delivered the kmeminfo command.

Check in /usr/contrib/Q4/bin. See if you have the kmeminfo. command in there. Then run it. It will give information like this:

Physmem = 32768 Available physical memory:
Freemem = 495 Free physical memory
Used = 32273 Used physical memory:
...

This is providing the free memory you requested! Now its just a matter of determining if the command is there.


Tim.
Yesterday is history, tomorrow is a mystery, today is a gift. That's why it's called the present.

Re: Monitoring of system performances

Hi Con, why did you multiply the value of field 5 to 4?

again, thanks.
Con O'Kelly
Honored Contributor

Re: Monitoring of system performances

Hi

vmstat reports free memory in 4K pages, therefore you need to x4 to get value in KB & then divide by 1024 to get value in MB.

Cheers
Con
Bill Hassell
Honored Contributor

Re: Monitoring of system performances

Memory utilization is not very important in a virtual memory system like HP-UX. The command:

swapinfo -tm

will report some simple memory usage information. What is much more important is whether swap space is being used and from vmstat, the po column indicating how fast pages are being written to the swap area. Memory usage is extremely complex in HP-UX since there are so many components in memory. Things like the buffer cache (which can vary automatically), shared libraries, shared memory, memory mapped files, shared executables, and of course individual programs and also the kernel itself.

When programmers and/or database managers complain about memory, it is usually due to 32bit programs and a lack of understanding the limitations associated with these memory-limited programs. Get a copy of the two white papers: mem_mgt and proc_mgt which are both found in /usr/share/doc (10.x and 11.0 only) and show it to your programmers or DBA's.


Bill Hassell, sysadmin