17 lines
381 B
Bash
Executable File
17 lines
381 B
Bash
Executable File
#!/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
|