转自:http://www.jb51.net/article/97157.htm

1 查看CPU

1.1 查看CPU个数

# cat /proc/cpuinfo | grep "physical id" | uniq | wc -l

2 **uniq命令:删除重复行;wc –l命令:统计行数**

1.2 查看CPU核数

# cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 4

1.3 查看CPU型号

# cat /proc/cpuinfo | grep 'model name' |uniq
model name : Intel(R) Xeon(R) CPU E5630 @ 2.53GHz

总结:该服务器有2个4核CPU,型号Intel(R) Xeon(R) CPU E5630 @ 2.53GHz

2 查看内存

2.1 查看内存总数

#cat /proc/meminfo | grep MemTotal
MemTotal: 32941268 kB //内存32G

下面是一些命令的集合,供参考:

  1. uname -a # 查看内核/操作系统/CPU信息的linux系统信息
  2. head -n l /etc/issue # 查看操作系统版本
  3. cat /proc/cpuinfo # 查看CPU信息
  4. hostname # 查看计算机名的linux系统信息命令
  5. lspci -tv # 列出所有PCI设备
  6. lsusb -tv # 列出所有USB设备的linux系统信息命令
  7. lsmod # 列出加载的内核模块
  8. env # 查看环境变量资源
  9. free -m # 查看内存使用量和交换区使用量
  10. df -h # 查看各分区使用情况
  11. du -sh # 查看指定目录的大小
  12. grep MemTotal /proc/meminfo # 查看内存总量
  13. grep MemFree /proc/meminfo # 查看空闲内存量
  14. uptime # 查看系统运行时间、用户数、负载
  15. cat /proc/loadavg # 查看系统负载磁盘和分区
  16. mount | column -t # 查看挂接的分区状态
  17. fdisk -l # 查看所有分区
  18. swapon -s # 查看所有交换分区
  19. hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备)
  20. dmesg | grep IDE # 查看启动时IDE设备检测状况网络
  21. ifconfig # 查看所有网络接口的属性
  22. iptables -L # 查看防火墙设置
  23. route -n # 查看路由表
  24. netstat -lntp # 查看所有监听端口
  25. netstat -antp # 查看所有已经建立的连接
  26. netstat -s # 查看网络统计信息进程
  27. ps -ef # 查看所有进程
  28. top # 实时显示进程状态用户
  29. w # 查看活动用户
  30. id # 查看指定用户信息
  31. last # 查看用户登录日志
  32. cut -d: -f1 /etc/passwd # 查看系统所有用户
  33. cut -d: -f1 /etc/group # 查看系统所有组
  34. crontab -l # 查看当前用户的计划任务服务
  35. chkconfig –list # 列出所有系统服务
  36. chkconfig –list | grep on # 列出所有启动的系统服务程序
  37. rpm -qa # 查看所有安装的软件包
  38. cat /proc/cpuinfo :查看CPU相关参数的linux系统命令
  39. cat /proc/partitions :查看linux硬盘和分区信息的系统信息命令
  40. cat /proc/meminfo :查看linux系统内存信息的linux系统命令
  41. cat /proc/version :查看版本,类似uname -r
  42. cat /proc/ioports :查看设备io端口
  43. cat /proc/interrupts :查看中断
  44. cat /proc/pci :查看pci设备的信息
  45. cat /proc/swaps :查看所有swap分区的信息

2.2 查看内存条数

本节内容引自新浪博文《Linux查看内存条数》

查看原文:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#
dmidecode |grep -A16 "Memory Device$"
Memory
Device
Array
Handle: 0x1000
Error
Information Handle: Not Provided
Total
Width: 72 bits
Data
Width: 64 bits
Size:
2048 MB //1条2G内存
Form
Factor: DIMM
Set:
1
Locator:
DIMM1
Bank
Locator: Not Specified
Type:
DDR2
Type
Detail: Synchronous
Speed:
667 MHz
Manufacturer:
7F7F7F7F7F510000
Serial
Number: 0403E324
Asset
Tag: 450721
Part
Number: 72T256220HR3SA
--
Memory
Device
Array
Handle: 0x1000
Error
Information Handle: Not Provided
Total
Width: 72 bits
Data
Width: 64 bits
Size:
2048 MB //1条2G内存
Form
Factor: DIMM
Set:
1
Locator:
DIMM2
Bank
Locator: Not Specified
Type:
DDR2
Type
Detail: Synchronous
Speed:
667 MHz
Manufacturer:
7F7F7F7F7F510000
Serial
Number: 0403E324
Asset
Tag: 450721
Part
Number: 72T256220HR3SA
--
Memory
Device
Array
Handle: 0x1000
Error
Information Handle: Not Provided
Total
Width: 72 bits
Data
Width: 64 bits
Size:
No Module Installed //1个内存空槽
Form
Factor: DIMM
Set:
2
Locator:
DIMM3
Bank
Locator: Not Specified
Type:
DDR2
Type
Detail: Synchronous
Speed:
Unknown
Manufacturer:
Serial
Number:
Asset
Tag:
Part
Number:
--
Memory
Device
Array
Handle: 0x1000
Error
Information Handle: Not Provided
Total
Width: 72 bits
Data
Width: 64 bits
Size:
No Module Installed //1个内存空槽
Form
Factor: DIMM
Set:
2
Locator:
DIMM4
Bank
Locator: Not Specified
Type:
DDR2
Type
Detail: Synchronous
Speed:
Unknown
Manufacturer:
Serial
Number:
Asset
Tag:
Part
Number:
--
Memory
Device
Array
Handle: 0x1000
Error
Information Handle: Not Provided
Total
Width: 72 bits
Data
Width: 64 bits
Size:
No Module Installed //1个内存空槽
Form
Factor: DIMM
Set:
3
Locator:
DIMM5
Bank
Locator: Not Specified
Type:
DDR2
Type
Detail: Synchronous
Speed:
Unknown
Manufacturer:
Serial
Number:
Asset
Tag:
Part
Number:
--
Memory
Device
Array
Handle: 0x1000
Error
Information Handle: Not Provided
Total
Width: 72 bits
Data
Width: 64 bits
Size:
No Module Installed //1个内存空槽
Form
Factor: DIMM
Set:
3
Locator:
DIMM6
Bank
Locator: Not Specified
Type:
DDR2
Type
Detail: Synchronous
Speed:
Unknown
Manufacturer:
Serial
Number:
Asset
Tag:
Part
Number:

总结:该服务器有两条2G内存 ,空余4个插槽

3 查看硬盘

3.1 查看硬盘大小

# fdisk -l | grep Disk

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes

总结:硬盘大小146.7G,即厂商标称的160G

Linux下查看CPU型号,内存大小,硬盘空间,进程等的命令(详解)的更多相关文章

  1. Linux下查看CPU型号,内存大小,硬盘空间命令

    1 查看CPU 1.1 查看CPU个数 # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l 2 **uniq命令:删除重 ...

  2. Linux下查看CPU型号,内存大小,硬盘空间的命令

    1 查看CPU 1.1 查看CPU个数 # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l 2 **uniq命令:删除重 ...

  3. Linux下查看CPU型号,内存大小,硬盘空间的命令(详解)

    1 查看CPU 1.1 查看CPU个数 # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l 2 **uniq命令:删除重 ...

  4. Linux 查看CPU型号,内存大小,硬盘空间的命令

    1 查看CPU 1.1 查看CPU个数 # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l 1.2 查看CPU核数 # ...

  5. linux下查看cpu,内存,硬盘等硬件信息的方法

    说明:Linux下可以在/proc/cpuinfo中看到每个cpu的详细信息.但是对于双核的cpu,在cpuinfo中会看到两个cpu.常常会让人误以为是两个单核的cpu. 一.linux CPU大小 ...

  6. Linux下查看CPU、内存和硬盘信息命令

    一.查看cpu信息 cat /proc/cpuinfo 相同physical id 的记录是属于同一个CPU的,对应于多核的信息. 二.查看内存的信息 cat /proc/meminfo 三.查看硬盘 ...

  7. Linux下查看CPU型号,内存大小,硬盘空间命令

    1 查看CPU 1.1 查看CPU个数 # cat /proc/cpuinfo | grep "physical id" | uniq | wc -l 2 **uniq命令:删除重 ...

  8. Linux下查看CPU和内存(很详细)

    在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要.在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况.运行 top 命令后,CPU 使用状态会 ...

  9. 【转载】Linux下查看CPU、内存占用率

    不错的文章(linux系统性能监控--CPU利用率):https://blog.csdn.net/ctthuangcheng/article/details/52795477 在linux的系统维护中 ...

随机推荐

  1. MR-join连接

    package com.bw.mr; import java.io.BufferedReader; import java.io.IOException; import java.io.InputSt ...

  2. Java8新特性(一)_interface中的static方法和default方法

    什么要单独写个Java8新特性,一个原因是我目前所在的公司用的是jdk8,并且框架中用了大量的Java8的新特性,如上篇文章写到的stream方法进行过滤map集合.stream方法就是接口Colle ...

  3. Mobile CI/CD 101

    This is a guest post by Slava Chernikoff, Principal Engineer at Binwell. Mobile DevOps falls under t ...

  4. Want To Say Something

    2019.3.3 明天要演讲了,在这里为自己打一下气! 加油!     2019.3.31 停课三周的第一次写日志 怎么说这三周结交了很多八班的朋友 在竞赛上一直在学数论快学吐了,但没办法呀还是要为出 ...

  5. 入坑MATLAB必会的吐血总结

    本渣想回过头来整理一下MATLAB的一些基本的知识(很多东西比较琐碎,应该系统的梳理梳理),下文中没有提到的,自己用help查即可. 此文用来存个档,便于回顾. 由于matlab各版本部分语法存在差异 ...

  6. 百度地图--JS版

    百度地图JS版本 ----选择关键字地图展示对应地址---- CSS body, html { width: %; height: %; margin: ; font-family: "微软 ...

  7. java 11 Java Flight Recorder

    Flight Recorder源自飞机的黑盒子 Flight Recorder以前是商业版的特性,在java11当中开源出来,它可以导出事件到文件中,之后可以用Java Mission Control ...

  8. spring Boot 入门--为什么用spring boot

    为什么用spring boot 回答这个问题不得不说下spring 假设你受命用Spring开发一个简单的Hello World Web应用程序.你该做什么? 我能想到一些 基本的需要.  一个项目 ...

  9. webstorm开发微信小程序

    参考博客:https://www.cnblogs.com/pansidong/articles/7563155.html

  10. Alertmanager 集群

    Alertmanager 集群搭建 环境准备:2台主机 (centos 7) 192.168.31.151 192.168.31.144 1.安装部署 192.168.31.151 cd /usr/l ...