cpu信息查看
命令:lscpu
命令查看简单
[root@ctos7 ~]# lscpu
Architecture: x86_64 架构
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1 cpu数量
On-line CPU(s) list: 0
Thread(s) per core: 1 核
Core(s) per socket: 1
Socket(s): 1 cpu插口数量
NUMA node(s): 1
Vendor ID: AuthenticAMD
CPU family: 21
Model: 16
Model name: 品牌型号 AMD A6-4455M APU with Radeon(tm) HD Graphics
Stepping: 1
CPU MHz: 2096.188 主频
BogoMIPS: 4192.37
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 16K
L1i cache: 64K
L2 cache: 2048K
NUMA node0 CPU(s): 0
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl tsc_reliable nonstop_tsc pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic popcnt aes xsave avx f16c hypervisor lahf_lm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw xop fma4 tbm topoext retpoline_amd vmmcall bmi1 arat overflow_recov succor
##命令
文件: cat/proc/cpuinfo
这个文件不能修改
[root@ctos7-1 ~]# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 21
model : 16
model name : AMD A6-4455M APU with Radeon(tm) HD Graphics
stepping : 1
microcode : 0x6001119
cpu MHz : 2096.188
cache size : 2048 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl tsc_reliable nonstop_tsc pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic popcnt aes xsave avx f16c hypervisor lahf_lm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw xop fma4 tbm topoext retpoline_amd vmmcall bmi1 arat overflow_recov succor
bogomips : 4192.37
TLB size : 1536 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 45 bits physical, 48 bits virtual
power management:
cpu使用情况查看
如果使用率过高则可能有问题,特别是15分钟平均使用率
命令:w
[root@ctos7-1|一 11月 23|13:19:05-> ~]# w
13:21:12 up 7:25, 2 users, load average: 0.00, 0.01, 0.05
1,当前时间 2,个用户登录 1分钟,5分钟,15分钟 cpu使用率
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
yue tty1 日18 3:18m 0.44s 0.05s login – yue
yue pts/0 192.168.250.1 08:33 0.00s 0.44s 0.07s sshd: yue [priv]
内存信息查看
[root@ctos7-1|一 11月 23|13:40:11-> ~]# free
total used free shared buff/cache available
Mem: 997956 111808 586756 7852 299392 713468
Swap: 4194300 0 4194300
[root@ctos7-1|一 11月 23|13:41:25-> ~]# free -h
total used free shared buff/cache available
总内存 空闲 缓冲/缓存 可以使用内存
Mem: 974M 109M 573M 7.7M 292M 696M
Swap: 4.0G 0B 4.0G 交换分区(硬盘分出来做虚拟内存)
`
free -h会好理解很多
cat /proc/meminfo 从文件查看
MemTotal: 997956 kB
MemFree: 587028 kB
MemAvailable: 713740 kB
Buffers: 2080 kB
Cached: 247756 kB
SwapCached: 0 kB
Active: 208312 kB
Inactive: 93172 kB
Active(anon): 52136 kB
Inactive(anon): 7364 kB
Active(file): 156176 kB
Inactive(file): 85808 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 4194300 kB
SwapFree: 4194300 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 51680 kB
Mapped: 26668 kB
Shmem: 7852 kB
Slab: 49556 kB
SReclaimable: 24872 kB
SUnreclaim: 24684 kB
KernelStack: 4016 kB
PageTables: 5744 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4693276 kB
Committed_AS: 244992 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 178940 kB
VmallocChunk: 34359310332 kB
HardwareCorrupted: 0 kB
AnonHugePages: 6144 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 69504 kB
DirectMap2M: 978944 kB
DirectMap1G: 0 kB
硬盘 df -h
[root@ctos7-1|一 11月 23|13:41:38-> ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 15718400 1650232 14068168 11% /
devtmpfs 487996 0 487996 0% /dev
tmpfs 498976 0 498976 0% /dev/shm
tmpfs 498976 7852 491124 2% /run
tmpfs 498976 0 498976 0% /sys/fs/cgroup
/dev/sda2 5767168 32944 5734224 1% /data
/dev/sda1 508580 119552 389028 24% /boot
tmpfs 99796 0 99796 0% /run/user/1000
[root@ctos7-1|一 11月 23|13:54:08-> ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 15G 1.6G 14G 11% /
devtmpfs 477M 0 477M 0% /dev
tmpfs 488M 0 488M 0% /dev/shm
tmpfs 488M 7.7M 480M 2% /run
tmpfs 488M 0 488M 0% /sys/fs/cgroup
/dev/sda2 5.5G 33M 5.5G 1% /data
/dev/sda1 497M 117M 380M 24% /boot
tmpfs 98M 0 98M 0% /run/user/1000
只要不是快慢了就不要乱动