Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
基本linux shell脚本:在linux上获得NTP?_Linux_Shell_Ntp - Fatal编程技术网

基本linux shell脚本:在linux上获得NTP?

基本linux shell脚本:在linux上获得NTP?,linux,shell,ntp,Linux,Shell,Ntp,我想编写一个shell脚本,用于获取debian服务器的NTP(网络时间协议)信息 我不知道该怎么写?你为什么要自己写?有很多现有的工具可以做到这一点openntp就是一个例子。看能力 您不能使用现有工具有什么原因吗?您可能想查看ntpdate手册,了解如何使用此命令的详细信息。您想做什么:打印远程服务器给定的时间,或使用NTP设置当前机器的时间?不是课程工作,我将此信息发送到campfire message。它用于集成。仅我需要服务器的NTP时间信息。

我想编写一个shell脚本,用于获取debian服务器的NTP(网络时间协议)信息


我不知道该怎么写?

你为什么要自己写?有很多现有的工具可以做到这一点<代码>openntp就是一个例子。看能力


您不能使用现有工具有什么原因吗?

您可能想查看ntpdate手册,了解如何使用此命令的详细信息。

您想做什么:打印远程服务器给定的时间,或使用NTP设置当前机器的时间?不是课程工作,我将此信息发送到campfire message。它用于集成。仅我需要服务器的NTP时间信息。