quarta-feira, agosto 24, 2005

LX Gerenciamento de processos


procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 s6 in sy cs us sy id
0 0 0 133136 13400 0 66 14 0 0 0 0 1 7 1 0 194 650 124 3 3 94
0 0 0 3557440 835184 0 22 1 0 0 0 0 0 1 0 0 164 155 151 0 2 98
0 0 0 3557440 835184 0 77 0 0 0 0 0 9 7 1 0 213 287 79 0 9 90

* What it means Procs (Processors)
o r means number of runnable processes during the interval. It does not include processes waiting or in I/O.
o b the number of processes that are blocked waiting for I/O or other event.
o w is the number of processes that are swapped out. A non zero value means system was swapping.
* memory
o swap is used swap space.
o free is availabe free swap space.
* Page
o pi means 1 kb pages per second that have been paged in.
o po means 1 kb pages per second that have been paged out.
o de means that anticipated short term memory shortfall.
* disk
o s0, s1, s2, s6 number of disk operations per second on each disk drive.
* faults
o in
o sy
* cpu
o cs is .
o us is percentage of total cpu time spent in user state.
o sy is total cpu time spent in system state.
o id is percentage of total CPU time that CPU is idle.

size command will show text, data and stack in the executable file.
size a.out

50884 + 9544 + 27604 = 88032

ps -el | more

F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME COMD
3 S 0 0 0 0 0 20 0 0 482f60 ? 3:11 schet
3 S 0 2 0 0 0 20 30810 4096 4900e4 ? 10:08 vhanh
1 S 0 159 1 0 28 20 3081c 56 fcbc5c ? 0:00 strer
1 S 0 1408 1 0 28 20 30b21 104 fcbb14 syscon 0:00 gettl
1 S 0 167 1 0 40 20 30893 52 47da28 ? 0:00 volid
5 S 0 171 1 0 26 20 30835 528 48bc30 ? 0:17 vold
41 S 0 321 1 0 26 20 308b1 108 1b66b4 ? 0:00 ktlod
1 S 0 517 1 0 40 20 30904 100 4831ec ? 0:00 x25nd
1 S 0 560 1 0 40 20 30941 92 4831ec ? 0:00 netd
1 S 0 459 1 0 26 20 3094e 72 48bc30 ? 0:02 trlod


* what it means? F is a set of flags which indicates process's current state.
o 0 means process has terminated.
o 1 means it is system process and is always in memory.
o 2 process is being traced by its parent process.
o 4 process is being traced by its parent and has been stopped.
o 8 process cannot be awakened by a signal.
o 10 process is loaded into memory.
o 20 process cannot be swapped.
* S letter indicating process state.
* O process is currently running on the processor.
* S The process is sleeping or waiting for an event to complete.
* R process is runable.
* I process is idle.
* Z process is zombie, it has terminated but in process state.
* T process has stopped because parent is tracing it.
* X means process is waiting for more memory.
* UID is the identification of user who created this process.
* PID is process identification number.
* PPID parent process identification number.
* C is time spent by CPU on this process.
* PRI is processe's scheduling priority: lower number indicate higher priority.
* NI process's nice number, also for scheduling priority.
* SZ is amount of virtual memory in pages required by process.
* TTY is the terminal that started the process.
* TIME is total time spent by CPU on process so far.
* COMD is the actual command.


This page is powered by Blogger. Isn't yours?