哲涛SUM服务器监控软件作为集中监控平台类软件,它对各种Linux操作系统可以进行集中、统一的监控,它主要对Linux的CPU使用率、内存使用率、磁盘空间使用、进程等进行统一的监控。在SUM服务器监控软件中,不仅可以对Linux系统基本性能进行监控,同时还可以对Linux一定的集中管理,比如执行Linux的命令、重启Linux服务器、重启某些进程等。
Linux监控、Linux服务器监控、Linux CPU监控、Linux内存监控、Linux磁盘监控
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
[root@hpf-linux ~] # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 // 此配置关联至的设备。设备名要与文件ifcfg-后的内容保持一致 HWADDR=00:0C:29:7A:E4:0E //MAC 地址:要与真实MAC地址保持一致,可省略 TYPE=Ethernet // 设备类型 UUID=06512c35-1f92-4b57-875d-cb76cd6a4ee2 // 唯一标识,可省略 ONBOOT= yes // 是否开机自动启动此网络设备{ yes |no} NM_CONTROLLED= yes // 是否接受NetworkManager脚本控制:{ yes |no} BOOTPROTO=static // 引导协议:{none|static|dhcp|bootp} IPADDR=192.168.1.110 //ip 地址 NETMASK=255.255.255.0 // 掩码 GATEWAY=192.168.1.1 // 默认网关 DNS1=8.8.8.8 //DNS1 服务地址 同时还可以添加以下内容: IPV6INIT=no // 是否开启ipv6 USERCTL=no // 是否允许普通用户操作网卡 PEERDNS={ yes |no} // 是否允许DHCP服务分配地址时直接更新 /etc/resolv .conf中的DNS服务器地址 |
1
|
[root@hpf-linux ~] # /etc/init.d/network restart |
1
2
3
4
5
6
7
|
[root@hpf-linux ~] # ping -c 1 PING www.a.shifen.com (61.135.169.121) 56(84) bytes of data. 64 bytes from 61.135.169.121: icmp_seq=1 ttl=55 time =24.9 ms --- www.a.shifen.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4046ms rtt min /avg/max/mdev = 24.559 /30 .358 /38 .983 /6 .768 ms |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[root@hpf-linux ~] # ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:7A:E4:0E inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe7a:e40e /64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1709 errors:0 dropped:0 overruns:0 frame:0 TX packets:783 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:175347 (171.2 KiB) TX bytes:100454 (98.0 KiB) Interrupt:19 Base address:0x2000 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
1
|
[root@hpf-linux ~] # ifconfig eth0 down ; ifconfig eth0 up |
1
2
3
4
5
6
7
8
|
# ifconfig eth0 192.168.1.56 //给eth0网卡配置IP地:192.168.1.56 # ifconfig eth0 192.168.1.56 netmask 255.255.255.0 //给eth0网卡配置IP地址:192.168.1.56 ,并加上子掩码:255.255.255.0 # ifconfig eth0 192.168.1.56 netmask 255.255.255.0 broadcast 192.168.1.255 // 给eth0网卡配置IP地址:192.168.156,加上子掩码:255.255.255.0,加上个广播地址: 192.168.120.255 |
1
2
|
# ifconfig eth0 arp //开启网卡eth0 的arp协议; # ifconfig eth0 -arp //关闭网卡eth0 的arp协议; |
1
2
3
4
5
6
|
[root@hpf-linux ~] # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@hpf-linux ~] # route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0 //添加 [root@hpf-linux ~] # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 224.0.0.0 0.0.0.0 224.0.0.0 U 0 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 [root@hpf-linux ~] # route del -net 224.0.0.0 netmask 224.0.0.0 dev eth0 //删除 [root@hpf-linux ~] # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[root@hpf-linux ~] # route -n //查看网关 Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 [root@hpf-linux ~] # route del default gw 192.168.1.1 //删除网关 [root@hpf-linux ~] # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 [root@hpf-linux ~] # ping www.baidu.com //删除后无法联通外网 ping : unknown host www.baidu.com [root@hpf-linux ~] # route add default gw 192.168.1.1 //添加网关 [root@hpf-linux ~] # ping www.baidu.com PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data. 64 bytes from 61.135.169.125: icmp_seq=1 ttl=55 time =26.4 ms 64 bytes from 61.135.169.125: icmp_seq=2 ttl=55 time =26.6 ms |