在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
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth0 Link encap:Ethernet HWaddr 00:0c:29:a6:f9:ad
inet6 addr: fe80::20c:29ff:fea6:f9ad/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:164 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:501 (501.0 B) TX bytes:23931 (23.9 KB)
eth0:avahi Link encap:Ethernet HWaddr 00:0c:29:a6:f9:ad
inet addr:169.254.10.150 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:4636 (4.6 KB) TX bytes:4636 (4.6 KB)
hadoop@slave2:~$
5、查看系统的CPU详细信息:
查看系统的CPU的信息的命令:cat /proc/cpuinfo
这样能看到系统CPU的主频,128G的主频是cpu MHz : 2394.558
power management:
processor : 74
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E7-4830 v4 @ 2.00GHz
stepping : 1
cpu MHz : 1200.000
cache size : 35840 KB
physical id : 1
siblings : 28
core id : 4
cpu cores : 14
apicid : 41
initial apicid : 41
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx lahf_lm abm 3dnowprefetch arat tpr_shadow vnmi flexpriority ept vpidbogomips : 3999.44
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 75
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E7-4830 v4 @ 2.00GHz
stepping : 1
cpu MHz : 1200.000
cache size : 35840 KB
physical id : 1
siblings : 28
core id : 5
cpu cores : 14
apicid : 43
initial apicid : 43
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx lahf_lm abm 3dnowprefetch arat tpr_shadow vnmi flexpriority ept vpidbogomips : 3999.44
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 76
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E7-4830 v4 @ 2.00GHz
stepping : 1
cpu MHz : 1200.000
cache size : 35840 KB
physical id : 1
siblings : 28
core id : 6
cpu cores : 14
apicid : 45
initial apicid : 45
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx lahf_lm abm 3dnowprefetch arat tpr_shadow vnmi flexpriority ept vpidbogomips : 3999.44
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 77
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E7-4830 v4 @ 2.00GHz
stepping : 1
cpu MHz : 1200.000
cache size : 35840 KB
physical id : 1
siblings : 28
core id : 8
cpu cores : 14
apicid : 49
initial apicid : 49
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm dca sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx lahf_lm abm 3dnowprefetch arat tpr_shadow vnmi flexpriority ept vpidbogomips : 3999.42
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 78
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E7-4830 v4 @ 2.00GHz
stepping : 1
cpu MHz : 1200.000
cache size : 35840 KB
physical id : 1
siblings : 28
core id : 9
cpu cores : 14
apicid : 51
initial apicid : 51
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm dca sse4_1 sse4_2 x2ap