1833494 Members
2616 Online
110052 Solutions
New Discussion

Re: top command info

 
Ngoh Chean Siung
Super Advisor

top command info

Hi,

When I execute command "top", I can see below line

Memory: 933436K (752524K) real, 1550420K (1276052K) virtual, 385080K free Page# 1/13

1) How to interpret the above info?
2) How to monitor daily performance such as CPU usage, memory usage, disk utilization and etc?
3) Where I can the guide to use glance plus? It quite hard for me to interpret the info from glance plus.

regards.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: top command info

I would not use top to monitor this stuff. I'm attaching some scripts I got from HP and fixed up a bit to monitor this stuff.

looks like about 1 GB RAM 750 MB used.

Looks like about 1.5 GB swap 1.25 GB reserved, 385 MB left in swap.

All in all a pretty well utilized system.

The man page for top and glance does explain the output.

If you have X the graphical gpm data is easier to interpret.
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
Sridhar Bhaskarla
Honored Contributor

Re: top command info

Hi,

It says 933436K of real memory has been requested out of which 752524 was active during the last interval. Similarly 1550420K virtual memory has been in use out of which (1276052K was active during the last interval. You have 385080K of memory free on the system. HP system works in the realm of virtual memory and on-demand paging. When a process starts, actually it is not going to completely read into memory. Instead a virtual memory space is allocated and the pages that are required to be run only are brought into the memory. Real memory is actually the physical memory occupied by the processes. Virtual memory includes the actual physical memory pages used by the processes + the pages sitting on the disk (that are yet to be used or the ones that have been paged out).

Best tool to use is Glance+ pak. It includes glance, gpm (graphical version of glance), measureware (that collects historical information that can be later extracted using 'extract' command) etc.,. It will make your life easy as it has got extensive online help.

If you don't have Glance, 'sar' can help you too for CPU, disk stats. 'vmstat' is for memory usage.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Kyri Pilavakis
Frequent Advisor

Re: top command info

I use the TOP command as a good initial 'start point'. Once you see a problem there then you start using other commands like SAR for cpu utilization,memory and disk utilization. Also vmstat for more memory checks.
Bosses don't undestand..HP does
Ngoh Chean Siung
Super Advisor

Re: top command info

Hi,

Our server physical memory is 2GB.

Memory: 933436K (752524K) real
1) It means that total real memory is 933436K and 752524K real memory is in use. Am I right?

1550420K (1276052K) virtual
2) It means that total virtual memory is 1550420K and 1276052K virtual memory is in use. Am I right?

385080K free
3) What is this free memory for? real or virtual?

4) Is the physical memory (2GB) consists of the total real memory plus total virtual memory? If not, how to calculate?

5) What is the different among real memory, virtual memory & swap?

regards.


Sridhar Bhaskarla
Honored Contributor

Re: top command info

You will need to read 'memory management white paper' in docs.hp.com.

I will try to give you a crude example. This is only to give you some idea but not really to compare bits and pieces. Let's take a hypothetical kitchen. Say I can cook different pies in the same pan. I have some mysterious guests (different guests smell (no eating) different pie) and I am going to always serve them fresh. The menu is apple pie, banana pie and orange pie. My refrigator can hold 100 fruits. The guests may consume upto 20 apples, 10 potatoes and 10 oranges at a given notice. I have a pan and a cuttingboard together can only hold 5 fruits.

First come apple and banana guests with apple guest being hungry to consume a pie worth two apples. Remember that he is eligible to eat all 10 apples. But I take only two apples and a banana and start processing two apples with the banana on the cuttingboard as apple takes precedence. I also set aside a spare empty container (and keep watching it comparing with what I have in the processing area) in case if 'pan+cuttingboard' overflows, I can transfer some contents to it.

In the above, the capacity of the refrigirator is total virtual memory you can have on the box. I have a total of 40 fruits requested. This is the virtual memory requested by the guests (processes). My pan+cutting board is the physical memory. I took out 3 fruits into the processing area. That's my real memory requested. I was processing two apples during the last interval and that's the real memory used. Spare container is the 'swap' area.

Since I am so good at taking care of the guests based on their priorities, now the apple guest is not hungry anymore. So, the apple pieces are transferred to the cutting board and the banana pieces are brought into pan. But the scene changes and the orange guest enters now that is very hungry worth three oranges. I already have three fruits in the processing area and it is only limited to five fruits. So, I take out one apple which is on the cutting board (idle) and transfer it to the spare container and bring three oranges into the processing area from the refrigirator. Voila..My apple pieces got paged out. Now if the apple guest asks me to get him back the old pie he smelt, I have to move either banana or the orange whomsoever is not too desperate now into the spare container and get the old apple into the pan.

There is a relation between the spare container and the refrigirator. Though the fridge can hold 100 fruits, I am limited to process only upto the capacity of the spare container because I can't really have my processing area and the spare pan overflowingn at the same time.

That's how I see it. Remember the above example is only to give a very raw idea and does not represent the memory management 100%. Some may not even make sense. If it adds to your confusion, simply ignore it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try