# Command "ntpq -p" takes time more than 5 sec

**URL:** <https://community.ntppool.org/t/command-ntpq-p-takes-time-more-than-5-sec/1305>\
**Category:** Client Configuration and Development\
**Created:** [July 1, 2019, 7:48am UTC](https://community.ntppool.org/t/command-ntpq-p-takes-time-more-than-5-sec/1305 "2019-07-01T07:48:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshya2310](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@akshya2310](https://community.ntppool.org/u/akshya2310)\
**Post date:** [July 1, 2019, 7:48am UTC](https://community.ntppool.org/t/command-ntpq-p-takes-time-more-than-5-sec/1305/1 "2019-07-01T07:48:32Z")

</div>

What is the maximum time this command can take to show the output.

---

<div class="post-metadata">

**Author:** ![littlejason99](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/littlejason99/32/242_2.png) [@littlejason99](https://community.ntppool.org/u/littlejason99)\
**Post date:** [July 1, 2019, 12:02pm UTC](https://community.ntppool.org/t/command-ntpq-p-takes-time-more-than-5-sec/1305/2 "2019-07-01T12:02:27Z")

</div>

I believe it’s whatever the DNS timeout is for your OS…

If you need speedy output, use ‘-pn’ so it returns the IP vs doing a DNS lookup for each server.

---

<div class="post-metadata">

**Author:** ![NTPman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.ntppool.org/ntpman/32/450_2.png) [@NTPman](https://community.ntppool.org/u/NTPman)\
**Post date:** [July 1, 2019, 1:16pm UTC](https://community.ntppool.org/t/command-ntpq-p-takes-time-more-than-5-sec/1305/3 "2019-07-01T13:16:21Z")

</div>

> [@akshya2310](#):
>
> What is the maximum time this command can take to show the output.

There may be additional time for the name resolution, otherwise, from the manual page of the command `ntpq`:

```
   timeout milliseconds
           Specify a timeout period for responses to server queries. The default is about 5000 milliseconds. Note that since
           ntpq retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout
           value set.

```

---

<div class="post-metadata">

**Author:** ![akshya2310](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@akshya2310](https://community.ntppool.org/u/akshya2310)\
**Post date:** [July 22, 2019, 1:28pm UTC](https://community.ntppool.org/t/command-ntpq-p-takes-time-more-than-5-sec/1305/4 "2019-07-22T13:28:45Z")

</div>

Thank you for your replies.
