Page MenuHomeVyOS Platform

show_ntp.sh
No OneTemporary

Size
621 B
Referenced Files
None
Subscribers
None

show_ntp.sh

#!/bin/sh
sourcestats=0
tracking=0
while [[ "$#" -gt 0 ]]; do
case $1 in
--sourcestats) sourcestats=1 ;;
--tracking) tracking=1 ;;
*) echo "Unknown parameter passed: $1" ;;
esac
shift
done
if ! ps -C chronyd &>/dev/null; then
echo NTP daemon disabled
exit 1
fi
PID=$(pgrep chronyd | head -n1)
VRF_NAME=$(ip vrf identify ${PID})
if [ ! -z ${VRF_NAME} ]; then
VRF_CMD="sudo ip vrf exec ${VRF_NAME}"
fi
if [ $sourcestats -eq 1 ]; then
$VRF_CMD chronyc sourcestats -v
elif [ $tracking -eq 1 ]; then
$VRF_CMD chronyc tracking -v
else
echo "Unknown option"
fi

File Metadata

Mime Type
text/x-shellscript
Expires
Mon, Dec 15, 9:08 PM (2 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3095552
Default Alt Text
show_ntp.sh (621 B)

Event Timeline