question about TOP

question about TOP

Post by tvn198 » Sun, 22 Jul 2001 18:00:41



I see alot of mentioning and explaining about the command top but can't
quite figure it out yet ...
here's what my top looks like  ---  please explain it to me - thanks

59 processes: 57 sleeping, 2 running, 0 zombie, 0 stopped
CPU states:  0.5% user,  0.5% system,  0.0% nice, 98.8% idle
Mem:   126328K av,  121940K used,    4388K free,       0K shrd,    6744K buff
Swap:  152576K av,   51376K used,  101200K free                   53932K cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 6735 root      14    0  203M 179M  5164      R     0.3       145.2      12:53 X

For example,  does it mean it is using 121 mb / 128 mb available ram ?
what's buff ? cached ?

And it seems like X is taking 145.2 % of my memory ... however, the
system still run very well ,  I once had 1 X session run for 20 days
straight without having problem .. that makes me more curious about this.

 
 
 

question about TOP

Post by Peter T. Breue » Sun, 22 Jul 2001 18:52:41



> 59 processes: 57 sleeping, 2 running, 0 zombie, 0 stopped
> CPU states:  0.5% user,  0.5% system,  0.0% nice, 98.8% idle
> Mem:   126328K av,  121940K used,    4388K free,       0K shrd,    6744K buff
> Swap:  152576K av,   51376K used,  101200K free                   53932K cached
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
>  6735 root      14    0  203M 179M  5164      R     0.3       145.2      12:53 X
> For example,  does it mean it is using 121 mb / 128 mb available ram ?

It doesn't say that. It says MB, not mb (MegaByte, not millibit).But
what do you mean? I don't see any non-english words in your senetence.
It means that it is using 121MB of the 126MB available. I presume
the remaining 2MB of your 128MB is used by the kernel.

Quote:> what's buff ? cached ?

Buffered. Cached. What is your question? Buffered is on the way out,
cached is on the way in. Both will be discarded if and when the kernel
needs memory for processes.

Quote:> And it seems like X is taking 145.2 % of my memory ... however, the

So? And where do you get that statistic from! Are you summing separate
threads or something? Both you and your mother live in your house, and
I daresay you use a total of 145% of it!

Quote:> system still run very well ,  I once had 1 X session run for 20 days
> straight without having problem .. that makes me more curious about this.

Look .. if you are curious about memory management in linux, then go
and read up on it! The documents in the kernel Documentation directory
might be a good start, but surely you should check the ususal suspects
(the FAQs) first? You'll find many of your questions answered.

Peter

 
 
 

question about TOP

Post by muppe » Sun, 22 Jul 2001 21:38:50


Quote:> For example,  does it mean it is using 121 mb / 128 mb available ram ?
> what's buff ? cached ?

Probably - but you need to carefully define "using". In this case it
probably means "I'm handling this much of it for you". The ~7Mb remaining is
probably core which cannot be messed with.

Quote:> And it seems like X is taking 145.2 % of my memory ... however, the
> system still run very well.

Not a problem - remember you have swap space - probably sat in it's own
partition, happily pretending to be really slow access memory. Memory
management probably loaded up a whole bundle of X, realised you were only
using a small amount of it, and dumped the rest to swap in case you wanted
it later.

Apparently there was a large change in the way memory management is
performed between kernels 2.2.x and 2.4.x - there will be documentation on
it probably in /usr/src/doc or similar.

HTH.

PS: "man top" or "info top" would probably be a good start.

 
 
 

1. Problem/Question about top in 2.0.0

I upgraded to 2.0.0 a few days ago, and once I made all the upgrades
listed in the Changes file things work as expected.  For the
most part, most of the remaining problems I've had seem to be with
bogus error messages (e.g., things having to do with empty cdrom
drives at boot time, or flock).

On the other hand, I think that I've found something that may be a
problem.

1) top (1.0.0) is broken or at least behaves differently.  Now the
memory used field seems to only grow irreversibly.  The problem seems
to be with /proc/meminfo.  On the other hand, I'm not encountering an
inordinate amount of swapping, and so I suspect that the problem may
only be with what is written to the /proc/meminfo file.  Admittedly,
I'm a little weak on the differences between buffers/cached/shared
memory, so this may not be a problem at all.

Here's a typical screen:

  6:06pm  up 15 min,  2 users,  load average: 0.07, 0.02, 0.00
39 processes: 37 sleeping, 1 running, 1 zombie, 0 stopped
CPU states:  1.9% user,  1.9% system,  0.0% nice, 96.2% idle
Mem:  47408K av, 20856K used, 26552K free, 10848K shrd,  1220K buff
                 ^^^^^^  THIS JUST GROWS.
Swap: 33228K av,     0K used, 33228K free               11092K cached

  PID USER     PRI  NI SIZE  RES SHRD STAT %CPU %MEM  TIME COMMAND
  176 ronis     15   0  888  484  340 R     3.8  1.0  0:00 top
    1 root       0   0  864  236  140 S     0.0  0.4  0:01 init auto
    2 root       0   0    0    0    0 SW    0.0  0.0  0:00 kflushd
    3 root     -12 -12    0    0    0 SW<   0.0  0.0  0:00 kswapd
  120 ronis      0   0 1220  548  308 S     0.0  1.1  0:00 -csh
   10 root       0   0  764  292  228 S     0.0  0.6  0:00 /sbin/kerneld
 ....

(the PRI/NI on kswapd seems strange too).

Any ideas?  Thanks

David Ronis

2. New White Paper

3. other questions (ps, top)

4. NIS+ question

5. Question about top and w

6. Help with ViewPaths please...

7. Newbie Question: Find top-level Window?

8. Print solution to replace Solaris x86?

9. Some questions about top .

10. Squid Setting IP Forward (Top Top Top Urgent)

11. solaris zones on top of vlans (801.1q) on top of sun trunking?

12. Top topped

13. Using TOP (monitoring top processes)