09 December 2007

Linux Diag Command (システム調査コマンド)

システム情報を取り出すコマンド類のメモ

Linux OS情報

uname -a
Linux localhost.localdomain 2.6.23.8-63.fc8 #1 SMP Wed Nov 21 18:51:08 EST 2007 i686 i686 i386 GNU/Linux
cat /proc/version
Linux version 2.6.23.8-63.fc8 (kojibuilder@xenbuilder4.fedora.phx.redhat.com) (gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)) #1 SMP Wed Nov 21 18:51:08 EST 2007
cat /etc/system-release
Fedora release 8 (Werewolf)
cat /proc/cmdline
ro root=LABEL=/fedora8 rhgb quiet

ハードウエア情報

cat /proc/cpuinfo
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 13 model name : Intel(R) Pentium(R) M processor 1.86GHz stepping : 8 cpu MHz : 1867.000 cache size : 2048 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2 bogomips : 3727.17 clflush size : 64
cat /proc/stat
cpu 15285 0 3769 51284 3159 96 37 0 cpu0 15285 0 3769 51284 3159 96 37 0 intr 353207 ctxt 1632880 btime 1197106142 processes 3175 procs_running 2 procs_blocked 0
lspci -n
00:00.0 0600: 8086:2590 (rev 03) 00:02.0 0300: 8086:2592 (rev 03) 00:02.1 0380: 8086:2792 (rev 03) 00:1b.0 0403: 8086:2668 (rev 04) …略 00:1f.3 0c05: 8086:266a (rev 04) 02:00.0 0200: 11ab:4362 (rev 19) 03:00.0 0200: 11ab:4362 (rev 19) 05:04.0 0780: 14f1:1033 (rev 08) 05:05.0 0480: 10cf:2011
lspci
00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03) 00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) 00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03) 00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 04) …略

ハードウエア情報(USB)

lsusb
Bus 001 Device 004: ID 1267:0212 Logic3 / SpectraVideo plc Bus 001 Device 002: ID 05e3:0606 Genesys Logic, Inc. Bus 001 Device 001: ID 0000:0000 Bus 005 Device 001: ID 0000:0000 …略
lsusb -v
Bus 001 Device 004: ID 1267:0212 Logic3 / SpectraVideo plc Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x1267 Logic3 / SpectraVideo plc idProduct 0x0212 bcdDevice 23.23 iManufacturer 0 iProduct 2 PS/2+USB Mouse iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 …略
cat /proc/bus/usb/devices
T: Bus=05 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 2.06 S: Manufacturer=Linux 2.6.23.8-63.fc8 uhci_hcd S: Product=UHCI Host Controller S: SerialNumber=0000:00:1d.3 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms T: Bus=04 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 …略

デバイス情報

cat /proc/devices
Character devices: 1 mem 4 /dev/vc/0 4 tty 4 ttyS …略 Block devices: 1 ramdisk 8 sd 9 md …略
cat /proc/filesystems
nodev sysfs nodev rootfs nodev bdev nodev proc nodev cpuset …略

割り込み・IOメモリ・ポート・DMA

cat /proc/interrupts
CPU0 0: 273 IO-APIC-edge timer 1: 2 IO-APIC-edge i8042 8: 3 IO-APIC-edge rtc 9: 0 IO-APIC-fasteoi acpi 14: 23738 IO-APIC-edge libata 15: 7526 IO-APIC-edge libata …略
cat /proc/iomem
00000000-0009f7ff : System RAM 00000000-00000000 : Crash kernel 0009f800-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000d0000-000d3fff : pnp 00:0a 000d8000-000d97ff : Adapter ROM …略
cat /proc/ioports
0000-001f : dma1 0020-0021 : pic1 0040-0043 : timer0 0050-0053 : timer1 0060-006f : keyboard 0070-0077 : rtc …略
cat /proc/dma
4: cascade

ディスク情報

cat /proc/partitions
major minor #blocks name 8 0 244198584 sda 8 1 2048256 sda1 8 2 2048287 sda2 8 4 1 sda4 8 5 15374173 sda5 …略
cat /proc/mounts
rootfs / rootfs rw 0 0 /dev/root / ext3 rw,relatime,data=ordered 0 0 /dev /dev tmpfs rw,relatime 0 0 /proc /proc proc rw,relatime 0 0 /sys /sys sysfs rw,relatime 0 0 none /selinux selinuxfs rw,relatime 0 0 …略
mount
/dev/sda11 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) …略
cat /proc/swaps
Filename Type Size Used Priority /dev/sda2 partition 2048276 0 -1

メモリ

cat /proc/meminfo
MemTotal: 2067184 kB MemFree: 1389276 kB Buffers: 23284 kB Cached: 239964 kB SwapCached: 0 kB Active: 356972 kB …略

モジュール情報

cat /proc/modules
i915 23745 2 - Live 0xf8cdf000 drm 67029 3 i915, Live 0xf8cec000 rfcomm 36825 0 - Live 0xf8c77000 l2cap 25537 9 rfcomm, Live 0xf8c89000 bluetooth 49317 4 rfcomm,l2cap, Live 0xf8cbf000 …略
lsmod
Module Size Used by i915 23745 2 drm 67029 3 i915 rfcomm 36825 0 l2cap 25537 9 rfcomm bluetooth 49317 4 rfcomm,l2cap …略
modprobe -l
/lib/modules/2.6.23.8-63.fc8/kernel/drivers/acpi/video.ko /lib/modules/2.6.23.8-63.fc8/kernel/drivers/acpi/bay.ko /lib/modules/2.6.23.8-63.fc8/kernel/drivers/acpi/sbs.ko /lib/modules/2.6.23.8-63.fc8/kernel/drivers/acpi/toshiba_acpi.ko /lib/modules/2.6.23.8-63.fc8/kernel/drivers/acpi/button.ko /lib/modules/2.6.23.8-63.fc8/kernel/drivers/acpi/battery.ko …略
cat /etc/modprobe.conf
alias eth0 sky2 alias eth1 sky2 alias scsi_hostadapter libata alias scsi_hostadapter1 ata_piix alias scsi_hostadapter2 ahci alias snd-card-0 snd-hda-intel options snd-card-0 index=0 options snd-hda-intel index=0 # I2C module options alias char-major-89 i2c-dev # …略

他にもあるとは思いますが…  (基本的な dmesg を抜かしているのは、わざとです)