您的位置:首页 > 运维架构 > Linux

Linux系统、版本、CPU、内存查看、硬盘空间

2013-04-07 17:22 549 查看
查看系统版本:lsb_release -a

[root@localhost /]# lsb_release -a

LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

Distributor ID: CentOS

Description: CentOS release 6.1 (Final)

Release: 6.1

Codename: Final

查看内核版本:uname -a

Linux localhost.localdomain 2.6.32-131.0.15.el6.x86_64 #1 SMP Sat Nov 12 15:11:58 CST 2011 x86_64 x86_64 x86_64 GNU/Linux

查看cpu型号:cat /proc/cpuinfo

[root@localhost /]# cat /proc/cpuinfo

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 26

model name : Intel(R) Xeon(R) CPU E5506 @ 2.13GHz

......

查看硬盘空间情况df -lm

[root@localhost /]# df -l

文件系统 1K-块 已用 可用 已用% 挂载点

/dev/sda3 604758736 20379244 553659492 4% /

tmpfs 8160484 0 8160484 0% /dev/shm

/dev/sda1 495844 35901 434343 8% /boot

/dev/sda5 302379456 4760128 282259328 2% /opt

查看内存:free -m

[root@localhost /]# free -mt

total used free shared buffers cached

Mem: 15938 14204 1734 0 356 10597

-/+ buffers/cache: 3250 12688

Swap: 19997 0 19997

Total: 35936 14204 21732

Swap为虚拟内存,当物理内存不够时,系统就会使用到swap,但swap速度比真实内存的速度要慢的多,当你电脑用到swap的时候,说明你内存不够了,需要加内存

free

说 明:显示内存状态。

语  法: free [-bkmotV][-s <间隔秒数>]

补充说明:free指令会显示内存的使用情况,包括实体内存,虚拟的交换文件内存,共享内存区段,以及系统核心使用的缓冲区等。

参  数:

 -b  以Byte为单位显示内存使用情况。

 -k  以KB为单位显示内存使用情况。

 -m  以MB为单位显示内存使用情况。

 -o  不显示缓冲区调节列。

 -s<间隔秒数>  持续观察内存使用状况。

 -t  显示内存总和列。

 -V  显示版本信息。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: