---
name: "ntptime"
section: "8"
platform: "linux"
package: "ntpsec"
version: "1.2.3+dfsg1-8"
release: "Debian 13 (Trixie)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/ntptime/8"
---

# ntptime(8)

read and set kernel time variables

## NAME

ntptime - read and set kernel time variables

## SYNOPSIS

```
ntptime [-chr] [-e est_error] [-f frequency] [-j]
        [-m max_error] [-o offset] [-s status]
        [-t time_constant]
```

## DESCRIPTION

Checks the kernel configuration for the NTP user interface syscalls `ntp_gettime()` and `ntp_adjtime()`.  If present, the current timekeeping data are displayed.  If not, a disappointment is displayed.  See the kernel page file in the HTML documentation in distribution for further details.

A similar display can be obtained using the `ntpq` program and `kerninfo` command.

This program is useful only with kernels featuring the [ntp\_adjtime(2)](/ntp_adjtime/2.md) system call or local equivalent, as described in the *A* \<kern.html\> Kernel Model for Precision Timekeeping"  page,

## OPTIONS

- `-c`

  Display the execution time of `ntptime` itself.

- `-e` *est\_error*

  Specify estimated error, in microseconds.

- `-f` *frequency*

  Specify frequency offset, in parts per million.

- `-h`

  Display help information.

- `-j`

  Report in JSON rather than plain text.

- `-m` *max\_error*

  Specify max possible errors, in microseconds.

- `-o` *offset*

  Specify clock offset, in microseconds.

- `-r`

  Display Unix and NTP times in raw format.

- `-s` *status*

  Specify clock status. Better know what you are doing.

- `-t` *time\_constant*

  Specify time constant, an integer in the range 0-10.

- `-V`

  Print the version string and exit.

## BUGS

The format for modes and status in the JSON report is less than ideal.

## EXIT STATUS

One of the following exit values will be returned:

0 (EXIT\_SUCCESS)

Successful program execution.

1 (EXIT\_FAILURE)

The operation failed or the command invocation was not valid.
