procinfoコマンドを使ってみる
procinfoコマンドなるものがある事を知って、試してみる事にしました。
システムの状態を/proc以下から集め、表示するコマンドだそうです。
procinfoパッケージがあれば使えます。
いくつかオプション付けて試してみました。
「-a」オプションで全て表示
# procinfo -a Linux 2.6.18-194.32.1.el5xen (mockbuild@builder10.centos.org) (gcc 4.1.2 20080704 ) #1 1CPU [mother] Memory: Total Used Free Shared Buffers Mem: 3204096 579688 2624408 0 22924 Swap: 4096440 0 4096440 Bootup: Sat Jan 22 22:20:48 2011 Load average: 0.00 0.00 0.00 1/125 3552 user : 0:00:27.22 0.8% page in : 0 nice : 0:00:00.00 0.0% page out: 0 system: 0:00:14.77 0.4% swap in : 0 idle : 0:54:00.16 98.7% swap out: 0 steal : 0:00:00.15 0.0% uptime: 0:54:42.34 context : 184838 irq 1: 8 Phys-irq i8042 irq 19: 5430 Phys-irq uhci_hcd:u irq 6: 5 Phys-irq floppy irq 20: 96 Phys-irq ehci_hcd:u irq 7: 0 Phys-irq parport0 irq 21: 164 Phys-irq HDA Intel irq 8: 0 Phys-irq rtc irq256: 151669 Dynamic-irq timer0 irq 9: 0 Phys-irq acpi irq257: 0 Dynamic-irq resched irq 12: 4 Phys-irq i8042 irq258: 0 Dynamic-irq callfun irq 14: 28777 Phys-irq ide0 irq259: 89 Dynamic-irq xenbus irq 17: 0 Phys-irq uhci_hcd:u irq260: 0 Dynamic-irq console irq 18: 22651 Phys-irq uhci_hcd:u Kernel Command Line: ro root=/dev/md2 Modules: 39 netloop 127 netbk 148 *blktap 55 blkbk 38 *ipt_REJECT 35 *xt_tcpudp 35 *iptable_filter 54 *ip_tables 49 *x_tables 90 bridge 62 *autofs4 195 *sunrpc 89 be2iscsi 68 ib_iser 67 *rdma_cm 72 *ib_cm 42 *iw_cm 73 *ib_sa 69 *ib_mad 103 *ib_core 41 *ib_addr 49 iscsi_tcp 73 bnx2i 77 *cnic 426 *ipv6 42 *xfrm_nalgo 42 *crypto_api 45 *uio 76 cxgb3i 211 *cxgb3 56 *8021q 52 *libiscsi_tcp 76 *libiscsi2 72 *scsi_transport 34 *scsi_transport 54 dm_mirror 56 dm_multipath 41 *scsi_dh 52 video 39 *backlight 49 sbs 46 power_meter 36 *hwmon 38 *i2c_ec 37 dell_wmi 41 *wmi 40 button 43 battery 50 asus_acpi 38 ac 46 lp 91 floppy 624 snd_hda_intel 36 snd_seq_dummy 64 snd_seq_oss 40 *snd_seq_midi_e 86 *snd_seq 41 *snd_seq_device 76 snd_pcm_oss 49 *snd_mixer_oss 114 *snd_pcm 56 *snd_timer 43 *snd_page_alloc 43 *snd_hwdep 98 *snd 41 i2c_i801 41 *soundcore 69 sg 55 *i2c_core 35 pcspkr 72 ide_cd 67 *cdrom 158 e1000e 55 serial_core 69 shpchp 61 *parport_pc 72 *parport 40 serio_raw 97 dm_raid45 35 *dm_message 45 *dm_region_hash 44 *dm_log 99 *dm_mod 39 *dm_mem_cache 56 *ata_piix 204 *libata 55 *sd_mod 193 *scsi_mod 55 *raid1 165 *ext3 92 *jbd 56 uhci_hcd 55 ohci_hcd 65 ehci_hcd Character Devices: Block Devices: 1 mem 21 sg 1 ramdisk 128 sd 4 /dev/vc/0 29 fb 2 fd 129 sd 4 tty 116 alsa 3 ide0 130 sd 4 ttyS 128 ptm 8 sd 131 sd 5 /dev/tty 136 pts 9 md 132 sd 5 /dev/console 162 raw 65 sd 133 sd 5 /dev/ptmx 180 usb 66 sd 134 sd 6 lp 189 usb_device 67 sd 135 sd 7 vcs 202 cpu/msr 68 sd 253 device-mapper 10 misc 203 cpu/cpuid 69 sd 254 mdp 13 input 253 blktap 70 sd 14 sound 254 pcmcia 71 sd File Systems: [sysfs] [rootfs] [bdev] [proc] [cpuset] [binfmt_misc] [debugfs] [securityfs] [sockfs] [usbfs] [pipefs] [anon_inodefs] [futexfs] [tmpfs] [inotifyfs] [eventpollfs] [devpts] ext2 [ramfs] iso9660 [mqueue] [selinuxfs] ext3 [rpc_pipefs] [autofs]
「-m」オプションで、モジュールとデバイスドライバに関する情報を表示。
# procinfo -m Linux 2.6.18-194.32.1.el5xen (mockbuild@builder10) (gcc 4.1.2 20080704 ) #1 1CPU [mother] Kernel Command Line: ro root=/dev/md2 Modules: 39 netloop 127 netbk 148 *blktap 55 blkbk 38 *ipt_REJECT 35 *xt_tcpudp 35 *iptable_filter 54 *ip_tables 49 *x_tables 90 bridge 62 *autofs4 195 *sunrpc 89 be2iscsi 68 ib_iser 67 *rdma_cm 72 *ib_cm 42 *iw_cm 73 *ib_sa 69 *ib_mad 103 *ib_core 41 *ib_addr 49 iscsi_tcp 73 bnx2i 77 *cnic 426 *ipv6 42 *xfrm_nalgo 42 *crypto_api 45 *uio 76 cxgb3i 211 *cxgb3 56 *8021q 52 *libiscsi_tcp 76 *libiscsi2 72 *scsi_transport 34 *scsi_transport 54 dm_mirror 56 dm_multipath 41 *scsi_dh 52 video 39 *backlight 49 sbs 46 power_meter 36 *hwmon 38 *i2c_ec 37 dell_wmi 41 *wmi 40 button 43 battery 50 asus_acpi 38 ac 46 lp 91 floppy 624 snd_hda_intel 36 snd_seq_dummy 64 snd_seq_oss 40 *snd_seq_midi_e 86 *snd_seq 41 *snd_seq_device 76 snd_pcm_oss 49 *snd_mixer_oss 114 *snd_pcm 56 *snd_timer 43 *snd_page_alloc 43 *snd_hwdep 98 *snd 41 i2c_i801 41 *soundcore 69 sg 55 *i2c_core 35 pcspkr 72 ide_cd 67 *cdrom 158 e1000e 55 serial_core 69 shpchp 61 *parport_pc 72 *parport 40 serio_raw 97 dm_raid45 35 *dm_message 45 *dm_region_hash 44 *dm_log 99 *dm_mod 39 *dm_mem_cache 56 *ata_piix 204 *libata 55 *sd_mod 193 *scsi_mod 55 *raid1 165 *ext3 92 *jbd 56 uhci_hcd 55 ohci_hcd 65 ehci_hcd Character Devices: Block Devices: 1 mem 21 sg 1 ramdisk 128 sd 4 /dev/vc/0 29 fb 2 fd 129 sd 4 tty 116 alsa 3 ide0 130 sd 4 ttyS 128 ptm 8 sd 131 sd 5 /dev/tty 136 pts 9 md 132 sd 5 /dev/console 162 raw 65 sd 133 sd 5 /dev/ptmx 180 usb 66 sd 134 sd 6 lp 189 usb_device 67 sd 135 sd 7 vcs 202 cpu/msr 68 sd 253 device-mapper 10 misc 203 cpu/cpuid 69 sd 254 mdp 13 input 253 blktap 70 sd 14 sound 254 pcmcia 71 sd File Systems: [sysfs] [rootfs] [bdev] [proc] [cpuset] [binfmt_misc] [debugfs] [securityfs] [sockfs] [usbfs] [pipefs] [anon_inodefs] [futexfs] [tmpfs] [inotifyfs] [eventpollfs] [devpts] ext2 [ramfs] iso9660 [mqueue] [selinuxfs] ext3 [rpc_pipefs] [autofs]
「-fm」とか付けると、topコマンドに似ていますね。
Linux 2.6.18-194.32.1.el5xen (mockbuild@builder10.centos.org) (gcc 4.1.2 20080704 ) #1 1CPU [mother] Memory: Total Used Free Shared Buffers Mem: 3204096 580060 2624036 0 23052 -/+ buffers: 244372 2959724 Swap: 4096440 0 4096440 Bootup: Sat Jan 22 22:20:48 2011 Load average: 0.00 0.00 0.00 1/125 3571 user : 0:00:27.66 0.8% page in : 0 nice : 0:00:00.00 0.0% page out: 0 system: 0:00:14.97 0.4% swap in : 0 idle : 0:58:53.56 98.8% swap out: 0 steal : 0:00:00.16 0.0% uptime: 0:59:36.37 context : 196416 irq 1: 8 Phys-irq i8042 irq 19: 5752 Phys-irq uhci_hcd:u irq 6: 5 Phys-irq floppy irq 20: 96 Phys-irq ehci_hcd:u irq 7: 0 Phys-irq parport0 irq 21: 164 Phys-irq HDA Intel irq 8: 0 Phys-irq rtc irq256: 161299 Dynamic-irq timer0 irq 9: 0 Phys-irq acpi irq257: 0 Dynamic-irq resched irq 12: 4 Phys-irq i8042 irq258: 0 Dynamic-irq callfun irq 14: 31405 Phys-irq ide0 irq259: 89 Dynamic-irq xenbus irq 17: 0 Phys-irq uhci_hcd:u irq260: 0 Dynamic-irq console irq 18: 23295 Phys-irq uhci_hcd:u
今日はこんな所で。