/proc 文件系统查看

本文详细解读了Linux内核中的系统状态统计文件/proc/stat的各项指标,包括CPU使用情况、内存交换、中断处理、磁盘IO操作等,帮助理解系统运行状况。

$ man proc

可以查看 /proc 下一些文件的说明,比如 /proc/pid/stat

       /proc/stat
	      kernel/system statistics.  Varies with architecture.  Common entries include:


	      cpu  3357 0 4313 1362393
		     The amount of time, measured in units of USER_HZ (1/100ths of a second on most architectures, use sysconf(_SC_CLK_TCK) to obtain the right value), that the system spent in user mode, user mode with low	priority
		     (nice), system mode, and the idle task, respectively.  The last value should be USER_HZ times the second entry in the uptime pseudo-file.


		     In  Linux	2.6 this line includes three additional columns: iowait - time waiting for I/O to complete (since 2.5.41); irq - time servicing interrupts (since 2.6.0-test4); softirq - time servicing softirqs (since
		     2.6.0-test4).


		     Since Linux 2.6.11, there is an eighth column, steal - stolen time, which is the time spent in other operating systems when running in a virtualized environment


		     Since Linux 2.6.24, there is a ninth column, guest, which is the time spent running a virtual CPU for guest operating systems under the control of the Linux kernel.


	      page 5741 1808
		     The number of pages the system paged in and the number that were paged out (from disk).


	      swap 1 0
		     The number of swap pages that have been brought in and out.


	      intr 1462898
		     This line shows 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  a
		     particular interrupt.


	      disk_io: (2,0):(31,30,5764,1,2) (3,0):...
		     (major,disk_idx):(noinfo, read_io_ops, blks_read, write_io_ops, blks_written)
		     (Linux 2.4 only)


	      ctxt 115315
		     The number of context switches that the system underwent.


	      btime 769041601
		     boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).


	      processes 86031
		     Number of forks since boot.


	      procs_running 6
		     Number of processes in runnable state.  (Linux 2.5.45 onward.)


	      procs_blocked 2
		     Number of processes blocked waiting for I/O to complete.  (Linux 2.5.45 onward.)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值