/Proc/
/Status
Contains all CPU activity information. All values in this file are accumulated from the start of the system to the current time.
[Root @ localhost ~] # Cat/proc/self/status
Name: Cat
State: R (running)
Sleepavg: 88%
Tgid: 5783
PID: 5783
Ppid: 5742
Tracerpid: 0
UID: 0 0 0 0
GID: 0 0 0 0
Fdsize: 256.
Groups: 0 1 2 3 4 6 10
Vmsize: 6588 KB
Vmlck: 0 KB
Vmrss: 400 KB
Vmdata: 144 KB
Vmstk: 2040 KB
Vmexe: 14 KB
Vmlib: 1250 KB
Stabrk: 0804e000 KB
BRK: 088df000 KB
Stastk: bfe03270 KB
Execlim: 0804c000
Threads: 1
Sigpnd: 0000000000000000
Shdpnd: 0000000000000000
Sigblk: 0000000000000000
Sigign: 0000000000000000
Sigcgt: 0000000000000000
Capinh: 0000000000000000
Capprm: 00000000 fffffeff
Capeff: 00000000 fffffeff
Output description
Parameter description
Name the name of the application or command
State task status, run/sleep/dead/
The average waiting time of sleepavg tasks (in the unit of nanosecond). Because of the large number of sleep times and long time, their sleep_avg will also be larger, therefore, the calculated priority is higher.
Tgid thread group number
PID task id
Ppid parent process ID
Tracerpid receives the ID of the process that tracks the process information
UID uid euid suid fsuid
Gid egid sgid fsgid
Maximum number of fdsize file descriptors, file-> FDS
Groups
Vmsize (Kb) task virtual address space size (total_vm-reserved_vm) Where total_vm is the size of the process's address space, reserved_vm: Physical page of the process between reserved or special memory
The size of the physical memory that the vmlck (Kb) task has locked. The locked physical memory cannot be switched to the hard disk (locked_vm)
The physical memory size that the vmrss (Kb) application is using is the value of the ps command parameter RSS)
Vmdata (Kb) The size of the program's data segment (the size of the virtual memory), stores initialized data; (total_vm-shared_vm-stack_vm)
Size of the stack of A vmstk (Kb) task in the user State (stack_vm)
Vmexe (Kb) program's executable virtual memory size, code segment, does not include the library used by the task (end_code-start_code)
Vmlib (Kb) Size of the library mapped to the virtual memory space of the task (exec_lib)
The size of all the page tables of the process. Unit: kb.
Threads shares the number of tasks that use this signal descriptor. In a POSIX multi-threaded application, all threads in the thread group use the same signal descriptor.
Number of signals to be processed by sigq
Sigpnd shielding bit, stores the waiting signal of this thread
Shdpnd shielding bit, which stores the pending signals of this thread group
Sigblk stores blocked Signals
Sigign stores ignored Signals
Sigcgt stores captured Signals
Capinh inheritable, the ability to inherit programs that can be executed by the current process
Capprm permitted. The capabilities that a process can use can include capabilities not available in capeff. These capabilities are temporarily abandoned by the process itself, and capeff is a subset of capprm, the process does not have the necessary capabilities to improve security.
Capeff valid tive, effective process capability
Example 1
It can be seen that the application's body segment (1 kb) is very small, indicating that the code is very small, and it is executed by the Library (KB. The stack (Kb) is moderate, indicating that there are not many nested functions or a lot of temporary variables. If the value of vmlck is 0, the process does not lock any pages. Vmrss indicates that the physical memory used by the current process is 2956kb. When the process starts to use the applied but unused memory, the value of vmrss increases, but the vmsize remains unchanged.
[Root @ localhost 1] # Cat/proc/4668/status
Name: gam_server
State: S (sleeping)
Sleepavg: 88%
Tgid: 31999
PID: 31999
Ppid: 1
Tracerpid: 0
UID: 0 0 0 0
GID: 0 0 0 0
Fdsize: 256.
Groups: 0 1 2 3 4 6 10
Vmsize: 2136 KB
Vmlck: 0 KB
Vmrss: 920 KB
Vmdata: 148 KB
Vmstk: 88 KB
Vmexe: 44 KB
Vmlib: 1820 KB
Vmpte: 20 KB
Threads: 1
Sigq: 1/2047
Sigpnd: 0000000000000000
Shdpnd: 0000000000000000
Sigblk: 0000000000000000
Sigign: 0000000000001006
Sigcgt: 0000000210000800
Capinh: 0000000000000000
Capprm: 00000000 fffffeff
Capeff: 00000000 fffffeff
[Root @ localhost31999] #