init
BIN
root/ptp/delay.png
Executable file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
root/ptp/delay.rrd
Executable file
BIN
root/ptp/delay_1d.png
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
root/ptp/delay_1m.png
Executable file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
root/ptp/delay_1w.png
Executable file
|
After Width: | Height: | Size: 9.2 KiB |
16
root/ptp/get_rrd.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
PAT=/scripts/root/ptp
|
||||
cd $PAT
|
||||
CWD=`pwd`
|
||||
|
||||
V=`cat /var/log/ptpd/status1 | grep Offset | grep -oP "([0-9-.]*)"`
|
||||
R=`echo "$V * 1000000" | bc`
|
||||
echo "V: $V
|
||||
R: $R"
|
||||
rrdtool update $PAT/offset.rrd N:$R > /dev/null 2>&1
|
||||
|
||||
#V=`cat /var/log/ptpd/status1 | grep "One-way" | grep -oP "([0-9.]*)"`
|
||||
#R=`echo "$V * 1000000" | bc`
|
||||
#echo "V: $V
|
||||
#R: $R"
|
||||
#rrdtool update $PAT/delay.rrd N:$R
|
||||
19
root/ptp/get_rrd_graph.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
PAT=/scripts/root/ptp
|
||||
cd $PAT
|
||||
CWD=`pwd`
|
||||
|
||||
ENDE=`date +%s`
|
||||
START=`expr $ENDE - 3600`
|
||||
|
||||
|
||||
rrdtool graph $PAT/offset.png -Y --lower-limit -10 --upper-limit 10 --start $START --end $ENDE --width 800 --height 200 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:'DroidSansMono,DejaVuSansMono' --font AXIS:7:'DroidSansMono,DejaVuSansMono' --font-render-mode normal \
|
||||
DEF:ping=$PAT/offset.rrd:ds1:AVERAGE \
|
||||
LINE1:ping#0000FF:"time (µs)" \
|
||||
GPRINT:ping:LAST:"Cur\: %5.2lf" \
|
||||
GPRINT:ping:AVERAGE:"Avg\: %5.2lf" \
|
||||
GPRINT:ping:MAX:"Max\: %5.2lf" \
|
||||
GPRINT:ping:MIN:"Min\: %5.2lf\t\t\t" \
|
||||
COMMENT:"Offset" \
|
||||
> /dev/null 2>&1
|
||||
19
root/ptp/get_rrd_graph_1d.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
PAT=/scripts/root/ptp
|
||||
cd $PAT
|
||||
CWD=`pwd`
|
||||
|
||||
ENDE=`date +%s`
|
||||
START=`expr $ENDE - 86400`
|
||||
|
||||
|
||||
rrdtool graph $PAT/offset_1d.png -Y --lower-limit -10 --upper-limit 10 --start $START --end $ENDE --width 800 --height 200 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:'DroidSansMono,DejaVuSansMono' --font AXIS:7:'DroidSansMono,DejaVuSansMono' --font-render-mode normal \
|
||||
DEF:ping=$PAT/offset.rrd:ds1:AVERAGE \
|
||||
LINE1:ping#0000FF:"time (µs)" \
|
||||
GPRINT:ping:LAST:"Cur\: %5.2lf" \
|
||||
GPRINT:ping:AVERAGE:"Avg\: %5.2lf" \
|
||||
GPRINT:ping:MAX:"Max\: %5.2lf" \
|
||||
GPRINT:ping:MIN:"Min\: %5.2lf\t\t\t" \
|
||||
COMMENT:"Offset" \
|
||||
> /dev/null 2>&1
|
||||
19
root/ptp/get_rrd_graph_1m.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
PAT=/scripts/root/ptp
|
||||
cd $PAT
|
||||
CWD=`pwd`
|
||||
|
||||
ENDE=`date +%s`
|
||||
START=`expr $ENDE - 2678400`
|
||||
|
||||
|
||||
rrdtool graph $PAT/offset_1m.png -Y --lower-limit -10 --upper-limit 10 --start $START --end $ENDE --width 800 --height 200 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:'DroidSansMono,DejaVuSansMono' --font AXIS:7:'DroidSansMono,DejaVuSansMono' --font-render-mode normal \
|
||||
DEF:ping=$PAT/offset.rrd:ds1:AVERAGE \
|
||||
LINE1:ping#0000FF:"time (µs)" \
|
||||
GPRINT:ping:LAST:"Cur\: %5.2lf" \
|
||||
GPRINT:ping:AVERAGE:"Avg\: %5.2lf" \
|
||||
GPRINT:ping:MAX:"Max\: %5.2lf" \
|
||||
GPRINT:ping:MIN:"Min\: %5.2lf\t\t\t" \
|
||||
COMMENT:"Offset" \
|
||||
> /dev/null 2>&1
|
||||
19
root/ptp/get_rrd_graph_1w.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
PAT=/scripts/root/ptp
|
||||
cd $PAT
|
||||
CWD=`pwd`
|
||||
|
||||
ENDE=`date +%s`
|
||||
START=`expr $ENDE - 604800`
|
||||
|
||||
|
||||
rrdtool graph $PAT/offset_1w.png -Y --lower-limit -10 --upper-limit 10 --start $START --end $ENDE --width 800 --height 200 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:'DroidSansMono,DejaVuSansMono' --font AXIS:7:'DroidSansMono,DejaVuSansMono' --font-render-mode normal \
|
||||
DEF:ping=$PAT/offset.rrd:ds1:AVERAGE \
|
||||
LINE1:ping#0000FF:"time (µs)" \
|
||||
GPRINT:ping:LAST:"Cur\: %5.2lf" \
|
||||
GPRINT:ping:AVERAGE:"Avg\: %5.2lf" \
|
||||
GPRINT:ping:MAX:"Max\: %5.2lf" \
|
||||
GPRINT:ping:MIN:"Min\: %5.2lf\t\t\t" \
|
||||
COMMENT:"Offset" \
|
||||
> /dev/null 2>&1
|
||||
BIN
root/ptp/offset.png
Executable file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
root/ptp/offset.rrd
Executable file
BIN
root/ptp/offset_1d.png
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
root/ptp/offset_1m.png
Executable file
|
After Width: | Height: | Size: 17 KiB |
BIN
root/ptp/offset_1w.png
Executable file
|
After Width: | Height: | Size: 16 KiB |