/proc/uptime和/proc/interrupts

来源:互联网 发布:求实计价软件客服 编辑:程序博客网 时间:2024/05/22 04:28

/proc/uptime

/proc/uptime里面的两个数字分别表示: 
the uptime of the system (seconds), and the amount of time spent in idle process (seconds).  

/proc/uptime

2个数字的意义,第一个数值代表系统总的启动时间,第二个数值则代表系统空闲的时间,都是用秒来表示的。

cat /proc/uptime 
2427774.85 2427035.31

开机28天 99.996%的时间都是空闲的。几乎没干活。我手上已经没什么服务器了。

我去raul那里找了他的个记录

17977417.13 797496.63,跑了208天,空闲率为4.4%。

这个机器工作的够可以的。


/proc/interrupts 

 文件中列出当前系统使用的中断的情况

从左到右分别是,

irq的序号, 在各自cpu上发生中断的次数,可编程中断控制器,设备名称(request_irq的dev_name字段)

$cat /proc/interrupts 
           CPU0       CPU1       
  0: 2822434225          0    IO-APIC-edge  timer
  1:         12         45    IO-APIC-edge  i8042
  6:          3          0    IO-APIC-edge  floppy
  7:          0          0    IO-APIC-edge  parport0
  8:         13          0    IO-APIC-edge  rtc
  9:          0          0   IO-APIC-level  acpi
 12:        105        431    IO-APIC-edge  i8042
 14:        169  179654525    IO-APIC-edge  ide0
 50:          0          0   IO-APIC-level  uhci_hcd:usb4
 58:          0          0   IO-APIC-level  uhci_hcd:usb5
 74:       6870  651949183         PCI-MSI  ahci
 82:        193          0         PCI-MSI  HDA Intel
 90:         28  675362729         PCI-MSI  eth0
225:          0          0   IO-APIC-level  ehci_hcd:usb1, uhci_hcd:usb2
233:          0          0   IO-APIC-level  uhci_hcd:usb3
NMI:          0          0 
LOC: 2820592939 2820592942 
ERR:          0
MIS:          0


[root@tata.domain /project/mkdemo/src/osapi/tmp]#cat /proc/interrupts |grep timer && cat /proc/uptime  0:        240   IO-APIC-edge      timerLOC:    4997500   Local timer interrupts400848.41 351625.60[root@tata.domain /project/mkdemo/src/osapi/tmp]#bcbc 1.06.95Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.This is free software with ABSOLUTELY NO WARRANTY.For details type `warranty'. 4997500/400848.4112quit