- Products
- Learn
- Local User Groups
- Partners
- More
Step Into the Future of
AI-Powered Cyber Security
The State of Ransomware Q1 2026
Key Trends and Their Impact
AI Security Masters E8:
Claude Mythos: New Era in Cyber Security
Blueprint Architecture for Securing
The AI Factory & AI Data Center
Call For Papers
Your Expertise. Our Stage
CheckMates Go:
CheckMates Fest
'ntpq -p' shows the current status of ntpd, but it doesn't return a useful exit code when ntpd isn't running. The simplest way to check is probably to see if ntpd is running. 'ps -C ntpd' exits with code 0 if it finds at least one matching process, or code 1 if there aren't any matches.
[Expert@DallasSC]# clish -c "show ntp active"
No
[Expert@DallasSC]# ntpq -p
ntpq: read: Connection refused
[Expert@DallasSC]# echo $?
0
[Expert@DallasSC]# ps -C ntpd
PID TTY TIME CMD
[Expert@DallasSC]# echo $?
1
[Expert@DallasticXL-s01-01:0]# clish -c "show ntp active"
Yes
[Expert@DallasticXL-s01-01:0]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*10.0.1.1 132.163.96.2 2 u 654 1024 377 0.966 0.517 0.830
[Expert@DallasticXL-s01-01:0]# echo $?
0
[Expert@DallasticXL-s01-01:0]# ps -C ntpd
PID TTY TIME CMD
18573 ? 00:00:00 ntpd
[Expert@DallasticXL-s01-01:0]# echo $?
0
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY