Page Menu
Home
VyOS Platform
Search
Configure Global Search
Log In
Files
F38741997
show_ntp.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
621 B
Referenced Files
None
Subscribers
None
show_ntp.sh
View Options
#!/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
Details
Attached
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)
Attached To
Mode
rVYOSONEX vyos-1x
Attached
Detach File
Event Timeline
Log In to Comment