diff options
author | Chris Down <chris@chrisdown.name> | 2018-10-15 13:55:35 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-23 14:26:51 +0200 |
commit | 3f1c1287a96dfc146ce894bd6bfff388cba0ab55 (patch) | |
tree | 15282aa532acccdb64d3165238311a7144879578 /man/systemd-analyze.xml | |
parent | Merge pull request #10395 from yuwata/udev-cleanup-9 (diff) | |
download | systemd-3f1c1287a96dfc146ce894bd6bfff388cba0ab55.tar.xz systemd-3f1c1287a96dfc146ce894bd6bfff388cba0ab55.zip |
analyze: Add "timespan" command to dump time span in usec
This is useful for a couple of cases, I'm mostly interested in case #1:
1. Verifying "reasonable" values in a trivially scriptable way
2. Debugging unexpected time span parsing directly
Test Plan:
```
% build/systemd-analyze timespan 20
Original: 20
μs: 20
Human: 20us
% build/systemd-analyze timespan 20ms
Original: 20ms
μs: 20000
Human: 20ms
% build/systemd-analyze timespan 20z
Failed to parse time span '20z': Invalid argument
```
Diffstat (limited to 'man/systemd-analyze.xml')
-rw-r--r-- | man/systemd-analyze.xml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml index 7aa10fc68e..15e95b0c8f 100644 --- a/man/systemd-analyze.xml +++ b/man/systemd-analyze.xml @@ -106,6 +106,12 @@ <arg choice="plain">service-watchdogs</arg> <arg choice="opt"><replaceable>BOOL</replaceable></arg> </cmdsynopsis> + <cmdsynopsis> + <command>systemd-analyze</command> + <arg choice="opt" rep="repeat">OPTIONS</arg> + <arg choice="plain">timespan</arg> + <arg choice="plain" rep="repeat"><replaceable>SPAN</replaceable></arg> + </cmdsynopsis> </refsynopsisdiv> <refsect1> @@ -253,6 +259,10 @@ NAutoVTs=8 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The hardware watchdog is not affected by this setting.</para> + <para><command>systemd-analyze timespan</command> parses a time span and outputs the equivalent value in microseconds, and as a reformatted timespan. + The time span should adhere to the same syntax documented in <citerefentry><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>. + Values without associated magnitudes are parsed as seconds.</para> + <para>If no command is passed, <command>systemd-analyze time</command> is implied.</para> |