一半君的总结纸

听话只听一半君

Linux 下如何查询系统配置信息

人肉备份:

  • 查询cpu
    >cat /proc/cpuinfo
    
    processor       : 11
    vendor_id       : GenuineIntel
    cpu family      : 6           
    model           : 44          
    model name      : Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
    stepping        : 2                                              
    cpu MHz         : 2666.616                                       
    cache size      : 12288 KB                                       
    physical id     : 1                                              
    siblings        : 12                                             
    core id         : 10                                             
    cpu cores       : 6                                              
    apicid          : 53                                             
    initial apicid  : 53                                             
    fpu             : yes                                            
    fpu_exception   : yes                                            
    cpuid level     : 11                                             
    wp              : yes                                            
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt aes lahf_lm arat dts tpr_shadow vnmi flexpriority ept vpid
    bogomips        : 5333.23
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 40 bits physical, 48 bits virtual
    power management:
    

    或者

    > lscpu
    
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                12
    On-line CPU(s) list:   0-11
    Thread(s) per core:    2
    Core(s) per socket:    6
    Socket(s):             1
    NUMA node(s):          1
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 44
    Stepping:              2
    CPU MHz:               2666.616
    BogoMIPS:              5333.23
    Virtualization:        VT-x
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              256K
    L3 cache:              12288K
    NUMA node0 CPU(s):     0-11
    
  • 查询显卡
    > /sbin/lspci | grep -E "VGA|3D"
    
    04:00.0 VGA compatible controller: NVIDIA Corporation GF100GL [Quadro 6000] (rev a3)
    

    之后可以再用上面得到的 04:00.0 查询更详细信息

    > /sbin/lspci -v -s 04:00.0
    
    04:00.0 VGA compatible controller: NVIDIA Corporation GF100GL [Quadro 6000] (rev a3) (prog-if 00 [VGA controller])
            Subsystem: Hewlett-Packard Company Device 076f
            Flags: bus master, fast devsel, latency 0, IRQ 16
            Memory at f8000000 (32-bit, non-prefetchable) [size=32M]
            Memory at d8000000 (64-bit, prefetchable) [size=128M]
            Memory at d4000000 (64-bit, prefetchable) [size=64M]
            I/O ports at dc00 [size=128]
            [virtual] Expansion ROM at f7f80000 [disabled] [size=512K]
            Capabilities: <access denied>
            Kernel driver in use: nvidia
            Kernel modules: nvidia, nouveau, nvidiafb
    

    查询驱动版本号

    > cat /var/log/Xorg.0.log | grep -i driver | grep -i nv
    
    [    55.818] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
    [    55.889] (II) NVIDIA dlloader X Driver  319.32  Wed Jun 19 14:34:12 PDT 2013
    [    55.889] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
    [    57.838] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
    
  • 查询ram大小
    > cat /proc/meminfo
    
    MemTotal:       49416924 kB
    ...
    
  • 查询home directory剩余磁盘空间
    > df -h ~
    Filesystem            Size  Used Avail Use% Mounted on
    x.x.x.x:/home/fucker
                          10.0G  9.2G  800M  92% /home/fucker
    

ps:
如果没有dmidecode,可以自己装一个:

wget http://ftp.twaren.net/Unix/NonGNU/dmidecode/dmidecode-x.x.tar.gz
tar -zxvf dmidecode-x.x.tar.gz
cd dmidecode-x.x DESTDIR=~/somewhere
make
make install

如果没有lshw,也可以自己装

wget http://ezix.org/software/files/lshw-B.02.14.tar.gz
tar -zxvf lshw-B.02.14.tar.gz
cd lshw-B.02.14
make && make install

参考:
How to check graphics card on Linux
5 commands to check memory usage on Linux

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: