自动化安装smokeping-2.6.11脚本
自动化安装Smokeping-2.6.11脚本
一、目的
1.1 监控目的
为方便监测各数据中心网络状况,自定义全国各节点,从而发现网络异常,判断网络故障。
1.2 本文目的
快速部署Smokeping系统,为后期相关工程师部署此系统提供借鉴与参考。
二、理论基础
2.1 相关理论
Smokeping百度解释:rrdtool的作者TobiOetiker 的作品,是用Perl语言编写完成,组件:RRDtool、Fping、Echoping、Curl、Dig、SSh、Perl 模块,Perl、SpeedyCGI、ApacheORNGINX。
三、脚本
|
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
|
#!/bin/bash#Date 2016/11/11#mail xuel@51idc.com[ $(id -u) != "0" ] && echo "Error: You must be root to run this script" && exit 1export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binsed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/configsetenforce 0which ntpdateif [ $? -eq 0 ];then /usr/sbin/ntpdate time1.aliyun.com echo "*/5 * * * * /usr/sbin/ntpdate -s time1.aliyun.com">>/var/spool/cron/root else yum install ntpdate -y /usr/sbin/ntpdate time1.aliyun.com echo "*/5 * * * * /usr/sbin/ntpdate -s time1.aliyun.com">>/var/spool/cron/root ficlearecho "##########################################"echo "Auto Install smokeping-2.6.11 ##"echo "Press Ctrl + C to cancel ##"echo "Any key to continue ##"echo "##########################################"read -n 1/etc/init.d/iptables status >/dev/null 2>&1if [ $? -eq 0 ]theniptables -I INPUT -p tcp --dport 80 -j ACCEPT && iptables-save >/dev/null 2>&1else echo -e "\033[32m iptables is stopd\033[0m"fiIP=`/sbin/ifconfig|sed -n '/inet addr/s/^[^:]*:\([0-9.]\{7,15\}\) .*/\1/1p'|sed -n '1p'`sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/configsetenforce 0rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm 1>/dev/nullyum -y install perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI perl-FCGI perl-CGI-SpeedCGI perl-Time-HiRes perl-ExtUtils-MakeMaker perl-RRD-Simple rrdtool rrdtool-perl curl fping echoping httpd httpd-devel gcc make wget libxml2-devel libpng-devel glib pango pango-devel freetype freetype-devel fontconfig cairo cairo-devel libart_lgpl gcc libart_lgpl-devel mod_fastcgi wget wqy-*if [ -d /opt ];then cd /optelse mkdir -p /opt && cd /optfiwget -c http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.11.tar.gz tar -xvf smokeping-2.6.11.tar.gz 1>/dev/nullcd /opt/smokeping-2.6.11./setup/build-perl-modules.sh /usr/local/smokeping/thirdparty ./configure -prefix=/usr/local/smokeping /usr/bin/gmake install 1>/dev/nullcd /usr/local/smokepingmkdir cache data var 1>/dev/nulltouch /var/log/smokeping.logchown -R apache:apache cache data varchown -R apache:apache /var/log/smokeping.logmv /usr/local/smokeping/htdocs/smokeping.fcgi.dist /usr/local/smokeping/htdocs/smokeping.fcgimv /usr/local/smokeping/etc/config.dist /usr/local/smokeping/etc/configcp -f /usr/local/smokeping/etc/config /usr/local/smokeping/etc/config.backsed -i "s/some.url/IP/g" /usr/local/smokeping/etc/configchmod 600 /usr/local/smokeping/etc/smokeping_secrets.distif [ -d /opt ];then cd /optelse mkdir -p /opt && cd /optfiwget -c -O /opt/fping-3.13.tar.gz http://fping.org/dist/fping-3.13.tar.gztar zxvf fping-3.13.tar.gzcd fping-3.13./configure --prefix=/usr/local/fpingmake && make installsed -i "s#`grep fping /usr/local/smokeping/etc/config`#binary = /usr/local/fping/sbin/fping#g" /usr/local/smokeping/etc/configsed -i "148i'--font TITLE:20:"WenQuanYi\ Zen\ Hei\ Mono"'\," /usr/local/smokeping/lib/Smokeping/Graphs.pmcp -rf /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backcat >> /etc/httpd/conf/httpd.conf <<'EOF'Alias /cache "/usr/local/smokeping/cache/"Alias /cropper "/usr/local/smokeping/htdocs/cropper/"Alias /smokeping "/usr/local/smokeping/htdocs/smokeping.fcgi"<Directory "/usr/local/smokeping">AllowOverride NoneOptions AllAddHandler cgi-script .fcgi .cgiOrder allow,denyAllow from allDirectoryIndex smokeping.fcgi</Directory>EOFif [ -f /etc/init.d/smokeping ];then echo "/etc/init.d/smokeping is exist"else touch /etc/init.d/smokeping cat > /etc/init.d/smokeping <<'EOF' #!/bin/bash #chkconfig: 2345 80 05 # Description: Smokeping init.d script # Create by : Mox # Get function from functions library . /etc/init.d/functions # Start the service Smokeping smokeping=/usr/local/smokeping/bin/smokeping prog=smokeping pidfile=${PIDFILE-/usr/local/smokeping/var/smokeping.pid} lockfile=${LOCKFILE-/var/lock/subsys/smokeping} RETVAL=0 STOP_TIMEOUT=${STOP_TIMEOUT-10} LOG=/var/log/smokeping.log start() { echo -n $"Starting $prog: " LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $smokeping $OPTIONS RETVAL=$? echo [ $RETVAL = 0 ] && touch ${lockfile} return $RETVAL } # Restart the service Smokeping stop() { echo -n $"Stopping $prog: " killproc -p ${pidfile} -d ${STOP_TIMEOUT} $smokeping RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} } STOP_TIMEOUT=${STOP_TIMEOUT-10} LOG=/var/log/smokeping.log start() { echo -n $"Starting $prog: " LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $smokeping $OPTIONS RETVAL=$? echo [ $RETVAL = 0 ] && touch ${lockfile} return $RETVAL } # Restart the service Smokeping stop() { echo -n $"Stopping $prog: " killproc -p ${pidfile} -d ${STOP_TIMEOUT} $smokeping RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} } case "$1" in start) start ;; stop) stop ;; status) status -p ${pidfile} $httpd RETVAL=$? ;; restart) stop start ;; *) echo $"Usage: $prog {start|stop|restart|status}" RETVAL=2 esacEOFficat > /usr/local/smokeping/etc/config <<'EOF'*** General ***owner = Peter Randomcontact = service02@51idc.com#mailhost = smtp.51idc.com:25#mailusr = xuel@51idc#mailpwd = anchnet@123.com#sendmail = /usr/sbin/sendmail# NOTE: do not put the Image Cache below cgi-bin# since all files under cgi-bin will be executed ... this is not# good for images.imgcache = /usr/local/smokeping/cacheimgurl = cachedatadir = /usr/local/smokeping/datapiddir = /usr/local/smokeping/varcgiurl = http://$IP/smokeping.cgismokemail = /usr/local/smokeping/etc/smokemail.disttmail = /usr/local/smokeping/etc/tmail.dist# specify this to get syslog loggingsyslogfacility = local0# each probe is now run in its own process# disable this to revert to the old behaviour# concurrentprobes = no*** Alerts ***to = 13122690827@163.comfrom = service02@51idc.com+somelosstype = loss# in percentpattern = >0%,*12*,>0%,*12*,>0%comment = loss 3 times in a row+rttdetecttype = rtt #in milli secondspattern = <10,<10,<10,<10,<10,<100,>100,>100,>100edgetrigger = yescomment = routing messed up again ?+lossdetecttype = loss# in percentpattern = ==0%,==0%,==0%,==0%,>20%,>20%,>20%edgetrigger = yescomment = suddenly there is packet loss+minilosstype = loss# in percentpattern = >0%,*12*,>0%,*12*,>0%edgetrigger = yes#pattern = >0%,*12*comment = detected loss 1 times over the last two hours#+rttdetect#type = rtt# in milliseconds#pattern = <1,<1,<1,<1,<1,<2,>2,>2,>2#comment = routing messed up again ?+rttbadtype = rtt# in millisecondsedgetrigger = yespattern = ==S,>20comment = route+rttbadstarttype = rtt# in millisecondsedgetrigger = yespattern = ==S,==Ucomment = offline at startup*** Database ***step = 60pings = 20# consfn mrhb steps totalAVERAGE 0.5 1 1008AVERAGE 0.5 12 4320 MIN 0.5 12 4320 MAX 0.5 12 4320AVERAGE 0.5 144 720 MAX 0.5 144 720 MIN 0.5 144 720*** Presentation ***charset = utf-8template = /usr/local/smokeping/etc/basepage.html.dist+ chartsmenu = 排行榜title = 排行榜++ stddevsorter = StdDev(entries=>4)title = 综合指数排行menu = 综合指数排行format = 综合指数 %f++ maxsorter = Max(entries=>5)title = 最大延迟排行menu = 最大延迟排行format = 最大延迟时间 %f 秒++ losssorter = Loss(entries=>5)title = 丢包率排行menu = 丢包率排行format = 丢包 %f++ mediansorter = Median(entries=>5)title = 平均延迟排行menu = 平均延迟排行format = 平均延迟 %f 秒+ overview width = 860height = 150range = 10h+ detailwidth = 860height = 200unison_tolerance = 2"Last 3 Hours" 3h"Last 30 Hours" 30h"Last 10 Days" 10d"Last 30 Days" 30d"Last 90 Days" 90d#+ hierarchies#++ owner#title = Host Owner#++ location#title = Location*** Probes ***+ FPingbinary = /usr/local/fping/sbin/fping*** Slaves ***secrets=/usr/local/smokeping/etc/smokeping_secrets.dist+boomerdisplay_name=boomercolor=0000ff+slave2display_name=anothercolor=00ff00*** Targets ***probe = FPingmenu = Top#title = Network Latency Graphertitle = IDC网络节点质量监控#remark = Welcome to the SmokePing website of xxx Company. \# Here you will learn all about the latency of our network.remark = Smokeping 网络质量监控系统+ TELCOMmenu = 电信title = 电信++ northmenu = 华北区title = 华北区+++ beijingmenu = 北京title = 北京:218.30.25.45host = 218.30.25.45+++ tianjinmenu = 天津title = 天津:219.150.32.132host = 219.150.32.132+++ shijiazhuangmenu = 石家庄title = 石家庄:123.180.0.1host = 123.180.0.1+++ huhehaotemenu = 呼和浩特title = 呼和浩特:219.148.168.218host = 219.148.168.218++ northeastmenu = 东北区title = 东北区+++ qiqihaermenu = 齐齐哈尔title = 齐齐哈尔:222.170.0.61host = 222.170.0.61+++ changchunmenu = 长春title = 长春:222.168.78.1host = 222.168.78.1+++ jilinmenu = 吉林title = 吉林:123.173.127.2host = 123.173.127.2++ eastmenu = 华东区title = 华东区+++ jinanmenu = 济南title = 济南:58.56.25.4host = 58.56.25.4+++ shanghaimenu = 上海title = 上海:116.228.111.118host = 116.228.111.118+++ nanjingmenu = 南京title = 南京:221.231.191.214host = 221.231.191.214+++ hefeimenu = 合肥title = 合肥:61.190.246.5host = 61.190.246.5+++ nanchangmenu = 南昌title = 南昌:202.101.224.68host = 202.101.224.68+++ hangzhoumenu = 杭州title = 杭州:60.191.62.31host = 60.191.62.31+++ fuzhoumenu = 福州title = 福州:202.101.98.55host = 202.101.98.55++ southmenu = 中南区title = 中南区+++ luoyangmenu = 洛阳title = 洛阳:123.52.130.12host = 123.52.130.12+++ wuhanmenu = 武汉title = 武汉:111.175.233.30host = 111.175.233.30+++ changshamenu = 长沙title = 长沙:124.232.134.54host = 124.232.134.54+++ guangzhoumenu = 广州title = 广州:58.61.200.1host = 58.61.200.1+++ shenzhenmenu = 深圳title = 深圳:58.60.3.102host = 58.60.3.102+++ nanningmenu = 南宁title = 南宁:222.217.164.38host = 222.217.164.38+++ haikoumenu = 海口title = 海口:218.77.149.238host = 218.77.149.238++ southwestmenu = 西南区title = 西南区+++ chengdumenu = 成都title = 成都:61.157.77.1host = 61.157.77.1+++ chongqingmenu = 重庆title = 重庆:218.70.65.254host = 218.70.65.254+++ guiyangmenu = 贵阳title = 贵阳:59.51.128.31host = 59.51.128.31+++ kunmingmenu = 昆明title = 昆明:222.172.200.5host = 222.172.200.5+++ lasamenu = 拉萨title = 拉萨:124.31.0.1host = 124.31.0.1++ northwestmenu = 西北区title = 西北区+++ xianmenu = 西安title = 西安:125.76.191.163alerts = somelosshost = 125.76.191.163+++ ningxiamenu = 宁夏title = 宁夏:124.224.255.54host = 124.224.255.54+++ lanzhoumenu = 兰州title = 兰州:61.178.252.218host = 61.178.252.218+++ xiningmenu = 西宁title = 西宁:223.220.241.26host = 223.220.241.26+++ wulumuqimenu = 乌鲁木齐title = 乌鲁木齐:61.128.96.1host = 61.128.96.1+ UNICOMmenu = 联通title = 联通++ northmenu = 华北区title = 华北区+++ beijingmenu = 北京title = 北京:61.135.150.3host = 61.135.150.3+++ tianjinmenu = 天津title = 天津:202.99.96.38host = 202.99.96.38+++ shijiazhuangmenu= 石家庄title = 石家庄:221.192.1.221host = 221.192.1.221+++ taiyuanmenu = 太原title = 太原:218.26.171.2host = 218.26.171.2++ northeastmenu = 东北区title = 东北区+++ changchunmenu = 长春title = 长春:125.32.127.2host = 125.32.127.2+++ shenyangmenu = 沈阳title = 沈阳:218.60.54.164host = 218.60.54.164+++ jilinmenu = 吉林title = 吉林:218.62.77.121host = 218.62.77.121++ eastmenu = 华东区title = 华东区+++jinanmenu = 济南title = 济南:221.0.2.41host = 221.0.2.41+++ shanghaimenu = 上海title = 上海:210.22.67.1host = 210.22.67.1+++ hangzhoumenu = 杭州title = 杭州:101.68.92.11host = 101.68.92.11+++ nanchangmenu = 南昌title = 南昌:118.212.189.129host = 118.212.189.129++ southmenu = 中南区title = 中南区+++ zhengzhoumenu = 郑州title = 郑州:61.168.254.211host = 61.168.254.211+++ wuhanmenu = 武汉title = 武汉:218.106.115.1host = 218.106.115.1+++ guangzhoumenu = 广州title = 广州:211.95.193.69host = 211.95.193.69+++ shenzhenmenu = 深圳title = 深圳:58.250.0.1host = 58.250.0.1+++ nanningmenu = 南宁title = 南宁:211.97.71.202host = 211.97.71.202++ southwestmenu = 西南区title = 西南区+++ chongqingmenu = 重庆title = 重庆:221.5.255.1host = 221.5.255.1++ northwestmenu = 西北区title = 西北区+++ xiningmenu = 西宁title = 西宁:221.207.27.1host = 221.207.27.1++ ceshiqumenu = 测试区1title = 测试区1+++ test1menu = 长春联通title = 长春联通:119.48.221.29host = 119.48.221.29+++ test2menu = 广东网通title = 广东网通:120.84.0.1host = 120.84.0.1+++ test3menu = 上海网通title = 上海网通:210.22.67.1host = 210.22.67.1+++ test4menu = 海南网通title = 海南网通:221.11.132.2host = 221.11.132.2+++ test5menu = 贵州联通title = 贵州联通:221.13.21.194host = 221.13.21.194+++ test6menu = 广西联通title = 广西联通:221.7.136.68host = 221.7.136.68+++ test7menu = 北京联通title = 北京联通:60.30.128.1host = 60.30.128.1+++ test8menu = 北京移动title = 北京移动:218.205.128.1host = 218.205.128.1+++ test9menu = 海口移动title = 海口移动:221.182.227.1host = 221.182.227.1+++ test10menu = 武汉铁通title = 武汉铁通:61.232.206.1host = 61.232.206.1+ CMCCmenu = 移动title = 移动++ northmenu = 华北区title = 华北区+++ beijingmenu = 北京title = 北京:221.130.33.1host = 221.130.33.1+++ tianjinmenu = 天津title = 天津:211.137.160.1host = 211.137.160.1+++ qinhuangdaomenu = 秦皇岛title = 秦皇岛:211.143.111.14host = 211.143.111.14+++ shijiazhuangmenu = 石家庄title = 石家庄:111.11.64.142host = 111.11.64.142++ northeastmenu = 东北区title = 东北区+++ dalianmenu = 大连title = 大连:211.140.192.4host = 211.140.192.4++ eastmenu = 华东区title = 华东区+++ hefeimenu = 合肥title = 合肥:211.138.191.65host = 211.138.191.65+++ nanjingmenu = 南京title = 南京:120.195.118.1host = 120.195.118.1+++ jinanmenu = 济南title = 济南:120.192.97.186host = 120.192.97.186+++ hangzhoumenu = 杭州title = 杭州:111.1.33.222host = 111.1.33.222+++ nanchangmenu = 南昌title = 南昌:218.204.68.41host = 218.204.68.41+++ jiangsumenu = 江苏title = 江苏:112.22.15.226host = 112.22.15.226++ southmenu = 中南区title = 中南区+++ zhengzhoumenu = 郑州title = 郑州:211.142.127.33host = 211.142.127.33+++ guangzhoumenu = 广州title = 广州:211.139.145.254host = 211.139.145.254+++ wuhanmenu = 武汉title = 武汉:211.137.79.134host = 211.137.79.134+++ nanningmenu = 南宁title = 南宁:218.204.21.10host = 218.204.21.10++ southwestmenu = 西南区title = 西南区+++ chengdumenu = 成都title = 成都:111.9.16.23host = 111.9.16.23+++ chongqingmenu = 重庆title = 重庆:218.206.10.211host = 218.206.10.211++ northwestmenu = 西北区title = 西北区+ IDCmenu = IDC线路title = IDC线路++ wuxiIDCmenu = 无锡IDCtitle = 无锡IDC+++ wuxiIDCdianxinmenu = 无锡电信title = 无锡电信:221.228.82.70host = 221.228.82.70+++ wuxiIDCBGPmenu = 无锡AC_BGPtitle = 无锡AC_BGP:103.21.119.48host = 103.21.119.48+++ wuxiliantongmenu = 无锡联通title = 无锡联通:122.192.69.117host = 122.192.69.117++ hulanIDCmenu = 呼兰IDCtitle = 呼兰IDC+++ hulanIDCdianxinmenu = 呼兰电信title = 呼兰电信:101.227.69.37host = 101.227.69.37+++ hulanIDCBGPmenu = 呼兰AC_BGPtitle = 呼兰AC_BGP:103.20.251.7host = 103.20.251.7+++ hulandianxinBGPmenu = 呼兰电信BGPtitle = 呼兰电信BGP:114.141.133.146host = 114.141.133.146++ nanhuiIDCmenu = 南汇IDCtitle = 南汇IDC+++ nanhuiIDCdianxinmenu = 南汇电信title = 南汇电信:222.73.124.239host = 222.73.124.239+++ nanhuiIDCliantongmenu = 南汇联通线路title = 南汇联通:140.207.216.89host = 140.207.216.89+++ nanhuiIDCBGPmenu = 南汇电信BGP线路title = 南汇电信BGP:114.141.132.115host = 114.141.132.115++ jinhaiIDCmenu = 金海IDCtitle = 金海IDC+++ jinhaiIDCdianxinmenu = 金海电信线路title = 金海电信:114.80.200.47host = 114.80.200.47+++ jinhaiIDCliantongmenu = 金海联通线路title = 金海联通:140.207.213.59host = 140.207.213.59++ beiaiIDCmenu = 北艾IDCtitle = 北艾IDC+++ beiaiIDCdianxinmenu = 北艾电信线路title = 北艾电信:114.80.88.51host = 114.80.88.51+++ beiaiIDCliantongmenu = 北艾联通线路title = 北艾联通:112.65.240.161host = 112.65.240.161++ kunshanIDCmenu = 昆山IDCtitle = 昆山IDC+++ kunshanIDCdianxinmenu = 昆山电线线路title = 昆山电信:180.97.81.242host = 180.97.81.242+++ kunshanIDCliantongmenu = 昆山联通线路title = 昆山联通:112.80.41.244host = 112.80.41.244++ jinqiaoIDCmenu = 金桥IDCtitle = 金桥IDC+++ jinqiaoIDCdianxinmenu = 金桥电信线路title = 金桥电信:180.153.240.38host = 180.153.240.38+++ jinqiaoIDCliantongmenu = 金桥联通线路title = 金桥联通:112.65.234.34host = 112.65.234.34++ luguIDCmenu = 鲁谷IDCtitle = 鲁谷IDC+++ luguIDCBGPmenu = 鲁谷BGP线路title = 鲁谷BGP:24.202.141.142host = 124.202.141.142++ nujiangIDCmenu = 怒江IDCtitle = 怒江IDC+++ nujiangIDCyidongmenu = 怒江移动线路title = 怒江移动:221.181.64.2host = 221.181.64.2++ changshaIDCmenu = 长沙IDCtitle = 长沙IDC+++ changshaIDCdianxinmenu = 长沙电信线路title = 长沙电信:124.232.151.250host = 124.232.151.250++ yizhangIDCmenu = 亦庄IDCtitle = 亦庄IDC+++ yizhuangIDCBGPmenu = 亦庄BGP线路title = 亦庄BGP:43.240.245.247host = 43.240.245.247++ xianggangIDCmenu = 香港IDCtitle = 香港IDC+++ xianggangIDCBGPmenu = 香港BGP线路title = 香港BGP:118.193.128.4host = 118.193.128.4+++ wuxiMPLSmenu = 无锡AC_BGPtitle = 无锡MPLS:10.234.1.254host = 10.234.1.254EOFchmod +x /etc/init.d/smokepingchkconfig smokeping onchkconfig httpd on/etc/init.d/httpd start/etc/init.d/smokeping startif [ $? -eq 0 ];thenecho -e "\\033[32m smokeping setup successfull URR:http://$IP/smokeping\\033[0m"fi |
四、效果图及图表参数解释
4.1效果图

4.2 图表参数解释
4.2.1 median rtt:中间数不是平均值。Smokeping有多种类型的探针,探针在默认的设置下,每300秒向目标设备发送20测探测数据包。
如果这20个数据包都返回的话,它就记录下了20个RTT,那么Median RTT就是第十个包的RTT;
如果有5个包丢失的话,那么Median RTT就是第八个返回的包的RTT值。
4.2.2 Avg RTT:它是每一个测试回合中所有RTT的算术评价值。
4.2.3 Avg pkt loss:丢包率=丢弃的数据包/发送总共的数据包*100%
4.2.4 Probe:20ICMP Echo Pings(56 Bytes)every
每一个绿色的短横线都是一个测试回合60秒内用ping测试20次。绿色画出的是中间数的位置,一个回合中的其它值都在它附近被以灰度的形式被刻画。
本文出自 “KaliArch” 博客,请务必保留此出处http://kaliarch.blog.51cto.com/8966921/1899007
自动化安装smokeping-2.6.11脚本的更多相关文章
- 【转】lnmp_auto:自动化安装lnmp环境脚本
原文链接: lnmp_auto:自动化安装lnmp环境脚本 这哥们整理的这篇博文很好 转载分享 博文转载如下: 源代码在github上:https://github.com/jianfengye/ ...
- lnmp_auto:自动化安装lnmp环境脚本
朋友找我在一台机器上帮忙安装下discuz.想着搭建过好几次的lnmp了,但是还没有使用过"一键安装"的自动化脚本,去网上有搜索出来,但是运行的时候发现用root运行别人的脚本还是 ...
- sql server 2008R2无人值守批处理脚本自动化安装
▲版权声明:本文为博主原创文章,未经博主允许不得转载. Microsoft SQL Server 2008 R2是一款软件,提供完整的企业级技术与工具,帮助您以最低的总拥有成本获得最有价值的信息.您可 ...
- sql server2014企业版无人值守批处理脚本自动化安装
▲版权声明:本文为博主原创文章,未经博主允许不得转载. SQL Server系列软件是Microsoft 公司推出的关系型数据库管理系统.2014年4月16日于旧金山召开的一场发布会上,微软CEO萨蒂 ...
- Kickstart/Anaconda实现自动化安装原理探究
原网页地址:http://molinux.blog.51cto.com/2536040/548247#55918... 内容概要: 1. 系统安装基本流程图示2. Anaconda简介3. K ...
- Auty自动化测试框架第五篇——框架内部的调用支持、自动化安装库与配置说明
[本文出自天外归云的博客园] 本次对Auty自动化测试框架做些收尾工作,由于在scripts文件夹中的脚本会需要调用其他包结构文件夹中的脚本,所以这里需要添加一下框架对于内部脚本间互相调用的支持,这里 ...
- MySQL5.6生产库自动化安装部署
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://suifu.blog.51cto.com/9167728/1846671 自动化运 ...
- VMware workstation批量创建虚拟机和自动化安装操作系统(二)
一. 简述 在上一篇<VMware workstation批量创建虚拟机和自动化安装操作系统(一)>中,主要介绍了VMware workstation自定义创建虚拟机的过程,和一些其他的有 ...
- 自动化安装-【kickstart】
批量自动安装软件介绍 kickstart 是一种无人值守的安装方式,工作原理是在安装过程中记录人工干预填写的各种参数,并生成以个名为ks.cfg(自动应答文件)的文件,如果在自动安装过程中出现要填写参 ...
随机推荐
- uva 10712 - Count the Numbers(数位dp)
题目链接:uva 10712 - Count the Numbers 题目大意:给出n,a.b.问说在a到b之间有多少个n. 解题思路:数位dp.dp[i][j][x][y]表示第i位为j的时候.x是 ...
- Nginx限制某个IP同一时间段的访问次数和请求数示例代码
nginx可以通过ngx_http_limit_conn_module和ngx_http_limit_req_module配置来限制ip在同一时间段的访问次数. ngx_http_limit_conn ...
- Centos6.4下安装protobuf-c问题及解决办法
1.前言 protobuf是Google提供的结构持久化工具,类型XML,但要比XML更加灵活,效率要高.protobuf当初支持C++.JAVA和Python,后来有了支持C语言的Protobuf- ...
- ios 内存管理总结
在ios 中 项目有两个内存管理方式 第一种,arc 方式,编译器编译时,自动给obj 加上 release 实现要求 1. 设置项目 将 Objective-C Automatic Referen ...
- Reshaper cannot resolve symbol
问题 不知道出了什么问题,在代码视图发现有些关键词显示为红色,并且Reshaper提示消息为Reshaper cannot resolve symbol XXX ,但编辑不会报错. 虽然不影响使用,但 ...
- phpstudy 开启apache反向代理
vhosts.conf 1 2 3 4 5 6 7 8 9 10 11 <VirtualHost *:8080> ServerAdmin webmaster@dummy-host.exam ...
- gdbserver 移植与多线程调试
在嵌入式linux平台使用gdb调试进行远程调试需要安装gdbserver,gdbserver工作在目标板上,通过串口或者网线与主机上的gdb互联实现远程调试. Gdbserver需要根据不同的嵌入式 ...
- npm - 部分常用命令(笔记)
<!-- npm部分简写: ci -> package-lock.json ls -> list pkg -> package i -> install -g -> ...
- Python+H5py实现将SVHN样本库转换为FasterRcnn训练样本
一.上代码 import os import h5py svhnPath = 'D:\\Project\\AIProject\\SVHNClassifier\\data' def loadSvhn(p ...
- POSTGRESQL 锁表的问题
一.找出所的语句 select wait.pid, wait.query as wait_query, wait.query_start as wait_query_start, wait.lockt ...