yecheng 's Library tagged → View Popular
08 Dec 07
linux下/proc/stat字段含义
-
linux下/proc/stat字段含义
http://blog.sina.com.cn 2007年03月01日15:24 Jacking
标签:
user
system
nice
idle
iowait
irq softirqcpu 17906755 86377
53312329 1322524322 29311124 101704 1096939
cpu0 4665564 22883 13417357
330376020 7206071
99986 297154
cpu1 4488897 20352 13351971
330749128 7202582
0
271926
cpu2 4434851 22675 13302518
330622140 7455115
1718 245786
cpu3 4317443 20467 13240483
330777034 7447356
0
282073第一行是总的情况第二行到第五行分别代表每个cpu的情况
对这个文件需要读取两遍,我们用total表示累计总资源,那么user+sys就是我们想要知道的累计CPU占用的资源。每个变量后面的数字表示它是第几次读文件得到的,用如下方法可算出CPU占用率:
Total_1=user_1+nice_1+sys_1+idle_1
Total_2=user_2+nice_2+sys_2+idle_2
Rate={[(user_2+sys_2)-(user_1+sys_1)]/(total_2-total_1)}*100
由于我们两次读取的时间间隔比较短,我们就近似的认为这就是即时的CPU利用率。page 141921816 270618577
The number of pages the system paged in
and the number
that
were paged out (from disk).
进页面总数;出页面总数;
swap 162653 773227
The number of
swap pages that have been brought in and
out.
换入总数;换出总数
intr 554351143 356079077 38 0 11 11 0 5 3 1 0 0 0 146 0 2 0 0 0 0 0
145348702 4632843 0 0 48290304 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
The number of interrupts received from the system boot.
中断总量disk_io:
(8,0):(48399919,26423829,283842508,21976090,541237126)
(major,minor):(noinfo,
read_io_ops,
blks_read,
write_io_ops, blks_written)
单个磁盘I/O总数;单个磁盘I/O读;单个磁盘块读;单个磁盘I/O写;单个磁盘块写ctxt 3551861649
The number of context switches that the system underwent.
上下文切换数量
btime 1169169423
boot time, in seconds since the epoch (January 1,
1970).
引导时间
processes 1547141
Number of forks since boot.
进程总数procs_running 1
procs_blocked 0
02 Nov 07
Linux中/proc目录下文件详解
-
/proc文件系统下的多种文件提供的系统信息不是针对某个特定进程的,而是能够在整个系统范围的上下文中使用。可以使用的文件随系统配置的变化而变化。命令procinfo能够显示基于其中某些文件的多种系统信息。
以下详细描述/proc下的文件:
1 - 2 of 2
Showing 20▼ items per page
Selected Tags
Related Tags
Sponsored Links
Ads by Google
Top Contributors
Groups interested in stat
Related Lists on Diigo
-
Physics
All types of ill shit
Items: 1 | Visits: 20
Created by: dmjacobs
-
Prob & Stat
Items: 6 | Visits: 34
Created by: pennmanor math
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo
