Operating System - HP-UX
1753781 Members
7397 Online
108799 Solutions
New Discussion юеВ

Interpretation of "TOP" command

 
SOLVED
Go to solution
Shahbaz_1
Regular Advisor

Interpretation of "TOP" command

Hi Friends,
Please give your inputs, to understand all the parts of TOP command,

e.g The Time columns shows the process running time in hours or minutes etc

Thanks in Adv
Regards
Shah
Let's share the great thing "THE KNOWLEDGE"
6 REPLIES 6
Michael Tully
Honored Contributor

Re: Interpretation of "TOP" command

Hi,

The man page of top should give you everything you need to know.

# man top

Michael
Anyone for a Mutiny ?
S.K. Chan
Honored Contributor
Solution

Re: Interpretation of "TOP" command

1st line
========
=> System Name
2nd line
========
=> Load averages .. average number of jobs in the run queue over the last 1, 5 and 15 minutes.
3rd line
========
=> Number of processes breakdown.
4th,5th & 6th line (assume 1 CPU)
=================================
=> Breaks down the CPU states in
a) Load = av number of jobs in run queue over the last 1 minute.
b) The rest are breakdown of CPU utilization in %. Example .. % of CPU resource used by USER processes, by SYS, IDLE, and so on.
8th line
========
=> The format looks like this (example)..
Memory: aK (bK) real, cK (dK) virtual, eK free
whereby ..
a=Total PHYSICAL memory dedicated to text,data or stack segments for all processes.
b=Total PHYSICAL memory for runnable processes.
c=Total memory dedicated to text,data or stack segments for all processes. Some of this is paged to disk (ie not all of it is in current physical memory).
d=Total memory for runnable processes.
e=Total PHYSICAL memory which is available.
10th line onwards
=================
=> This is where the man page will help explains what those header means. Do a "man top"
Shahbaz_1
Regular Advisor

Re: Interpretation of "TOP" command

Thanks Michael,

Actually I was bit confused about "TIME" columns. man top says it is number of system and cpu seconds the process has consumed.

But I see one process, which shows 140 under TIME columns, and this process is running since last two days.

And second thing is, "MEMORY", the actual system memory is 6gig and here it shows

Memory: 3971372k (1863872k) real, 4321065k ....


Please help me to understand this.


Regards
Shah
Let's share the great thing "THE KNOWLEDGE"
Michael Tully
Honored Contributor

Re: Interpretation of "TOP" command

The 'TIME' column means the amount of CPU
that that process has consumed, not how
long it has been running.

This will explain the memory confusion.
Your not the only one that is confused.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5bcad08cc06fd511abcd0090277a778c,00.html

This will explain how to get memory.
for HP-UX 11.x systems running on 32 bit architecture:
example:

echo phys_mem_pages/D | adb /stand/vmunix /dev/kmem
phys_mem_pages:
phys_mem_pages: 24576

for HP-UX 11.x systems running on 64 bit architecture:
example:

echo phys_mem_pages/D | adb64 -k /stand/vmunix /dev/mem
phys_mem_pages:
phys_mem_pages: 262144
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: Interpretation of "TOP" command

Here are some other ways to get information on how much memory you have.

# /opt/perf/bin/glance -t

# dmesg

# grep -i physical grep -i physical /var/adm/syslog/OLDsyslog.log

# echo "selclass qualifier memory;info;wait;infolog"|cstm > /tmp/meminfo
Anyone for a Mutiny ?
S.K. Chan
Honored Contributor

Re: Interpretation of "TOP" command

Just to add another point .. memory utilization is better viewed with..

# glance -m

if you have glance installed.