Using Top To read a top display, you
Using Top To read a top display, you must understand a great deal about how the system works, so we’ll spend a good chunk of time on this. To run top, just type top. To display kernel processes as well as user programs, use top -S. You’ll see a display much like the following, and it will refresh every few seconds. ………………………………………………………………………………………. top -S v last pid: 436; w load averages: 0.14, 0.08, 0.07 x up 0+01:06:16 08:12:26 y 46 processes: 3 running, 43 sleeping z CPU states: 1.2% user, 0.0% nice, 0.8% system, 0.0% interrupt, 98.1% idle { Mem: 70M Active, 102M Inact, 26M Wired, 6016K Cache, 41M Buf, 107M Free | Swap: 200M Total, 200M Free } PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 287 mwlucas 2 5 2892K 2136K select 0:13 0.10% 0.10% xsysinfo 378 mwlucas 2 0 101M 64920K RUN 0:08 0.10% 0.10% soffice.bin 376 mwlucas 2 0 35372K 32736K RUN 0:13 0.05% 0.05% mozilla-bin 274 mwlucas 2 0 28208K 26304K select 1:01 0.00% 0.00% XFree86 170 root 2 0 912K 508K select 0:08 0.00% 0.00% moused 277 mwlucas 2 0 3888K 3116K select 0:03 0.00% 0.00% wmaker 5 root 18 0 0K 0K syncer 0:00 0.00% 0.00% syncer 430 mwlucas 28 0 1912K 1160K RUN 0:00 0.00% 0.00% top 399 mwlucas 2 0 4500K 4000K select 0:00 0.00% 0.00% Eterm … ………………………………………………………………………………………. Very tightly packed, isn’t it? Top tries to cram as much data as possible into a standard 80-character by 25-character terminal window. The display updates every two seconds, so you have a fairly accurate, close to real-time, view of your system. We’ll take this a piece at a time and explain what every entry means. PID Values Every process on a UNIX machine has a unique process ID or PID. Whenever a new process is started, it is assigned a PID one greater than the previous process. The last pid value is the last process ID used in the system. In the previous example, the last pid is 436 (v). The next process to be created will be 437, then 438, and so on. You can watch this increment to see if an abnormal number of processes is being created. Hopefully, you’ve looked at your system to see how quickly this number rises when things are running well. If the last pid value keeps climbing rapidly, programs are being started and stopped very quickly. This might indicate some daemon that keeps crashing, or a user trying to start too many programs.[2] Load Average The load average (w) is a somewhat vague number that’s intended to give a rough impression of the amount of load on the system.[2] The load average equals the average number of processes waiting for CPU time, plus the average number of jobs that are waiting for access to the disk. An acceptable load average depends on the system; if the numbers are abnormally high, you should investigate. Many 486s feel bogged down at a load average of 3, while some modern systems feel snappy at a load average of 10. 408
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services