日期:2014-05-16  浏览次数:20659 次

Linux系统信息查询命令

来自:http://happylei2000.blog.163.com/blog/static/1862094120107139622557/

拿到一个系统,肯定要看看系统配置,linux下看配置,可没有windows那么直观。你只能一个一个查看。
一:cpu
[root@srv /]#?more /proc/cpuinfo | grep "model name"
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
[root@srv /]#?grep "model name" /proc/cpuinfo
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
model name? ?? ? : Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
[root@srv /]#?grep "model name" /proc/cpuinfo | cut -f2 -d:
Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
Intel(R) Xeon(R) CPU? ?? ?? ?? ?X3220 @ 2.40GHz
二:内存
[root@srv /]#?grep MemTotal /proc/meminfo
MemTotal:? ?? ???614400 kB
[root@srv /]#?free -m
? ?? ?? ?? ?? ?? ???total? ?? ???used? ?? ???free? ?? ?shared? ???buffers? ?? ?cached
Mem:? ?? ?? ?? ?600? ?? ?? ? 23? ?? ?? ?576? ?? ?? ???0? ?? ?? ???0? ?? ?? ???0
-/+ buffers/cache:? ?? ?? ? 23? ?? ?? ?576
Swap:? ?? ?? ?? ? 0? ?? ?? ???0? ?? ?? ???0
[root@srv /]#?free -m |grep "Mem" |?awk?'{print $2}'
600
三:查看CPU位数(32 or 64)
[root@srv /]#?getconf LONG_BIT
32
四:查看linux版本
[root@srv /]#?more /etc/redhat-release
CentOS release 5 (Final)
[root@srv /]#?more /etc/issue
CentOS release 5 (Final)
Kernel?\r on an \m

[root@srv /]#?more /proc/version
Linux version 2.6.18-92.1.18.el5.028stab060.2PAE ([email=root@rhel5-32-build-xemul]root@rhel5-32-build-xemul[/email]) (gc
c version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Tue Jan 13 12:31:30 MSK 2009