查看CPU信息(型号)
[file@dell ~]$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c8 Intel(R) Xeon(R) CPU E5-2609 0 @ 2.40GHz
(看到有8个逻辑CPU, 也知道了CPU型号)
[file@dell ~]$ cat /proc/cpuinfo | grep physical | uniq -c1 physical id: 01 address sizes : 46 bits physical, 48 bits virtual1 physical id: 11 address sizes : 46 bits physical, 48 bits virtual1 physical id: 01 address sizes : 46 bits physical, 48 bits virtual1 physical id: 11 address sizes : 46 bits physical, 48 bits virtual1 physical id: 01 address sizes : 46 bits physical, 48 bits virtual1 physical id: 11 address sizes : 46 bits physical, 48 bits virtual1 physical id: 01 address sizes : 46 bits physical, 48 bits virtual1 physical id: 11 address sizes : 46 bits physical, 48 bits virtual
查看系统是32位还是64位
[file@dell ~]$ getconf LONG_BIT64
(说明当前CPU运行在64bit模式下)
[file@dell ~]$ cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l8
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
使用uname查看
[root@intimeam webserver]# uname -aLinux intimeam 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:35 EDT i686 i686 i386 GNU/Linux
or
[file@dell ~]$ uname -aLinux dell.product.1 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC x86_64 x86_64 x86_64 GNU/Linux
查看内存信息
[file@dell ~]$ cat /proc/meminfoMemTotal: 32832632 kBMemFree:218412 kBBuffers:361224 kBCached: 29730616 kBSwapCached: 193732 kBActive: 19432752 kBInactive: 11796784 kBActive(anon): 7629320 kBInactive(anon): 759048 kBActive(file): 11803432 kBInactive(file): 11037736 kBUnevictable: 0 kBMlocked:0 kBSwapTotal:83886072 kBSwapFree: 82672268 kBDirty:252 kBWriteback: 4 kBAnonPages: 948744 kBMapped:5956452 kBShmem: 7250672 kBSlab: 651876 kBSReclaimable:588616 kBSUnreclaim: 63260 kBKernelStack: 6248 kBPageTables: 289524 kBNFS_Unstable:0 kBBounce:0 kBWritebackTmp:0 kBCommitLimit: 100302388 kBCommitted_AS: 10656796 kBVmallocTotal: 34359738367 kBVmallocUsed:350400 kBVmallocChunk: 34342238608 kBHardwareCorrupted:0 kBAnonHugePages: 534528 kBHugePages_Total: 0HugePages_Free: 0HugePages_Rsvd: 0HugePages_Surp: 0Hugepagesize: 2048 kBDirectMap4k: 5056 kBDirectMap2M:2045952 kBDirectMap1G: 31457280 kB
查看当前操作系统发行版信息
[file@dell ~]$ cat /etc/issueCentOS release 6.3 (Final)Kernel \r on an \m
查看机器型号(需要root权限)
[root@intimeam webserver]# dmidecode | grep "Product Name"Product Name: VMware Virtual PlatformProduct Name: 440BX Desktop Reference Platform
查看网卡信息
[webserver@intimeam ~]$ dmesg | grep -i etheth0: registered as PCnet/PCI II 79C970Aeth0: link upeth0: no IPv6 routers present