User Tools

Site Tools


proc:stat_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
proc:stat_file [2017/04/05 09:51] peterproc:stat_file [2020/07/15 09:30] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Proc - stat file ======+====== Proc - Stat file ======
  
-The **stat** file contains detailed information about the process itself.  Its fields are explained here:+Miscellaneous kernel statistics in /proc/stat 
 +-------------------------------------------------
  
-==== Contents of the stat files (as of 2.6.30-rc7) ====+Various pieces of miscellaneous information about kernel activity are available in the **/proc/stat** file.  All of the numbers reported in this file are aggregates since the system first booted For a quick look, simply cat the file:
  
-^Field^Content^ +<code bash> 
-|pid|Process id.| +cat /proc/stat
-|tcomm|Filename of the executable.| +
-|state|State (R is running, S is sleeping, D is sleeping in an uninterruptible wait, Z is zombie, T is traced or stopped).| +
-|ppid|Process id of the parent process.| +
-|pgrp|pgrp of the process.| +
-|sid|Session id.| +
-|tty_nr|tty the process uses.| +
-|tty_pgrp|pgrp of the tty.| +
-|flags|Task flags.| +
-|min_flt|Number of minor faults.| +
-|cmin_flt|Number of minor faults with child's.| +
-|maj_flt|Number of major faults.| +
-|cmaj_flt|Number of major faults with child's.| +
-|utime|User mode jiffies.| +
-|stime|Kernel mode jiffies.| +
-|cutime|User mode jiffies with child's.| +
-|cstime|Kernel mode jiffies with child's.| +
-|priority|Priority level.| +
-|nice|Nice level.| +
-|num_threads|Number of threads.| +
-|it_real_value|Obsolete, always 0.| +
-|start_time|Time the process started after system boot.| +
-|vsize|Virtual memory size.| +
-|rss|Resident set memory size.| +
-|rsslim|Current limit in bytes on the rss.| +
-|start_code|Address above which program text can run.| +
-|end_code|Address below which program text can run.| +
-|start_stack|Address of the start of the stack.| +
-|esp|Current value of ESP.| +
-|eip|Current value of EIP.| +
-|pending|Bitmap of pending signals.| +
-|blocked|Bitmap of blocked signals.| +
-|sigign|Bitmap of ignored signals.| +
-|sigcatch|Bitmap of catched signals.| +
-|wchan|Address where process went to sleep.| +
-|0|Place holder.| +
-|0|Place holder.| +
-|exit_signal|Signal to send to parent thread on exit.| +
-|task_cpu|Which CPU the task is scheduled on.| +
-|rt_priority|Realtime priority.| +
-|policy|Scheduling policy (man sched_setscheduler).| +
-|blkio_ticks|Time spent waiting for block IO.| +
-|gtime|Guest time of the task in jiffies.| +
-|cgtime|Guest time of the task children in jiffies.|+
  
 +cpu  2255 34 2290 22625563 6290 127 456 0 0
 +cpu0 1132 34 1441 11311718 3675 127 438 0 0
 +cpu1 1123 0 849 11313845 2614 0 18 0 0
 +intr 114930548 113199788 3 0 5 263 0 4 [... lots more numbers ...]
 +ctxt 1990473
 +btime 1062191376
 +processes 2915
 +procs_running 1
 +procs_blocked 0
 +softirq 183433 0 21755 12 39 1137 231 21459 2263
 +</code>
 +
 +The very first **cpu** line aggregates the numbers in all of the other "cpuN" lines.  These numbers identify the amount of time the CPU has spent performing different kinds of work.  Time units are in USER_HZ (typically hundredths of a second).  The meanings of the columns are as follows, from left to right:
 +
 +  * **user**:  Normal processes executing in user mode.
 +  * **nice**:  Niced processes executing in user mode.
 +  * **system**:  Processes executing in kernel mode.
 +  * **idle**:  Twiddling thumbs.
 +  * **iowait**:  Waiting for I/O to complete.
 +  * **irq**:  Servicing interrupts.
 +  * **softirq**:  servicing softirqs.
 +  * **steal**:  Involuntary wait.
 +  * **guest**:  Running a normal guest.
 +  * **guest_nice**:  Running a niced guest.
 +
 +
 +The remaining lines are defined where:
 +
 +  * **intr** gives counts of interrupts serviced since boot time, for each of the possible system interrupts.  The first column is the total of all interrupts serviced; each subsequent column is the total for that particular interrupt.
 +  * **ctxt** gives the total number of context switches across all CPUs.
 +  * **btime** gives the time at which the system booted, in seconds since the Unix epoch.
 +  * **processes** gives the number of processes and threads created, which includes (but is not limited to) those created by calls to the **fork()** and **clone()** system calls.
 +  * **procs_running** gives the total number of threads that are running or ready to run (i.e., the total number of runnable threads).
 +  * **procs_blocked** gives the number of  processes currently blocked, waiting for I/O to complete.
 +  * **softirq** gives counts of softirqs serviced since boot time, for each of the possible system softirqs. The first column is the total of all softirqs serviced; each subsequent column is the total for that particular softirq.
  
proc/stat_file.1491385882.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki