Files
scripts-conlxsyslog03/root/ptp/get_rrd.sh
conetadm 5718e70f15 init
2024-11-14 21:11:06 +01:00

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