您好,欢迎访问一九零五行业门户网

Linux怎么查看CPU内存和系统版本

linux查看cpu内存和系统版本1.查看cpu信息查看cpu信息的方式很多,我们这里分两种情况来处理
1.1 查看cpu基本硬件信息[whb@vm_0_12_centos test]$ cat /proc/cpuinfoprocessor  : 0vendor_id  : genuineintelcpu family  : 6model    : 79model name  : intel(r) xeon(r) cpu e5-26xx v4stepping  : 1microcode  : 0x1cpu mhz    : 2399.996cache size  : 4096 kbphysical id  : 0siblings  : 1core id    : 0cpu cores  : 1apicid    : 0initial apicid  : 0fpu    : yesfpu_exception  : yescpuid level  : 13wp    : yesflags    : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch bmi1 avx2 bmi2 rdseed adx xsaveoptbogomips  : 4799.99clflush size  : 64cache_alignment  : 64address sizes  :
1.2 查看cpu使用状态信息, top && dstat#方法一[whb@vm_0_12_centos test]$ top #输入top查看cpu使用情况,可以输入1,查看多核cpu使用情况asks:  74 total,   2 running,  72 sleeping,   0 stopped,   0 zombie%cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 stkib mem :  1882892 total,   148092 free,   403032 used,  1331768 buff/cachekib swap:        0 total,        0 free,        0 used.  1274708 avail mem   pid user      pr  ni    virt    res    shr s %cpu %mem     time+ command 3677 root      20   0  162348  10684   1364 s  1.1  0.6  91:47.96 barad_agent 3678 root      20   0  611460  13444   1484 s  1.1  0.7 462:59.39 barad_agent    1 root      20   0   51644   3056   1840 s  0.0  0.2  12:14.31 systemd    2 root      20   0       0      0      0 s  0.0  0.0   0:00.66 kthreadd    3 root      20   0       0      0      0 s  0.0  0.0   2:00.04 ksoftirqd/0#方法二[whb@vm_0_12_centos test]$ dstat -c #不存在,centos上可使用 yum -y install dstat 安装
2.查看内存信息查看内存信息的方式也很多,我们这里也分两种情况来处理
2.1 查看内存基本容量信息[whb@vm_0_12_centos test]$ cat /proc/meminfo memtotal:        1882892 kbmemfree:          147760 kbmemavailable:    1275048 kbbuffers:          165600 kbcached:           878652 kbswapcached:            0 kbactive:           891404 kb...
2.2 查看内存运行空间信息[whb@vm_0_12_centos test]$ free               total        used        free      shared  buff/cache   availablemem:        1882892      403124      146836         544     1332932     1274648swap:             0           0           0[whb@vm_0_12_centos test]$ free -k #安装kb为单位显示              total        used        free      shared  buff/cache   availablemem:        1882892      402988      146964         544     1332940     1274788swap:             0           0           0[whb@vm_0_12_centos test]$ free -m #安装mb为单位进行显示              total        used        free
3.查看linux 查看系统版本[whb@vm_0_12_centos test]$ uname -alinux vm_0_12_centos 3.10.0-862.el7.x86_64 #1 smp fri apr 20 16:44:24 utc 2018 x86_64 x86_64 x86_64 gnu/linux[whb@vm_0_12_centos test]$ cat /etc/redhat-release  #如果是centos机器,可以直接查看更细致版本centos linux release 7.5.1804 (core)
以上就是linux怎么查看cpu内存和系统版本的详细内容。
其它类似信息

推荐信息