快速檢視LINUX 系統硬體的指令碼

楊奇龍發表於2011-03-29

下載:
[root@rac1 ~]# wget
--13:35:32-- 
Resolving aspersa.googlecode.com... 64.233.183.82
Connecting to aspersa.googlecode.com|64.233.183.82|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48691 (48K) [text/plain]
Saving to: `summary'

100%[======================================================>] 48,691       143K/s   in 0.3s  

13:35:33 (143 KB/s) - `summary' saved [48691/48691]

[root@rac1 ~]# ls
anaconda-ks.cfg     oradiag_root      smartmontools-5.38-2.el5.x86_64.rpm
install.log         proc_mon_del.prc  summary
install.log.syslog  rpmfor_oracle.sh  test_1.sql
修改屬性:
[root@rac1 ~]# chmod a+x summary
執行:
[root@rac1 ~]# ./summary
# Aspersa System Summary Report ##############################
        Date | 2011-03-29 05:35:53 UTC (local TZ: CST +0800)
    Hostname | rac1
      Uptime | 46 days, 3:10, 2 users, load average: 0.20, 0.14, 0.10
      System | VMware, Inc.; VMware Virtual Platform; vNone ()
 Service Tag | VMware-56 4d 75 0d d7 21 67 43-59 e2 dc b0 f5 99 59 87
    Platform. Linux
     Release | Red Hat Enterprise Linux Server release 5.3 (Tikanga)
      Kernel | 2.6.18-128.el5
Architecture | CPU = 64-bit, S = 64-bit
   Threading | NPTL 2.5
    Compiler | GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-44).
     SELinux | Disabled
 Virtualized | VMWare
# Processor ##################################################
  Processors | physical = 8, cores = 0, virtual = 8, hyperthreading = no
      Speeds | 8x2533.074
      Models | 8xIntel(R) Xeon(R) CPU E5540 @ 2.53GHz
      Caches | 8x8192 KB
# Memory #####################################################
       Total | 11.73G
        Free | 6.03G
        Used | physical = 5.70G, swap = 168.00k, virtual = 5.70G
     Buffers | 208.09M
      Caches | 3.83G
       Dirty | 25560 kB
     UsedRSS | 5.1G
  Swappiness | vm.swappiness = 60
 DirtyPolicy | vm.dirty_ratio = 40, vm.dirty_background_ratio = 10
  Locator   Size     Speed             Form. Factor   Type          Type Detail
  ========= ======== ================= ============= ============= ===========
  RAM slot #1 4096 MB  Unknown           DIMM          DRAM          EDO    
  RAM slot #0 8192 MB  Unknown           DIMM          DRAM          EDO    
  RAM slot #10 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #11 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #12 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #13 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #14 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #2 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #3 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #4 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #5 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #6 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #7 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #8 {EMPTY}  Unknown           DIMM          DRAM          Unknown
  RAM slot #9 {EMPTY}  Unknown           DIMM          DRAM          Unknown
# Mounted Filesystems ########################################
  Filesystem  Size Used Type  Opts Mountpoint
  /dev/sda1    99M  13% ext3  rw   /boot
  /dev/sda3    22G  86% ext3  rw   /
  tmpfs       5.9G  39% tmpfs rw   /dev/shm
# Disk Schedulers And Queue Size #############################
         hdc | [cfq] 128
         sda | [cfq] 128
         sdb | [cfq] 128
         sdc | [cfq] 128
         sdd | [cfq] 128
         sde | [cfq] 128
# Disk Partioning ############################################
Device       Type      Start        End               Size
============ ==== ========== ========== ==================
/dev/hdc     Disk                               3551012864
/dev/sda     Disk                              27917287424
/dev/sda1    Part          1         13           98703360
/dev/sda2    Part         14        535         4285370880
/dev/sda3    Part        536       3394        23507850240
/dev/sdb     Disk                              53687091200
/dev/sdb1    Part          1        125         1019934720
/dev/sdb2    Part        126        250         1019934720
/dev/sdb3    Part        251        375         1019934720
/dev/sdb4    Part        376       6527        50593697280
/dev/sdc     Disk                              53687091200
/dev/sdc1    Part          1       6527        53678177280
/dev/sdd     Disk                              53687091200
/dev/sdd1    Part          1       6527        53678177280
/dev/sde     Disk                              53687091200
/dev/sde1    Part          1       6527        53678177280
# Kernel Inode State #########################################
dentry-state | 195434 188551 45 0 0 0
     file-nr | 22950 0 6553600
    inode-nr | 161274 24621
# LVM Volumes ################################################
# RAID Controller ############################################
  Controller | No RAID controller detected
# Network Config #############################################
  Controller | Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
  Controller | Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
 FIN Timeout | net.ipv4.tcp_fin_timeout = 60
  Port Range | net.ipv4.ip_local_port_range = 9000 65500
# Interface Statistics #######################################
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
  ========= ========= ========== ========== ========== ========== ==========
  lo       2000000000   45000000          0 2000000000   45000000          0
  eth0     4000000000   17500000          0 2500000000   30000000          0
  eth1     4000000000  200000000          0 4000000000  175000000          0
  sit0              0          0          0          0          0          0
# Network Connections ########################################
  Connections from remote IP addresses
    10.1.151.111        1
    10.1.151.112        3
    10.1.151.113        1
    10.1.151.115        4
    10.1.151.119        4
    10.1.151.120        1
    10.10.10.112        4
    10.10.10.113        9
    10.250.3.43         1
    127.0.0.1           8
  Connections to local IP addresses
    10.1.151.111       10
    10.1.151.115        5
    10.10.10.111       15
    127.0.0.1           8
  Connections to top 10 local ports
    1521                3
    52095               1
    52096               1
    54058               1
    54525               1
    55196               1
    58038               1
    58656               1
    6100                3
    61577               1
  States of connections
    ESTABLISHED        35
    LISTEN             35
    TIME_WAIT           5
# Top Processes ##############################################
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 9869 oracle    15   0 5105m  54m  35m S  2.0  0.5  15:01.27 oracle
    1 root      15   0 10344  684  572 S  0.0  0.0   0:18.55 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:11.28 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.11 ksoftirqd/0
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:08.16 migration/1
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.50 ksoftirqd/1
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1
    8 root      RT  -5     0    0    0 S  0.0  0.0   0:08.22 migration/2
# Simplified and fuzzy rounded vmstat (wait please) ##########
  procs  ---swap-- -----io---- ---system---- --------cpu--------
   r  b    si   so    bi    bo     ir     cs  us  sy  il  wa  st
   0  0     0    0    30    35      0      0   0   0  99   0   0
   0  0     0    0    50   100   1000   5000   0   0 100   0   0
   0  0     0    0    50   100   1000   5000   0   0 100   0   0
   0  0     0    0   300   600   1000   5000   0   0  98   2   0
   0  0     0    0   300   100   1250   5000   0   0 100   0   0
# The End ####################################################

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-691200/,如需轉載,請註明出處,否則將追究法律責任。

相關文章