Linux硬件信息查询命令(1)
系统教程导读
收集整理了【Linux硬件信息查询命令(1)】操作系统教程,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含5733字,纯文字阅读大概需要9分钟。
系统教程内容图文
为您提供
系统
uname -a # 查看内核/操作系统/CPU信息
Linux hostname 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
head -n 1 /etc/issue # 查看操作系统版本
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
cat /proc
uinfo # 查看CPU信息
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
stepping : 2
cpu MHz : 2933.582
cache size : 12288 KB
physical id : 1
siblings : 12
core id : 0
cpu cores : 6
apicid : 32
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 syscall nx pdpe1gb rdtscp lm constant_tsc ida pni monitor ds_cpl vmx smx est tm2 cx16 xtpr popcnt lahf_lm
bogomips : 5871.13
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
hostname # 查看计算机主机名
hostname.com.cn
lspci -tv # 列出所有PCI设备
-[0000:00]-+-00.0 Intel Corporation 5500 I/O Hub to ESI Port
+-01.0-[02]–+-00.0 Broadcom Corporation NetXtreme II BCM57711E 10-G igabit PCIe
| -00.1 Broadcom Corporation NetXtreme II BCM57711E 10-G igabit PCIe
+-02.0-[0d]–
+-03.0-[03-05]–
+-07.0-[06-08]–
+-08.0-[11]–
+-09.0-[09-0b]–+-00.0 QLogic Corp. ISP2432-based 4Gb Fibre Channel
lsusb -tv # 列出所有USB设备
Bus# 6
`-Dev# 1 Vendor 0x0000 Product 0x0000
`-Dev# 2 Vendor 0x03f0 Product 0x1027
Bus# 5
`-Dev# 1 Vendor 0x0000 Product 0x0000
Bus# 4
`-Dev# 1 Vendor 0x0000 Product 0x0000
Bus# 3
`-Dev# 1 Vendor 0x0000 Product 0x0000
Bus# 2
`-Dev# 1 Vendor 0x0000 Product 0x0000
Bus# 1
`-Dev# 1 Vendor 0x0000 Product 0x0000
lsmod # 列出加载的内核模块 env # 查看环境变量资源
_=/bin/env
CVS_RSH=ssh
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOME=/root
INPUTRC=/etc/inputrc
KDEDIR=/usr
KDE_IS_PRELINKED=1
KDE_NO_IPV6=1
LANG=en_US.UTF-8
LESSOPEN=|/usr/bin/lesspipe.sh %s
LOGNAME=root
MAIL=
ar/spool/mail/root
PATH=/usr
b64
-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
free -m # 查看内存使用量和交换区使用量
total used free shared buffers cached
Mem: 48295 9647 38648 0 1165 4067
-/+ buffers/cache: 4413 43881
Swap: 3999 0 3999
df -h # 查看各分区使用情况
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootVG-root
83G 7.4G 72G 10% /
/dev/mapper/rootVG-tmp
3.9G 137M 3.6G 4% /tmp
/dev/mapper/rootVG-var
31G 5.1G 24G 18%
ar
du -sh <目录名> # 查看指定目录的大小
# du -sh /tmp
84K /tmp
grep MemTotal /proc/meminfo # 查看内存总量
<pre name="code" class="plain"># <span style="font-family: Arial, Helvetica, sans-serif;">grep MemTotal /proc/meminfo</span>
MemTotal: 16432172 kB
grep MemFree /proc/meminfo # 查看空闲内存量
# grep MemFree /proc/meminfo
MemFree: 12647164 kB
uptime # 查看系统运行时间、用户数、负载
14:15:28 up 4 days, 2:56, 1 user, load average: 1.17, 1.15, 1.10
cat /proc/loadavg # 查看系统负载
# cat /proc/loadavg
1.11 1.14 1.09 1/546 5175
磁盘和分区
mount | column -t # 查看挂接的分区状态
/dev/mapper/rootVG-root on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/rootVG-tmp on /tmp type ext3 (rw)
fdisk -l # 查看所有分区
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 19 152586 83 Linux
/dev/cciss/c0d0p2 20 17844 143179312+ 8e Linux LVM
Disk /dev/sdc: 384.3 GB, 384399572992 bytes
255 heads, 63 sectors/track, 46733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sde: 225.4 GB, 225485783040 bytes
255 heads, 63 sectors/track, 27413 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
swapon -s # 查看所有交换分区
Filename Type Size Used Priority
/dev/mapper/rootVG-swap partition 16777208 0 -1
hdparm -i /dev
a # 查看磁盘参数(仅适用于IDE设备)dmesg | grep IDE # 查看启动时IDE设备检测状况
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
Probing IDE interface ide0…
Probing IDE interface ide1…
网络
ifconfig # 查看所有网络接口的属性
bond0 Link encap:Ethernet HWaddr F4:CE:46:7E:D7:68
inet addr:10.56.236.101 Bcast:10.56.236.127 Mask:255.255.255.128
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:196625663 errors:0 dropped:0 overruns:0 frame:0
TX packets:166879878 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:30475502617 (28.3 GiB) TX bytes:34248137790 (31.8 GiB)
eth0 Link encap:Ethernet HWaddr F4:CE:46:7E:D7:68
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:196625663 errors:0 dropped:0 overruns:0 frame:0
TX packets:166879878 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30475502617 (28.3 GiB) TX bytes:34248137790 (31.8 GiB)
Interrupt:130 Memory:fb000000-fb7fffff
以上就是给大家介绍的如何使的方法都有一定的了解了吧,好了,如果大家还想了解更多的资讯,那就赶紧点击官网吧。
本文来自http://www.win7cn.com/如需转载请注明!推荐:win7纯净版
系统教程总结
以上是为您收集整理的【Linux硬件信息查询命令(1)】操作系统教程的全部内容,希望文章能够帮你了解操作系统教程Linux硬件信息查询命令(1)。
如果觉得操作系统教程内容还不错,欢迎将网站推荐给好友。