Linux 温习(一): 系统信息和性能查看
- 陈大剩
- 2023-02-01 16:23:30
- 817
查看 cpu 信息
> cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
2 Intel(R) Xeon(R) Platinum 8369B CPU @ 2.70GHz
看到有8个逻辑CPU, 也知道了CPU型号
看 cpu 详细信息
# dmidecode | grep 'Processor Information'
# 查看内存信息
> cat /proc/meminfo
# 查看内核/OS/CPU信息
> uname -a
Linux sfcp-web 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
查看当前操作系统发行版信息
> cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
查看机器型号
> dmidecode | grep "Product Name"
Product Name: Alibaba Cloud ECS
查看系统运行时间、用户数、负载
> uptime
22:51:48 up 108 days, 4:20, 1 user, load average: 0.01, 0.22, 0.35
查看空闲内存量
> grep MemFree /proc/meminfo
MemFree: 592392 kB
查看内存总量
> grep MemTotal /proc/meminfo
MemTotal: 7862392 kB
查看系统负载
> cat /proc/loadavg
0.00 0.14 0.30 3/265 13997
显示当前登录系统的用户
> who
root pts/0 2023-01-02 22:39 (127.0.0.1)
> w
22:54:54 up 108 days, 4:23, 1 user, load average: 0.00, 0.12, 0.29
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 127.0.0.1 22:39 6.00s 0.02s 0.00s w
赞
(0)