1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
|
'\" t
.\" Title: lsclocks
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.20
.\" Date: 2026-02-18
.\" Manual: User Commands
.\" Source: util-linux 2.42-rc1
.\" Language: English
.\"
.TH "LSCLOCKS" "1" "2026-02-18" "util\-linux 2.42\-rc1" "User Commands"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
. mso www.tmac
. am URL
. ad l
. .
. am MTO
. ad l
. .
. LINKSTYLE blue R < >
.\}
.SH "NAME"
lsclocks \- display system clocks
.SH "SYNOPSIS"
.sp
\fBlsclocks\fP [option]
.SH "DESCRIPTION"
.sp
\fBlsclocks\fP is a simple command to display system clocks.
.sp
It allows to display information like current time and resolution of clocks.
Different kinds of clocks are supported.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
POSIX clocks: \fBCLOCK_MONOTONIC\fP, \fBCLOCK_REALTIME\fP, \fBCLOCK_BOOTTIME\fP, etc.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
CPU clocks: \fBclock_getcpuclockid\fP(3).
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
PTP clocks: \fB/dev/ptp0\fP.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
RTC clocks: \fB/dev/rtc0\fP.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
. sp -1
. IP \(bu 2.3
.\}
Auxiliary clocks: \fBCLOCK_AUX0\fP, \fBCLOCK_AUX1\fP, etc.
.RE
.SH "OPTIONS"
.sp
\fB\-J\fP, \fB\-\-json\fP
.RS 4
Use JSON output format.
.RE
.sp
\fB\-n\fP, \fB\-\-noheadings\fP
.RS 4
Don\(cqt print headings.
.RE
.sp
\fB\-o\fP, \fB\-\-output\fP \fIlist\fP
.RS 4
Specify which output columns to print. See the \fBOUTPUT COLUMNS\fP
section for details of available columns.
.RE
.sp
\fB\-\-output\-all\fP
.RS 4
Output all columns.
.RE
.sp
\fB\-r\fP, \fB\-\-raw\fP
.RS 4
Use raw output format.
.RE
.sp
\fB\-t\fP, \fB\-\-time\fP \fIclock\fP
.RS 4
Show current time of one specific clock.
.RE
.sp
\fB\-\-no\-discover\-dynamic\fP
.RS 4
Do not try to discover dynamic clocks.
.RE
.sp
\fB\-d\fP, \fB\-\-dynamic\-clock\fP \fIpath\fP
.RS 4
Also display specified dynamic clock.
Can be specified multiple times.
.RE
.sp
\fB\-\-no\-discover\-rtc\fP
.RS 4
Do not try to discover RTCs.
.RE
.sp
\fB\-x\fP, \fB\-\-rtc\fP \fIpath\fP
.RS 4
Also display specified RTC.
Can be specified multiple times.
.RE
.sp
\fB\-c\fP, \fB\-\-cpu\-clock\fP \fIpid\fP
.RS 4
Also display CPU clock of specified process.
Can be specified multiple times.
.RE
.SH "ENVIRONMENT"
.sp
LSCLOCKS_COLUMNS=
.RS 4
Specifies a comma\-separated list of output columns to print. All columns listed in \fBOUTPUT COLUMNS\fP can be used.
.RE
.sp
\fB\-h\fP, \fB\-\-help\fP
.RS 4
Display help text and exit.
.RE
.sp
\fB\-V\fP, \fB\-\-version\fP
.RS 4
Display version and exit.
.RE
.SH "OUTPUT COLUMNS"
.sp
Each column has a type. Types are surround by < and >.
.sp
TYPE <\f(CRstring\fP>
.RS 4
Clock type.
.RE
.sp
ID <\f(CRnumber\fP>
.RS 4
Numeric clock ID.
.RE
.sp
CLOCK <\f(CRstring\fP>
.RS 4
Name in the form \fBCLOCK_\fP
.RE
.sp
NAME <\f(CRstring\fP>
.RS 4
Shorter, easier to read name.
.RE
.sp
TIME <\f(CRnumber\fP>
.RS 4
Current clock timestamp as returned by \fBclock_gettime\fP(2).
.RE
.sp
ISO_TIME <\f(CRstring\fP>
.RS 4
ISO8601 formatted version of \fBTIME\fP.
.RE
.sp
RESOL_RAW <\f(CRnumber\fP>
.RS 4
Clock resolution as returned by \fBclock_getres\fP(2).
.RE
.sp
RESOL <\f(CRnumber\fP>
.RS 4
Human readable version of \fBRESOL_RAW\fP.
.RE
.sp
REL_TIME <\f(CRstring\fP>
.RS 4
\fBTIME\fP time formatted as time range.
.RE
.sp
NS_OFFSET <\f(CRnumber\fP>
.RS 4
Offset of the current namespace to the parent namespace as read from \fB/proc/self/timens_offsets\fP.
.RE
.SH "AUTHORS"
.sp
.MTO "thomas\(att\-8ch.de" "Thomas Weißschuh" ""
.SH "SEE ALSO"
.sp
\fBclock_getres\fP(2) \fBclock_gettime\fP(2)
.SH "REPORTING BUGS"
.sp
For bug reports, use the \c
.URL "https://github.com/util\-linux/util\-linux/issues" "issue tracker" "."
.SH "AVAILABILITY"
.sp
The \fBlsclocks\fP command is part of the util\-linux package which can be downloaded from \c
.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."
|