在linux系统中,经常会遇到一些问题,在这个时候就需要查看系统的配置,作为新手,可能不知道查看系统服务器的配置到底想查看那些参数,以及查看参数的命令是什么

1、查看内存:这个非常普遍

查看内存配置的命令有两个:

①free -m:这个是查看系统的总共内存,占用了多少,还剩下多少,这个命令查看到的信息是以M为单位进行展示的 

hadoop@slave2:~$ free -m



total used free shared buffers cached



Mem: 5950 918 5031 8 57 291



-/+ buffers/cache: 569 5381



Swap: 1021 0 1021



hadoop@slave2:~$

②free -g:这个也是查看系统的总共内存,占用了多少,还剩下多少,这个命令得到的结果是以G为单位进行展示的,由于单位比较大了,所以比较上一个而言,精度不够准确了

hadoop@slave2:~$ free -g



total used free shared buffers cached



Mem: 5 0 4 0 0 0



-/+ buffers/cache: 0 5



Swap: 0 0 0



hadoop@slave2:~$

2、查看系统版本号:

使用的命令:cat /etc/issue

hadoop@slave2:~$ cat /etc/issue


Ubuntu 14.04.5 LTS \n \l


hadoop@slave2:~$

3、查看CPU主频信息

hadoop@slave2:~$ lscpu



Architecture: x86_64



CPU op-mode(s): 32-bit, 64-bit



Byte Order: Little Endian



CPU(s): 2



On-line CPU(s) list: 0,1



Thread(s) per core: 1



Core(s) per socket: 2



Socket(s): 1



NUMA node(s): 1



Vendor ID: GenuineIntel



CPU family: 6



Model: 142



Stepping: 9



CPU MHz: 2711.999



BogoMIPS: 5423.99



Hypervisor vendor: VMware



Virtualization type: full



L1d cache: 32K



L1i cache: 32K



L2 cache: 256K



L3 cache: 3072K



NUMA node0 CPU(s): 0,1



hadoop@slave2:~$

4、查看系统的ip地址

命令:ifconfig

hadoop@slave2:~$ ifconfig



docker0 Link encap:Ethernet HWaddr 56:84:7a:fe:97:99



inet addr:172.17.42.1 Bcast:0.0.0.0 Mask:255.255.0.0

linux 查看系统配置_sed