Ubuntuがうまく動かない時に、状態を確認するために使うコマンド(ハード・OS編)
■インストールしたバージョンを確認
■■Ubuntu自体のバージョン
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
■■OSのカーネルのバージョン
$ uname -a
Linux XXXX-sv 3.0.0-26-generic-pae #43-Ubuntu SMP Tue Sep 25 17:39:44 UTC 2012 i686 i686 i386 GNU/Linux
$
■ハード関連
以下のインストールが必要
$ sudo apt-get install hal
■■メーカー
$ lshal | grep system.hardware.vendor
system.hardware.vendor = ‘To be filled by O.E.M.’ (string)
■■形式名
$ lshal | grep system.hardware.product
system.hardware.product = ‘To be filled by O.E.M.’ (string)
■■CPU
$ cat /proc/cpuinfo | grep "model name"
model name : Intel(R) Atom(TM) CPU D2700 @ 2.13GHz
model name : Intel(R) Atom(TM) CPU D2700 @ 2.13GHz
model name : Intel(R) Atom(TM) CPU D2700 @ 2.13GHz
model name : Intel(R) Atom(TM) CPU D2700 @ 2.13GHz
■■チップセット
$ sudo lshw | grep -A 10 "Host bridge"
description: Host bridge
product: Cedarview DRAM Controller
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 03
width: 32 bits
clock: 33MHz
*-display UNCLAIMED
description: VGA compatible controller
product: Cedarview Integrated Graphics Controller
$
■ディスプレイ
$ sudo lshw -class display
*-display UNCLAIMED
description: VGA compatible controller
product: Cedarview Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 09
width: 32 bits
clock: 33MHz
capabilities: pm msi vga_controller bus_master cap_list
configuration: latency=0
resources: memory:dfc00000-dfcfffff ioport:f100(size=8)
$
■■メモリ
$ sudo lshw -short | grep "System Memory"
/0/28 memory 4GiB System Memory
■■ネットワークモジュール
$ sudo lshw -C network
*-network
description: Ethernet interface
product: JMC250 PCI Express Gigabit Ethernet Controller
vendor: JMicron Technology Corp.
physical id: 0.5
bus info: pci@0000:02:00.5
logical name: eth0
version: 03
serial: 80:ee:73:28:6d:03
size: 10Mbit/s
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm pciexpress msix msi bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=jme driverversion=1.0.8 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
resources: irq:45 memory:dfe00000-dfe03fff ioport:e100(size=128) ioport:e000(size=256)
*-network
description: Wireless interface
product: RTL8188CE 802.11b/g/n WiFi Adapter
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:03:00.0
logical name: wlan0
version: 01
serial: e0:91:53:6b:f1:7f
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=rtl8192ce driverversion=3.0.0-26-generic-pae firmware=N/A ip=192.168.168.169 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
resources: irq:19 ioport:d000(size=256) memory:dfd00000-dfd03fff
$
■■簡易表示
$ sudo lshw -short
H/W path Device Class Description
=======================================================
system To be filled by O.E.M. (To be filled
/0 bus XS36V
/0/0 memory 64KiB BIOS
/0/4 processor Intel(R) Atom(TM) CPU D2700 @ 2.13
/0/4/5 memory 24KiB L1 cache
/0/4/6 memory 512KiB L2 cache
/0/4/3.1 processor Logical CPU
/0/4/3.2 processor Logical CPU
/0/4/3.3 processor Logical CPU
/0/4/3.4 processor Logical CPU
/0/28 memory 4GiB System Memory
/0/28/0 memory 2GiB SODIMM DDR3 Synchronous 1066 MH
/0/28/1 memory 2GiB SODIMM DDR3 Synchronous 1066 MH
/0/1 processor
/0/1/3.1 processor Logical CPU
/0/1/3.2 processor Logical CPU
/0/1/3.3 processor Logical CPU
/0/1/3.4 processor Logical CPU
/0/100 bridge Cedarview DRAM Controller
/0/100/2 display Cedarview Integrated Graphics Contro
/0/100/1b multimedia N10/ICH 7 Family High Definition Aud
/0/100/1c bridge N10/ICH 7 Family PCI Express Port 1
/0/100/1c.1 bridge N10/ICH 7 Family PCI Express Port 2
/0/100/1c.1/0 generic SD/MMC Host Controller
/0/100/1c.1/0.2 generic Standard SD Host Controller
/0/100/1c.1/0.3 generic MS Host Controller
/0/100/1c.1/0.5 eth0 network JMC250 PCI Express Gigabit Ethernet
/0/100/1c.3 bridge N10/ICH 7 Family PCI Express Port 4
/0/100/1c.3/0 wlan0 network RTL8188CE 802.11b/g/n WiFi Adapter
/0/100/1d bus N10/ICH 7 Family USB UHCI Controller
/0/100/1d.1 bus N10/ICH 7 Family USB UHCI Controller
/0/100/1d.2 bus N10/ICH 7 Family USB UHCI Controller
/0/100/1d.3 bus N10/ICH 7 Family USB UHCI Controller
/0/100/1d.7 bus N10/ICH 7 Family USB2 EHCI Controlle
/0/100/1e bridge 82801 Mobile PCI Bridge
/0/100/1f bridge NM10 Family LPC Controller
/0/100/1f.2 scsi0 storage N10/ICH7 Family SATA AHCI Controller
/0/100/1f.2/0.0.0 /dev/sda disk 128GB M4-CT128M4SSD2
/0/100/1f.2/0.0.0/1 /dev/sda1 volume 100MiB Windows NTFS volume
/0/100/1f.2/0.0.0/2 /dev/sda2 volume 45GiB Windows NTFS volume
/0/100/1f.2/0.0.0/3 /dev/sda3 volume 60GiB Windows NTFS volume
/0/100/1f.2/0.0.0/4 /dev/sda4 volume 14GiB EXT4 volume
/0/100/1f.3 bus N10/ICH 7 Family SMBus Controller
$
■リソースの状態確認
以下のインストールが必要
$ sudo apt-get install sysstat
■■CPU使用率
$ mpstat -P ALL
Linux 3.0.0-26-generic-pae (XXXX-sv) 2012年10月16日 _i686_ (4 CPU)
22時33分58秒 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
22時33分58秒 all 1.46 0.04 0.31 0.02 0.00 0.00 0.00 0.00 98.17
22時33分58秒 0 0.96 0.01 0.28 0.06 0.00 0.01 0.00 0.00 98.69
22時33分58秒 1 1.48 0.07 0.31 0.02 0.00 0.00 0.00 0.00 98.11
22時33分58秒 2 1.51 0.03 0.34 0.02 0.00 0.00 0.00 0.00 98.10
22時33分58秒 3 1.89 0.03 0.31 0.01 0.00 0.00 0.00 0.00 97.76
$
■■メモリ使用量
$ free -m
total used free shared buffers cached
Mem: 4013 645 3368 0 35 288
-/+ buffers/cache: 320 3693
Swap: 0 0 0
■■ディスク使用量
$ df -h
Filesystem Size Used Avail Use% マウント位置
/dev/sda4 14G 3.8G 9.5G 29% /
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 803M 1.1M 802M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 1.3M 2.0G 1% /run/shm
/dev/sda2 45G 11G 35G 25% /media/sda2
/dev/sda3 60G 1.2G 59G 2% /media/sda3
$
■サービス一覧確認
以下のインストールが必要
sudo apt-get install chkconfig
$ sudo chkconfig –list
acpi-support 0:off 1:off 2:on 3:on 4:on 5:on 6:off
acpid 0:off 1:off 2:off 3:off 4:off 5:off 6:off
alsa-restore 0:off 1:off 2:off 3:off 4:off 5:off 6:off
alsa-store 0:off 1:off 2:off 3:off 4:off 5:off 6:off
anacron 0:off 1:off 2:off 3:off 4:off 5:off 6:off
apparmor 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
apport 0:off 1:off 2:off 3:off 4:off 5:off 6:off
atd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
avahi-daemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off
binfmt-support 0:off 1:off 2:off 3:off 4:off 5:off 6:off
bluetooth 0:off 1:off 2:on 3:on 4:on 5:on 6:off
bootlogd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
brltty 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
console-setup 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cron 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cups 0:off 1:off 2:off 3:off 4:off 5:off 6:off
dbus 0:off 1:off 2:off 3:off 4:off 5:off 6:off
dmesg 0:off 1:off 2:off 3:off 4:off 5:off 6:off
dns-clean 0:off 1:on 2:on 3:on 4:on 5:on 6:off
friendly-recovery 0:off 1:off 2:off 3:off 4:off 5:off 6:off
grub-common 0:off 1:off 2:on 3:on 4:on 5:on 6:off
hostname 0:off 1:off 2:off 3:off 4:off 5:off 6:off
hwclock 0:off 1:off 2:off 3:off 4:off 5:off 6:off
hwclock-save 0:off 1:off 2:off 3:off 4:off 5:off 6:off
irqbalance 0:off 1:off 2:off 3:off 4:off 5:off 6:off
kerneloops 0:off 1:off 2:on 3:on 4:on 5:on 6:off
killprocs 0:off 1:on 2:off 3:off 4:off 5:off 6:off
lightdm 0:off 1:off 2:off 3:off 4:off 5:off 6:off
modemmanager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
module-init-tools 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network-interface 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network-interface-security 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network-manager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
networking 0:on 1:off 2:off 3:off 4:off 5:off 6:off
nmbd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
ondemand 0:off 1:off 2:on 3:on 4:on 5:on 6:off
pcmciautils 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
plymouth 0:off 1:off 2:off 3:off 4:off 5:off 6:off
plymouth-log 0:off 1:off 2:off 3:off 4:off 5:off 6:off
plymouth-splash 0:off 1:off 2:off 3:off 4:off 5:off 6:off
plymouth-stop 0:off 1:off 2:off 3:off 4:off 5:off 6:off
plymouth-upstart-bridge 0:off 1:off 2:off 3:off 4:off 5:off 6:off
pppd-dns 0:off 1:on 2:on 3:on 4:on 5:on 6:off
procps 0:off 1:off 2:off 3:off 4:off 5:off 6:off
pulseaudio 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rc.local 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rcS 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rsync 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rsyslog 0:off 1:off 2:off 
; 3:off 4:off 5:off 6:off
saned 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sendsigs 0:on 1:off 2:off 3:off 4:off 5:off 6:off
setvtrgb 0:off 1:off 2:off 3:off 4:off 5:off 6:off
smbd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
speech-dispatcher 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ssh 0:off 1:off 2:off 3:off 4:off 5:off 6:off
stop-bootlogd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
stop-bootlogd-single 0:off 1:off 2:off 3:off 4:off 5:off 6:off
sudo 0:off 1:off 2:on 3:on 4:on 5:on 6:off
udev 0:off 1:off 2:off 3:off 4:off 5:off 6:off
udev-fallback-graphics 0:off 1:off 2:off 3:off 4:off 5:off 6:off
udev-finish 0:off 1:off 2:off 3:off 4:off 5:off 6:off
udevmonitor 0:off 1:off 2:off 3:off 4:off 5:off 6:off
udevtrigger 0:off 1:off 2:off 3:off 4:off 5:off 6:off
ufw 0:off 1:off 2:off 3:off 4:off 5:off 6:off
umountfs 0:on 1:off 2:off 3:off 4:off 5:off 6:off
umountnfs.sh 0:on 1:off 2:off 3:off 4:off 5:off 6:off
umountroot 0:on 1:off 2:off 3:off 4:off 5:off 6:off
unattended-upgrades 0:off 1:off 2:on 3:on 4:on 5:on 6:off
urandom 0:on 1:off 2:off 3:off 4:off 5:off 6:off S:on
x11-common 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
xrdp 0:off 1:off 2:on 3:on 4:on 5:on 6:off
$
■ネットワークインターフェースの認識状況
■■有線
$ ifconfig
eth0 Link encap:イーサネット ハードウェアアドレス 80:ee:73:28:6d:03
UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1
RXパケット:0 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:0 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:1000
RXバイト:0 (0.0 B) TXバイト:0 (0.0 B)
割り込み:45
lo Link encap:ローカルループバック
inetアドレス:127.0.0.1 マスク:255.0.0.0
inet6アドレス: ::1/128 範囲:ホスト
UP LOOPBACK RUNNING MTU:16436 メトリック:1
RXパケット:6 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:6 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:0
RXバイト:340 (340.0 B) TXバイト:340 (340.0 B)
wlan0 Link encap:イーサネット ハードウェアアドレス e0:91:53:6b:f1:7f
inetアドレス:192.168.168.169 ブロードキャスト:192.168.0.255 マスク:255.255.255.0
inet6アドレス: fe80::e291:53ff:fe6b:f17f/64 範囲:リンク
UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1
RXパケット:13831 エラー:0 損失:0 オーバラン:0 フレーム:0
TXパケット:7138 エラー:0 損失:0 オーバラン:0 キャリア:0
衝突(Collisions):0 TXキュー長:1000
RXバイト:2294055 (2.2 MB) TXバイト:1244421 (1.2 MB)
■■無線
$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"WARPSTAR-D71AB4"
Mode:Managed Frequency:2.417 GHz Access Point: 00:1B:8B:E9:3F:88
Bit Rate=150 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr=2347 B Fragment thr:off
Power Management:off
Link Quality=50/70 Signal level=-60 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:1675 Missed beacon:0
大体、この位のコマンドをよく使う。
コメント