Actually I was trying to find that whether ntpd process is running or not at runtime.
This ntpd process can be started manually when the user checks set Date and Time automatically in System Preferences and stops when it is unchecked.
So,I was trying to find a flag that is writing in the system plist files.I did not find any.So I tried querying ntpd process state with lauchctl from the command line.
发布评论
评论(1)
实际上我试图找出 ntpd 进程在运行时是否正在运行。
当用户在系统偏好设置中自动选中设置的日期和时间时,可以手动启动此 ntpd 进程,并在取消选中时停止。
所以,我试图找到一个写入系统 plist 文件的标志。我没有找到任何标志。所以我尝试从命令行使用 lauchctl 查询 ntpd 进程状态。
在那里我可以找到 ntpd 状态。
Actually I was trying to find that whether ntpd process is running or not at runtime.
This ntpd process can be started manually when the user checks set Date and Time automatically in System Preferences and stops when it is unchecked.
So,I was trying to find a flag that is writing in the system plist files.I did not find any.So I tried querying ntpd process state with lauchctl from the command line.
There by I could able to find the ntpd state.