Page Menu
Home
VyOS Platform
Search
Configure Global Search
Log In
Files
F117520138
show_ntp.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
731 B
Referenced Files
None
Subscribers
None
show_ntp.sh
View Options
#!/bin/sh
basic
=
0
info
=
0
while
[[
"
$#
"
-gt
0
]]
;
do
case
$1
in
--info
)
info
=
1
;;
--basic
)
basic
=
1
;;
--server
)
server
=
$2
;
shift
;;
*
)
echo
"Unknown parameter passed:
$1
"
;;
esac
shift
done
if
!
ps
-C
ntpd
&
>/dev/null
;
then
echo
NTP
daemon
disabled
exit
1
fi
PID
=
$(
pgrep
ntpd
)
VRF_NAME
=
$(
ip
vrf
identify
${
PID
}
)
if
[
!
-z
${
VRF_NAME
}
]
;
then
VRF_CMD
=
"sudo ip vrf exec
${
VRF_NAME
}
"
fi
if
[
$basic
-eq
1
]
;
then
$VRF_CMD
ntpq
-n
-c
peers
elif
[
$info
-eq
1
]
;
then
echo
"=== sysingo ==="
$VRF_CMD
ntpq
-n
-c
sysinfo
echo
echo
"=== kerninfo ==="
$VRF_CMD
ntpq
-n
-c
kerninfo
elif
[
!
-z
$server
]
;
then
$VRF_CMD
/usr/sbin/ntpdate
-q
$server
fi
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, Sep 26, 9:09 AM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4284748
Default Alt Text
show_ntp.sh (731 B)
Attached To
Mode
rVYOSONEX vyos-1x
Attached
Detach File
Event Timeline
Log In to Comment