(2011-1-13)洞悉Linux系统软硬件配置(summary)

(2011-1-13)洞悉Linux系统软硬件配置(summary)

编辑文章

比如说想知道Linux的系统的版本,CPU有几个,内存多少大, 机器什么型号,Raid卡什么型号,硬盘有几个,文件系统是什么样子的,网卡什么型号,文件句柄设置什么的,用到虚拟化技术了吗,网络配置什么样的,目前资源使用是如何?

当然如果你足够有经验的话,这些问题难不倒你,但是你获取完全的这些信息是很麻烦的,使用这个脚本可以一步到位。

本文HTML永久地址doc

下载和运行

wget http://aspersa.googlecode.com/svn/trunk/summary
bash summary
独立服务器输出: 从下面可以看到 主板为:Gigabyte (技嘉主板), 系统为:centos 5.5 CPU架构为:64位 ,处理器为:Core(TM)2 Duo CPU E7500 @ 2.93GHz 内存:4G (2条2G内存)频率为400MHz 文件分区: 磁盘:500GB (无RAID) 虚拟技术:无 网卡:Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller 特色:可以比较方便检查出使用哪种虚拟技术

[[email protected]]# bash summary
# Aspersa System Summary Report ##############################
        Date | 2011-01-09 03:22:24 UTC (local TZ: CST +0800)
    Hostname | standalone-server.lihaixin.name
      Uptime | 3 days,  9:11,  1 user,  load average: 0.00, 0.00, 0.00
      System | Gigabyte Technology Co., Ltd.; G41MT-D3; v (Desktop)
 Service Tag | Not found
     Release | CentOS release 5.5 (Final)
      Kernel | 2.6.18-194.26.1.el5
Architecture | CPU = 64-bit, OS = 64-bit
   Threading | NPTL 2.5
    Compiler | GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-48).
     SELinux | Disabled
# Processor ##################################################
  Processors | physical = 1, cores = 2, virtual = 2, hyperthreading = no
      Speeds | 2x2933.296
      Models | 2xIntel(R) Core(TM)2 Duo CPU E7500 @ 2.93GHz
      Caches | 2x3072 KB
# Memory #####################################################
       Total | 3.83G
        Free | 3.26G
        Used | physical = 582.30M, swap = 0.00k, virtual = 582.30M
     Buffers | 160.05M
      Caches | 317.02M
        Used | 69.40M
  Swappiness | vm.swappiness = 60
 DirtyPolicy | vm.dirty_ratio = 40, vm.dirty_background_ratio = 10
  Locator   Size     Speed             Form Factor   Type          Type Detail
  ========= ======== ================= ============= ============= ===========
  A0        2048 MB  400 MHz           DIMM          Unknown       None
  A2        2048 MB  400 MHz           DIMM          Unknown       None
  A1        {EMPTY}  Unknown           DIMM          Unknown       None
  A3        {EMPTY}  Unknown           DIMM          Unknown       None
# Mounted Filesystems ########################################
  Filesystem                       Size Used Type  Opts Mountpoint
  /dev/mapper/VolGroup00-LogVol00  446G   1% ext3  (rw) /
  /dev/sda1                         99M  21% ext3  (rw) /boot
  tmpfs                            2.0G   0% tmpfs (rw) /dev/shm
# Disk Schedulers And Queue Size #############################
         fd0 | [cfq] 128

         sda | [cfq] 128
# Disk Partioning ############################################
Device       Type      Start        End               Size
============ ==== ========== ========== ==================
/dev/sda     Disk                             500107862016
/dev/sda1    Part          1         13           98703360
/dev/sda2    Part         14      60801       499990095360
# Kernel Inode State #########################################
dentry-state | 42024    40271   45      0       0       0
     file-nr | 510      0       352183
    inode-nr | 39374    107
# LVM Volumes ################################################
  LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 459.88G
  LogVol01 VolGroup00 -wi-ao   5.78G
# RAID Controller ############################################
  Controller | No RAID controller detected
# Virtualization #############################################
  Technology | No virtualization detected
# Network Config #############################################
  Controller | Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
 FIN Timeout | net.ipv4.tcp_fin_timeout = 60
  Port Range | net.ipv4.ip_local_port_range = 32768     61000
# Interface Statistics #######################################
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
  ========= ========= ========== ========== ========== ========== ==========
  lo              800         16          0        800         16          0
  eth0      678073644  108652562          0  409534510  105585489          0
  sit0              0          0          0          0          0          0
  gre0              0          0          0          0          0          0
# Network Connections ########################################
  Connections from remote IP addresses
    192.168.3.12      7
  Connections to local IP addresses
    192.168.3.11       7
  Connections to top 10 local ports
    22               7
  States of connections
    ESTABLISHED         9
    LISTEN              3
# Top Processes ##############################################
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
19078 root      15   0  5912  628  512 S  2.0  0.0   3:50.00 pptpctrl
19298 root      15   0  5912  640  512 S  2.0  0.0   3:55.82 pptpctrl
    1 root      15   0 10352  692  580 S  0.0  0.0   0:00.45 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 R  0.0  0.0   8:36.31 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:00.00 migration/1
    6 root      34  19     0    0    0 S  0.0  0.0   0:14.52 ksoftirqd/1
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1
# Simplified vmstat (wait please) ############################
  procs  ---swap-- -----io---- ---system---- --------cpu--------
   r  b    si   so    bi    bo     in     cs  us  sy  id  wa  st
   1  0     0    0     1    10     45     41   0   1  99   0   0
   0  0     0    0     0     0   1841   2802   0   1  99   0   0
   0  0     0    0     0     0   1712   2435   0   1 100   0   0
   0  0     0    0     0     0   1792   2750   0   1  99   0   0
   0  0     0    0     0     0   1994   3239   0   2  98   0   0
# The End ####################################################
[[email protected]]#

xen VPS输出:


[[email protected]]# bash summary
# Aspersa System Summary Report ##############################
        Date | 2011-01-09 04:29:57 UTC (local TZ: EST -0500)
    Hostname | xen-vps.lihaixin.name
      Uptime | 23 days,  2:12,  1 user,  load average: 0.07, 0.02, 0.00
     Release | CentOS release 5.5 (Final)
      Kernel | 2.6.18-164.15.1.el5xen
Architecture | CPU = 64-bit, OS = 32-bit
   Threading | NPTL 2.5
    Compiler | GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-48).
     SELinux | No SELinux detected
# Processor ##################################################
  Processors | physical = 4, cores = 4, virtual = 4, hyperthreading = no
      Speeds | 4x2493.748
      Models | 4xIntel(R) Xeon(R) CPU L5420 @ 2.50GHz
      Caches | 4x6144 KB
# Memory #####################################################
       Total | 64.00M
        Free | 9.33M
        Used | physical = 54.67M, swap = 68.00k, virtual = 54.73M
     Buffers | 692.00k
      Caches | 23.48M
        Used | 12.43M
  Swappiness | vm.swappiness = 60
 DirtyPolicy | vm.dirty_ratio = 40, vm.dirty_background_ratio = 10
# Mounted Filesystems ########################################
  Filesystem  Size Used Type Opts                                                        Mountpoint
  /dev/sda1   7.9G  11% ext3 (rw,noatime,nodiratime,usrquota,grpquota,errors=remount-ro) /
# Disk Schedulers And Queue Size #############################
        sda1 | [noop] 128
        sda2 | [noop] 128
# Disk Partioning ############################################
Device       Type      Start        End               Size
============ ==== ========== ========== ==================
/dev/sda1    Disk                               8589934592
/dev/sda2    Disk                                268435456
# Kernel Inode State #########################################
dentry-state | 1604     767     45      0       0       0
     file-nr | 1        0       8192
    inode-nr | 1444     102
# LVM Volumes ################################################
Cannot execute 'lvs'
# RAID Controller ############################################
  Controller | No RAID controller detected
# Virtualization #############################################
  Technology | Xen
# Network Config #############################################
 FIN Timeout | net.ipv4.tcp_fin_timeout = 60
  Port Range | net.ipv4.ip_local_port_range = 32768     61000
# Interface Statistics #######################################
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
  ========= ========= ========== ========== ========== ========== ==========
  lo                0          0          0          0          0          0
  eth0     1410642424  115327915          0 2962881505   15256963          0
  sit0              0          0          0          0          0          0
# Network Connections ########################################
  Connections from remote IP addresses
    192.168.3.12        1
  Connections to local IP addresses
    192.168.3.10        1
  Connections to top 10 local ports
    41992               1
  States of connections
    ESTABLISHED         1
    LISTEN              2
    TIME_WAIT           1
# Top Processes ##############################################
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2156  720  624 S  0.0  1.1   0:00.02 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.04 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.14 ksoftirqd/0
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    5 root      10  -5     0    0    0 S  0.0  0.0   0:00.30 events/0
    6 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khelper
    7 root      11  -5     0    0    0 S  0.0  0.0   0:00.00 kthread
    9 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 xenwatch
   10 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 xenbus
# Simplified vmstat (wait please) ############################
  procs  ---swap-- -----io---- ---system---- --------cpu--------
   r  b    si   so    bi    bo     in     cs  us  sy  id  wa  st
   0  0     0    0     0     0      3      0   0   0 100   0   0
   0  0     0    0     0     0     63     16   0   0  99   0   0
   0  0     0    0     0     0     25     10   0   0 100   0   0
   0  0     0    0     0     0     32     16   0   0 100   0   0
   0  0     0    0     0    40     50     22   0   0 100   0   0
# The End ####################################################
[[email protected]]#

openvz VPS输出:


[[email protected]]# bash summary
# Aspersa System Summary Report ##############################
        Date | 2011-01-09 03:27:09 UTC (local TZ: CST +0800)
    Hostname | openvz-vps.lihaixin.name
      Uptime | 16 days,  7:24,  1 user,  load average: 0.00, 0.01, 0.00
     Release | CentOS release 5.5 (Final)
      Kernel | 2.6.18-128.2.1.el5.028stab064.7
Architecture | CPU = 64-bit, OS = 32-bit
   Threading | NPTL 2.5
    Compiler | GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-48).
     SELinux | Disabled
# Processor ##################################################
  Processors | physical = 1, cores = 4, virtual = 1, hyperthreading = no
      Speeds | 1x2010.311
      Models | 1xQuad-Core AMD Opteron(tm) Processor 8350
      Caches | 1x512 KB
# Memory #####################################################
       Total | 512.00M
        Free | 483.62M
        Used | physical = 28.38M, swap = 0.00k, virtual = 28.38M
     Buffers | 0.00k
      Caches | 0.00k
        Used | 28.56M
  Swappiness | vm.swappiness = 60
 DirtyPolicy | vm.dirty_ratio = 40, vm.dirty_background_ratio = 10
# Mounted Filesystems ########################################
  Filesystem  Size Used Type        Opts                   Mountpoint
  /dev/simfs  5.0G  73% reiserfs    (rw,usrquota,grpquota) /
  none        6.9G   1% devpts      (rw)                   /dev
  none        6.9G   1% tmpfs       (rw)                   /dev
  none        6.9G   1% binfmt_misc (rw)                   /dev
# Disk Schedulers And Queue Size #############################
ls: /sys/block/: No such file or directory
# Disk Partioning ############################################
Device       Type      Start        End               Size
============ ==== ========== ========== ==================
# Kernel Inode State #########################################
dentry-state | 973640   871533  45      0       0       0
     file-nr | 1020     0       1370414
    inode-nr | 677620   152
# LVM Volumes ################################################
# RAID Controller ############################################
  Controller | No RAID controller detected
# Virtualization #############################################
  Technology | OpenVZ/Virtuozzo
# Network Config #############################################
 FIN Timeout | net.ipv4.tcp_fin_timeout = 60
  Port Range | net.ipv4.ip_local_port_range = 32768     61000
# Interface Statistics #######################################
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
  ========= ========= ========== ========== ========== ========== ==========
  lo          2630208      31312          0    2630208      31312          0
  venet0   1203049805    7531785          0 1188561544    8330800          0
# Network Connections ########################################
  Connections from remote IP addresses
    12.129.206.130      1
    199.107.6.170       1
    199.107.6.173       1
    222.55.32.188       3
  Connections to local IP addresses
    192.168.3.9         6
  Connections to top 10 local ports
    34896               1
    41869               1
    59184               1
    7777                3
  States of connections
    ESTABLISHED         7
    LISTEN              6
# Top Processes ##############################################
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2148  664  568 S  0.0  0.1   0:08.35 init
17517 root      16  -4  2240  552  344 S  0.0  0.1   0:00.00 udevd
18058 root      16   0  1804  572  476 S  0.0  0.1   0:09.15 syslogd
18109 root      18   0  7172 1068  664 S  0.0  0.2   0:00.00 sshd
18404 root      15   0 17596 6996 4392 S  0.0  1.3   0:26.15 httpd
18421 root      16   0  4484 1112  568 S  0.0  0.2   0:10.62 crond
19555 nobody    18   0 11964 2452 1060 S  0.0  0.5   4:46.46 ss5
27893 root      15   0  5032 1476  848 S  0.0  0.3   0:00.00 crond
27895 root      18   0  2484  956  844 S  0.0  0.2   0:00.00 sh
# Simplified vmstat (wait please) ############################
  procs  ---swap-- -----io---- ---system---- --------cpu--------
   r  b    si   so    bi    bo     in     cs  us  sy  id  wa  st
   1  0     0    0     0     0      0      4   0   1  99   0   0
   0  0     0    0     0     0      0   1808   1   1  98   0   0
   0  0     0    0     0     0      0   2164   1   3  96   0   0
   0  0     0    0     0     0      0   1345   1   1  98   0   0
   0  0     0    0     0     0      0   1947   0   2  98   0   0
# The End ####################################################
[[email protected]]#

vmware VPS输出:


[[email protected]]# bash summary
# Aspersa System Summary Report ##############################
        Date | 2011-01-08 22:11:36 UTC (local TZ: EST -0500)
    Hostname | vmware-vps.lihaixin.name
      Uptime | 362 days, 17:10,  1 user,  load average: 0.00, 0.00, 0.00
      System | VMware, Inc.; VMware Virtual Platform; vNone (Other)
 Service Tag | VMware-56 4d 46 cb 38 3b fe 6f-68 4b 9c 03 ea ce f1 83
     Release | CentOS release 5.5 (Final)
      Kernel | 2.6.18-164.el5
Architecture | CPU = 32-bit, OS = 32-bit
   Threading | NPTL 2.5
    Compiler | GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-48).
     SELinux | Disabled
# Processor ##################################################
  Processors | physical = 2, cores = 0, virtual = 2, hyperthreading = no
      Speeds | 2x2327.500
      Models | 2xIntel(R) Xeon(R) CPU E5410 @ 2.33GHz
      Caches | 2x6144 KB
# Memory #####################################################
       Total | 249.41M
        Free | 4.23M
        Used | physical = 245.18M, swap = 60.00k, virtual = 245.24M
     Buffers | 116.96M
      Caches | 86.34M
        Used | 24.39M
  Swappiness | vm.swappiness = 60
 DirtyPolicy | vm.dirty_ratio = 40, vm.dirty_background_ratio = 10
  Locator   Size     Speed             Form Factor   Type          Type Detail
  ========= ======== ================= ============= ============= ===========
  RAM slot #0 256 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 #1 {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/mapper/VolGroup00-LogVol00   20G  56% ext3  (rw) /
  /dev/sda1                         99M  91% ext3  (rw) /boot
  tmpfs                            125M   0% tmpfs (rw) /dev/shm
# Disk Schedulers And Queue Size #############################
         fd0 | [cfq] 128
         hdc | [cfq] 128
         sda | [cfq] 128
# Disk Partioning ############################################
Device       Type      Start        End               Size
============ ==== ========== ========== ==================
/dev/sda     Disk                              22548578304
/dev/sda1    Part          1         13           98703360
/dev/sda2    Part         14       2741        2.24303e+10
# Kernel Inode State #########################################
dentry-state | 39605    31291   45      0       0       0
     file-nr | 384      0       24652
    inode-nr | 37854    268
# LVM Volumes ################################################
  /dev/hdc: open failed: No medium found
  LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao  20.38G
  LogVol01 VolGroup00 -wi-ao 512.00M
# RAID Controller ############################################
  Controller | No RAID controller detected
# Virtualization #############################################
  Technology | VMWare
# Network Config #############################################
  Controller | Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)
 FIN Timeout | net.ipv4.tcp_fin_timeout = 60
  Port Range | net.ipv4.ip_local_port_range = 32768     61000
# Interface Statistics #######################################
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
  ========= ========= ========== ========== ========== ========== ==========
  lo         65947750     580190          0   65947750     580190          0
  eth0      498421808  300426973         46  790855799  300432687          0
  sit0              0          0          0          0          0          0
# Network Connections ########################################
  Connections from remote IP addresses
  Connections to local IP addresses
  Connections to top 10 local ports
  States of connections
    ESTABLISHED         1
    LISTEN              4
# Top Processes ##############################################
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2072  648  560 S  0.0  0.3   0:02.70 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:49.68 migration/0
    3 root      38  19     0    0    0 S  0.0  0.0   8:44.05 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:35.91 migration/1
    6 root      34  19     0    0    0 S  0.0  0.0   0:23.45 ksoftirqd/1
    7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1
    8 root      10  -5     0    0    0 S  0.0  0.0   0:00.54 events/0
    9 root      10  -5     0    0    0 S  0.0  0.0   0:00.08 events/1
# Simplified vmstat (wait please) ############################
  procs  ---swap-- -----io---- ---system---- --------cpu--------
   r  b    si   so    bi    bo     in     cs  us  sy  id  wa  st
   0  0     0    0     2     4      0      0   0   0 100   0   0
   0  0     0    0     0     0    982     10   0   0 100   0   0
   0  0     0    0     0     0    976     11   0   0 100   0   0
   0  0     0    0     0     0    975      8   0   0 100   0   0
   0  0     0    0     0     0    970     13   0   0 100   0   0
# The End ####################################################
[[email protected]]#

Hyper-V VPS输出:


[[email protected] ~]# sh summary
# Aspersa System Summary Report ##############################
        Date | 2011-01-21 14:15:39 UTC (local TZ: CST +0800)
    Hostname | Hyper-V.lihaixin.name
      Uptime |  1:43,  1 user,  load average: 0.00, 0.00, 0.00
      System | Microsoft Corporation; Virtual Machine; v7.0 (Desktop)
 Service Tag | 4279-2802-0128-1874-2898-9041-23
     Release | CentOS release 5.5 (Final)
      Kernel | 2.6.18-194.el5
Architecture | CPU = 64-bit, OS = 32-bit
   Threading | NPTL 2.5
    Compiler | GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-48).
     SELinux | Disabled
# Processor ##################################################
  Processors | physical = 1, cores = 4, virtual = 4, hyperthreading = no
      Speeds | 4x2117.087
      Models | 4xIntel(R) Xeon(R) CPU E5506 @ 2.13GHz
      Caches | 4x4096 KB
# Memory #####################################################
       Total | 376.14M
        Free | 313.77M
        Used | physical = 62.36M, swap = 0.00k, virtual = 62.36M
     Buffers | 8.88M
      Caches | 34.50M
        Used | 15.32M
  Swappiness | vm.swappiness = 60
 DirtyPolicy | vm.dirty_ratio = 40, vm.dirty_background_ratio = 10
  Locator   Size     Speed             Form Factor   Type          Type Detail
  ========= ======== ================= ============= ============= ===========
  M0        384 MB   Unknown           Unknown       Other         Unknown
  M10       {EMPTY}  Unknown           Unknown       Other         Unknown
  M11       {EMPTY}  Unknown           Unknown       Other         Unknown
  M12       {EMPTY}  Unknown           Unknown       Other         Unknown
  M13       {EMPTY}  Unknown           Unknown       Other         Unknown
  M14       {EMPTY}  Unknown           Unknown       Other         Unknown
  M15       {EMPTY}  Unknown           Unknown       Other         Unknown
  M16       {EMPTY}  Unknown           Unknown       Other         Unknown
  M17       {EMPTY}  Unknown           Unknown       Other         Unknown
  M18       {EMPTY}  Unknown           Unknown       Other         Unknown
  M19       {EMPTY}  Unknown           Unknown       Other         Unknown
  M1        {EMPTY}  Unknown           Unknown       Other         Unknown
  M20       {EMPTY}  Unknown           Unknown       Other         Unknown
  M21       {EMPTY}  Unknown           Unknown       Other         Unknown
  M22       {EMPTY}  Unknown           Unknown       Other         Unknown
  M23       {EMPTY}  Unknown           Unknown       Other         Unknown
  M24       {EMPTY}  Unknown           Unknown       Other         Unknown
  M25       {EMPTY}  Unknown           Unknown       Other         Unknown
  M26       {EMPTY}  Unknown           Unknown       Other         Unknown
  M27       {EMPTY}  Unknown           Unknown       Other         Unknown
  M28       {EMPTY}  Unknown           Unknown       Other         Unknown
  M29       {EMPTY}  Unknown           Unknown       Other         Unknown
  M2        {EMPTY}  Unknown           Unknown       Other         Unknown
  M30       {EMPTY}  Unknown           Unknown       Other         Unknown
  M31       {EMPTY}  Unknown           Unknown       Other         Unknown
  M32       {EMPTY}  Unknown           Unknown       Other         Unknown
  M33       {EMPTY}  Unknown           Unknown       Other         Unknown
  M34       {EMPTY}  Unknown           Unknown       Other         Unknown
  M35       {EMPTY}  Unknown           Unknown       Other         Unknown
  M36       {EMPTY}  Unknown           Unknown       Other         Unknown
  M37       {EMPTY}  Unknown           Unknown       Other         Unknown
  M38       {EMPTY}  Unknown           Unknown       Other         Unknown
  M39       {EMPTY}  Unknown           Unknown       Other         Unknown
  M3        {EMPTY}  Unknown           Unknown       Other         Unknown
  M40       {EMPTY}  Unknown           Unknown       Other         Unknown
  M41       {EMPTY}  Unknown           Unknown       Other         Unknown
  M42       {EMPTY}  Unknown           Unknown       Other         Unknown
  M43       {EMPTY}  Unknown           Unknown       Other         Unknown
  M44       {EMPTY}  Unknown           Unknown       Other         Unknown
  M45       {EMPTY}  Unknown           Unknown       Other         Unknown
  M46       {EMPTY}  Unknown           Unknown       Other         Unknown
  M47       {EMPTY}  Unknown           Unknown       Other         Unknown
  M48       {EMPTY}  Unknown           Unknown       Other         Unknown
  M49       {EMPTY}  Unknown           Unknown       Other         Unknown
  M4        {EMPTY}  Unknown           Unknown       Other         Unknown
  M50       {EMPTY}  Unknown           Unknown       Other         Unknown
  M51       {EMPTY}  Unknown           Unknown       Other         Unknown
  M52       {EMPTY}  Unknown           Unknown       Other         Unknown
  M53       {EMPTY}  Unknown           Unknown       Other         Unknown
  M54       {EMPTY}  Unknown           Unknown       Other         Unknown
  M55       {EMPTY}  Unknown           Unknown       Other         Unknown
  M56       {EMPTY}  Unknown           Unknown       Other         Unknown
  M57       {EMPTY}  Unknown           Unknown       Other         Unknown
  M58       {EMPTY}  Unknown           Unknown       Other         Unknown
  M59       {EMPTY}  Unknown           Unknown       Other         Unknown
  M5        {EMPTY}  Unknown           Unknown       Other         Unknown
  M60       {EMPTY}  Unknown           Unknown       Other         Unknown
  M61       {EMPTY}  Unknown           Unknown       Other         Unknown
  M62       {EMPTY}  Unknown           Unknown       Other         Unknown
  M63       {EMPTY}  Unknown           Unknown       Other         Unknown
  M6        {EMPTY}  Unknown           Unknown       Other         Unknown
  M7        {EMPTY}  Unknown           Unknown       Other         Unknown
  M8        {EMPTY}  Unknown           Unknown       Other         Unknown
  M9        {EMPTY}  Unknown           Unknown       Other         Unknown
# Mounted Filesystems ########################################
  Filesystem                       Size Used Type  Opts Mountpoint
  /dev/hda1                         99M  17% ext3  (rw) /boot
  /dev/mapper/VolGroup00-LogVol00  7.7G  43% ext3  (rw) /
  tmpfs                            189M   0% tmpfs (rw) /dev/shm
# Disk Schedulers And Queue Size #############################
         fd0 | [cfq] 128
         hda | [cfq] 128
         hdc | [cfq] 128
# Disk Partioning ############################################
Device       Type      Start        End               Size
============ ==== ========== ========== ==================
/dev/hda     Disk                              21474836480
/dev/hda1    Part          1         13           98703360
/dev/hda2    Part         14       1305        1.06188e+10
# Kernel Inode State #########################################
dentry-state | 3422     2141    45      0       0       0
     file-nr | 192      0       37566
    inode-nr | 3047     227
# LVM Volumes ################################################
  /dev/hdc: open failed: No medium found
  LV       VG         Attr   LSize Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 7.88G
  LogVol01 VolGroup00 -wi-ao 2.00G
# RAID Controller ############################################
  Controller | No RAID controller detected
# Virtualization #############################################
  Technology | Microsoft VirtualPC
# Network Config #############################################
 FIN Timeout | net.ipv4.tcp_fin_timeout = 60
  Port Range | net.ipv4.ip_local_port_range = 32768     61000
# Interface Statistics #######################################
  interface  rx_bytes rx_packets  rx_errors   tx_bytes tx_packets  tx_errors
  ========= ========= ========== ========== ========== ========== ==========
  lo                0          0          0          0          0          0
  seth0     102621274      88977          0    6477974      33601          0
  sit0              0          0          0          0          0          0
  gre0              0          0          0          0          0          0
# Network Connections ########################################
  Connections from remote IP addresses
  Connections to local IP addresses
  Connections to top 10 local ports
  States of connections
    ESTABLISHED         1
    LISTEN              2
# Top Processes ##############################################
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    1 root      15   0  2072  632  544 S  0.0  0.2   0:01.31 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.02 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.21 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:00.01 migration/1
    6 root      34  19     0    0    0 S  0.0  0.0   0:00.00 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:00.01 migration/2
    9 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/2
# Simplified vmstat (wait please) ############################
  procs  ---swap-- -----io---- ---system---- --------cpu--------
   r  b    si   so    bi    bo     in     cs  us  sy  id  wa  st
   0  0     0    0     2     5    240      8   0   3  96   0   0
   0  0     0    0     0     0    857      6   0   6  94   0   0
   0  0     0    0     0     0    873      8   0   6  94   0   0
   0  0     0    0     0     0    884     18   0   5  95   0   0
   0  0     0    0     0     0    894     10   0   5  95   0   0
# The End ####################################################
[[email protected] ~]#

通过上面的输出,很方便的就可以查看本机是独立主机还是使用的虚拟技术的VPS。另外也可以通过这个网页介绍的方法检测使用哪种虚拟技术

参考文章:

项目地址: http://code.google.com/p/aspersa/ summary的使用文档: http://aspersa.googlecode.com/svn/html/summary.html

没有评论 :

发表评论