<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Verify if NTP is enabled in expert mode? in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256656#M9237</link>
    <description>&lt;P&gt;Thanks for your efforts.&lt;BR /&gt;After some additional checks on my side, I'm going with&amp;nbsp;&lt;CODE&gt;pidof ntpd &amp;amp;&amp;gt;/dev/null; echo $?&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Sep 2025 13:18:55 GMT</pubDate>
    <dc:creator>Danny</dc:creator>
    <dc:date>2025-09-05T13:18:55Z</dc:date>
    <item>
      <title>Verify if NTP is enabled in expert mode?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256587#M9231</link>
      <description>&lt;P&gt;In Gaia &lt;A href="https://sc1.checkpoint.com/documents/R82/WebAdminGuides/EN/CP_R82_Gaia_AdminGuide/Content/Topics-GAG/Gaia-Clish-Expert-Mode.htm" target="_self"&gt;expert mode&lt;/A&gt;, is it possible to check if NTP is enabled without running&amp;nbsp;&lt;CODE&gt;clish -c "show ntp active"&lt;/CODE&gt;?&lt;BR /&gt;This is to avoid any possible config lock errors. I'd prefer something like a quick &lt;CODE&gt;grep&lt;/CODE&gt; check, if possible.&lt;BR /&gt;&lt;BR /&gt;Current command:&lt;BR /&gt;&lt;CODE&gt;[Expert@firewall:0]# clish -c "show ntp active"&lt;/CODE&gt; &lt;BR /&gt;Output:&lt;BR /&gt;&lt;CODE&gt;CLINFR0771 Config lock is owned by admin. Use the command 'lock database override' to acquire the lock.&lt;BR /&gt;1_01:&lt;BR /&gt;No&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2025 14:28:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256587#M9231</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2025-09-04T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Verify if NTP is enabled in expert mode?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256590#M9232</link>
      <description>&lt;P&gt;'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.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[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&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2025 14:45:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256590#M9232</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2025-09-04T14:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Verify if NTP is enabled in expert mode?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256591#M9233</link>
      <description>&lt;P&gt;Just tried it in R81.20 and R82, worked fine.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;
&lt;P&gt;[Expert@CP-GW:0]# clish -c "show ntp active"&lt;BR /&gt;No&lt;BR /&gt;[Expert@CP-GW:0]#&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2025 15:36:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256591#M9233</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2025-09-04T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Verify if NTP is enabled in expert mode?</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256656#M9237</link>
      <description>&lt;P&gt;Thanks for your efforts.&lt;BR /&gt;After some additional checks on my side, I'm going with&amp;nbsp;&lt;CODE&gt;pidof ntpd &amp;amp;&amp;gt;/dev/null; echo $?&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 13:18:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Verify-if-NTP-is-enabled-in-expert-mode/m-p/256656#M9237</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2025-09-05T13:18:55Z</dc:date>
    </item>
  </channel>
</rss>

