This commit is contained in:
conetadm
2024-11-14 21:11:06 +01:00
commit 5718e70f15
657 changed files with 9401652 additions and 0 deletions

16
root/ptp/get_rrd.sh Executable file
View 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