Commit graph

61 commits

Author SHA1 Message Date
Bjarni Ingi Gislason
ba6b6d8d08 doc: sys-utils/*: fix some warnings from "mandoc -T lint"
mandoc: ./sys-utils/adjtime_config.5:26:1: WARNING: skipping paragraph macro: sp after PP

mandoc: ./sys-utils/chcpu.8:98:2: WARNING: skipping paragraph macro: br at the end of SH

mandoc: ./sys-utils/choom.1:26:22: STYLE: unterminated quoted argument

mandoc: ./sys-utils/dmesg.1:90:5: STYLE: unterminated quoted argument
mandoc: ./sys-utils/dmesg.1:147:5: STYLE: unterminated quoted argument
mandoc: ./sys-utils/dmesg.1:33:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./sys-utils/dmesg.1:255:2: WARNING: skipping paragraph macro: br after sp

mandoc: ./sys-utils/flock.1:183:2: WARNING: line scope broken: TQ breaks TP
mandoc: ./sys-utils/flock.1:43:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/fsfreeze.8:79:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/fsfreeze.8:83:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/ipcmk.1:43:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./sys-utils/lsirq.1:16:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/lsirq.1:31:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/lsirq.1:34:11: STYLE: unterminated quoted argument

mandoc: ./sys-utils/mount.8:901:4: STYLE: unterminated quoted argument
mandoc: ./sys-utils/mount.8:2239:38: STYLE: unterminated quoted argument
mandoc: ./sys-utils/mount.8:88:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./sys-utils/mount.8:90:2: WARNING: skipping paragraph macro: br before sp

mandoc: ./sys-utils/mountpoint.1:50:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/mountpoint.1:57:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/readprofile.8:10:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/readprofile.8💯2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/renice.1:65:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:68:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:72:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:55:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./sys-utils/swapon.8:227:2: WARNING: skipping paragraph macro: br after SH

mandoc: ./sys-utils/unshare.1:350:32: STYLE: unterminated quoted argument
mandoc: ./sys-utils/unshare.1:253:2: WARNING: skipping paragraph macro: PP after SH

####

  The ouput from "nroff" and "groff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2020-06-15 11:28:01 +02:00
Konstantin Khlebnikov
9bf622dad9 dmesg: adjust timestamps according to suspended time
Timestamps in kernel log comes from monotonic clocksource which does not
tick when system suspended. Suspended time easily sums into hours and days
rendering human readable timestamps in dmesg useless.

Adjusting timestamps accouring to current delta between boottime and
monotonic clocksources produces accurate timestamps for messages printed
since last resume. Which are supposed to be most interesting.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
2020-06-04 10:57:36 +02:00
Konstantin Khlebnikov
d7881b0ed5 dmesg: add --follow-new
Option --follow-new (-W) works the same as --follow (-w) but initially
seeks to the end of kernel ring buffer, so it prints only new messages.
Useful for capturing kernel messages during actions without past log.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
2020-06-01 09:55:49 +02:00
Michael Kerrisk (man-pages)
ade04bb89c Manual pages: order AUTHORS / COPYRIGHT / SEE ALSO / AVAILABILITY consistently
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.

In this patch, we ensure that the AUTHORS, COPYRIGHT, SEE ALSO, and
AVAILABILITY sections are always placed at the end of the page.

Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:

    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
    [Apply patch]
    $ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
    $ diff a b
    $ echo $?
    0

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-22 10:25:49 +02:00
Bjarni Ingi Gislason
eb02489380 man pages: Add a comma after "e.g." and "i.e."
Add a comma (,) after "e.g." and "i.e.", or use English words
(man-pages(7) [package "manpages"]).

  Abbreviation points should be protected (usually with the
non-printing, zero width character '\&') from being interpreted as an
end of sentence, if they are not, and that independent of their current
place on the line.

  This is important when typing, as one does not usually know in
advance when the editor jumps to a new line.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2019-12-17 12:32:43 +01:00
Elliott Mitchell
2bb3aa36b2 cleanup: Remove some spurious spaces
Sorry detail-oriented people tend to wipe these out if they notice them.
Add in automated tools and lots of excess end-of-line spaces get wiped
out.

Addresses: https://github.com/karelzak/util-linux/pull/849
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-10-01 13:01:43 +02:00
Karel Zak
646bba41fd dmesg: add --noescape
We have no way how to print the kernel message buffer in really raw
way. The new option --noescape disables all \x<hex> translations.

Addresses: https://github.com/karelzak/util-linux/issues/858
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-09-09 12:56:53 +02:00
Jean-Philippe ROMAIN
144f12959c dmesg: correct "-n, --console-level level" example in manual page
When providing an abbreviation of the level name with the option "-n, --console-level level",
it corresponds to the level (included) up to which messages are displayed on the console.
If a level number is given, this level is excluded.

So in the given example, "-n 1" is equivalent to "-n emerg".

Signed-off-by: Jean-Philippe Romain <jean-philippe.romain@st.com>
2018-12-17 10:16:26 +01:00
Bjarni Ingi Gislason
0bb7e904d7 man: Use the correct macro for a font change of one argument
Use the correct macro (I, B) for the font change of one argument, not
those that are used for alternating two fonts, like "BR", "IR", "RB",
or "RI".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2018-05-23 10:43:27 +02:00
Sami Kerola
1c199a6e15 dmesg: link together with syslog(2) manual page
The dmesg may require capabilities(7) when /proc/sys/kernel/dmesg_restrict
has none zero value.  This is explained in detail in syslog(2) manual page.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2018-05-03 10:47:01 +02:00
Prarit Bhargava
5f538ac40c dmesg: Add --force-prefix option
The kernel outputs multi-line messages (kernel messages that contain
the end-of-line character '\n').  These message are currently displayed by
dmesg as

[965199.028940] runnable tasks:
                           task   PID         tree-key  switches  prio
wait-time             sum-exec        sum-sleep
                ----------------------------------------------------------------------------------------------------------

The kernel timestamps each of these lines with [965199.028940] and the
dmesg utility should do the same.

Add the 'force-prefix'/'-p' dmesg option to add decode & timestamp
information to each line of a multi-line message.

Notes: The new print_record() algorithm stores the decode & timestamp
information in buffers.  If the force-prefix option is used, the
message is split into separate lines and each line is prefixed with
the stored decode & timestamp information.  The splitting of the
message into separate lines is done using strtok() which requires
write access to the message buffer (ie, the const message buffer is
now copied into a writeable buffer).

Successfully tested by me by looking at sysrq-t and sysrq-w output.
All known good /tests passed with these changes.

[kzak@redhat.com:

  - use snprintf()
  - cleanup \n usage (don't count line break to the
    message text in the parsers  and always print \n after the text
  - add the option to the man page
  - use --force-prefix for kmsg only, old syslog(2) API splits messages itself
  - strdup() the message text only on force-prefix]

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-01 15:37:00 +01:00
Karel Zak
da96496322 dmesg: add note about -F format to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-10-30 15:45:02 +01:00
Sébastien Helleu
d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Michael Kerrisk (man-pages)
b2cc2a7fc6 Fix formatting errors in page cross references
These pages had errors such as

    .BR page (x) .

which should be

    .BR page (x).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Michael Kerrisk (man-pages)
f053ff1e3a Place SEE ALSO entries in order
This patch does only the following:

* Order SEE ALSO entries first by section name, then alphabetically
  within section
* Adds one or two missing commas in SEE ALSO lists
* Removes one or two periods that were (inconsistently) used
  at the end of SEE ALSO lists.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-11-29 10:44:19 +01:00
Benno Schulenberg
239610b659 dmseg: slightly improve punctuation and formatting of the manpage
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2015-11-09 10:03:58 +01:00
Karel Zak
3a131296d1 dmesg: highlight -T issues in docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-08-25 15:43:03 +02:00
Karel Zak
5d51dc2a7f colors: cleanup man pages, add hint to usage()
cfdisk, fdisk, calm dmesg and hexdump

Signed-off-by: Karel Zak <kzak@redhat.com>

Signed-off-by: Karel Zak <kzak@redhat.com>
2015-02-25 12:40:06 +01:00
J William Piggott
b06c1ca6f8 docs: restore minus symbols in long opts
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-20 18:15:30 -05:00
Karel Zak
33ecab2b9c dmesg: improve reltime colors
[  +0.004034] sd 113:0:0:0: [sdb] Attached SCSI disk
[Oct10 13:04]  sdb: unknown partition table
[  +0.034011]  sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 >

.. the "Oct10 13:04" is possible to colorize by "timebreak"
scheme (default is bold green).

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-14 10:20:19 +02:00
Benno Schulenberg
5e43af7e34 docs: fix some things that were overlooked during the first pass
Mainly more option sorting, some formatting adjustments, and the adding
of a missing --version here and there.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-28 11:16:53 +02:00
Benno Schulenberg
e33ee284f9 docs: bring some more man pages closer to standard formatting
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-16 12:03:26 +02:00
Karel Zak
f4bc7f96a6 dmesg: support colors customization
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-05-13 12:13:02 +02:00
Karel Zak
60ec67ff4e lib/colors: add info to man pages, add terminal-colors.d.5
Co-Author: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-11 10:05:32 +01:00
Benno Schulenberg
b4362b6f84 docs: standardize the phrases for --help and --version in all man pages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-10-15 10:28:30 +02:00
Benno Schulenberg
75b53a08b1 docs: fix wording and formatting of man page for dmesg
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-07-09 11:12:06 +02:00
Sami Kerola
c31f4b8604 docs: add --time-format option and ISO-8601 format to manual
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-07-01 11:07:44 +02:00
Karel Zak
9bc2b51a06 dmesg: support --color[={auto,always,never}]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-06 19:11:28 +02:00
Karel Zak
aa192520d3 dmesg: use $PAGER for --human output, add --nopager
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 14:05:24 +01:00
Karel Zak
f0a3a1caac dmesg: add --human
* enable --reltime
 * enable --color
 * a little bit cleanup main()

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 12:38:28 +01:00
Ondrej Oprala
098ce273ca dmesg: Add a --color option to colorize error and panic messages
[kzak@redhat.com: - update man page
                  - colorize critical messages too]

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2012-10-16 16:42:32 +02:00
Karel Zak
60464b1f1a dmesg: add --reltime to print human readable deltas
[Jul20 09:50] device vnet0 entered promiscuous mode
[  +0.002248] virbr0: topology change detected, propagating
[  +0.000017] virbr0: port 2(vnet0) entered forwarding state
[  +0.000036] virbr0: port 2(vnet0) entered forwarding state
[  +0.001663] ADDRCONF(NETDEV_CHANGE): virbr0: link becomes ready
[ +10.480914] vnet0: no IPv6 routers present
[Jul20 14:35] xhci_hcd 0000:0e:00.0: WARN Event TRB for slot 3 ep 5 with no TDs queued?
[Jul20 19:23] EXT4-fs (sda2): re-mounted. Opts: (null)
[  +6.052980] EXT4-fs (sda2): re-mounted. Opts: (null)

Suggested by Linus:
http://thread.gmane.org/gmane.linux.kernel/1290886/focus=1296138

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-20 19:53:44 +02:00
Karel Zak
37b04d6cce dmesg: implement backwardly compatible --raw for /dev/kmsg
.. and if you really want raw data from /dev/kmsg then use dd(1) ;-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-20 14:41:25 +02:00
Karel Zak
0fd12a9697 dmesg: add --follow feature
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-20 14:04:48 +02:00
Karel Zak
ed61acc254 dmesg: add --syslog to force to old syslog(2) interface
... just for debugging or for people who somehow depends on syslog(2)
behavior.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-19 18:35:20 +02:00
Karel Zak
abb53be5cb Merge branch '2012wk22' of git://github.com/kerolasa/lelux-utiliteetit
* '2012wk22' of git://github.com/kerolasa/lelux-utiliteetit:
  docs: clean up getopt.1 manual
  docs: clean up dmesg.1 manual
  docs: clean up chcpu.8 manual
  fileutils: xmkstemp() interface change
  docs: fix all man page groff warnings
  tools: add checkmans.sh
  docs: clean up wdctl.8 manual
  docs: clean up login.1 manual
  login: allow TTYGROUP name begin by number
  build-sys: add su executable to .gitignore
  logindefs: change getlogindefs_num() to return unsigned long

Conflicts:
	login-utils/su.c
	sys-utils/dmesg.1
2012-06-05 16:57:01 +02:00
Karel Zak
a862a45210 dmesg: fix typo in man page
Reported-by: Hemant Borole <hemantborole@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-05 14:40:10 +02:00
Sami Kerola
8a78a4fe2f docs: clean up dmesg.1 manual
* Add lightness to synopsis.
* Add few missing italic highlights to text segments which refer
  command line argument(s).
* Turn off bold where ever possible (makes text unnecessarily heavy).
* Add spaces after dots (English spacing).
* Use URL and email macros where appropriate.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-02 21:57:31 +02:00
Karel Zak
c672220f1c dmesg: add --file option
This new option is mostly for testing (to test raw logs from another
boxes/kernels).

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-08 19:40:34 +02:00
Benno Schulenberg
232dc924c4 docs: uniformize the header and footer lines in man pages
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.

Also improve here and there the one-line program description.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:21 +02:00
Karel Zak
608d45015f dmesg: allow to print time delta without timestamp
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-20 17:03:24 +02:00
Karel Zak
42fac79a21 dmesg: add --ctime to print human readable timestamps
Based on patch from "corentin.labbe" <corentin.labbe@geomatys.fr>.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-20 14:26:45 +02:00
Karel Zak
bd304d92ff dmesg: add --show-delta option
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-20 12:52:15 +02:00
Karel Zak
d74b8dfc70 dmesg: add -t option to suppress timestamps
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-18 11:48:41 +02:00
Karel Zak
2500018011 dmesg: add -u and -k options
-u  : print kernel messages
 -k  : print userspace message

The options could be mixed together or with --facility option too.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-18 11:28:15 +02:00
Karel Zak
5ef053699b dmesg: reorder options, add comments
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-14 13:31:53 +02:00
Karel Zak
0e24df3b10 dmesg: add --facility option
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-14 12:48:07 +02:00
Karel Zak
85f3cc55f7 dmesg: add --decode to print readable facility and level
# dmesg --decode
 ...
 kern  :info  : [53335.743185] PM: resume of devices complete after 2496.795 msecs
 kern  :debug : [53335.743593] PM: Finishing wakeup.
 kern  :warn  : [53335.743595] Restarting tasks ... done.
 kern  :info  : [53335.790452] video LNXVIDEO:00: Restoring backlight state
 kern  :debug : [53336.418576] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-14 12:30:18 +02:00
Karel Zak
636a6207d9 dmesg: add --level=<list>
For example

	dmesg --level=err,warn

will print only error and warning messages.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-13 15:50:47 +02:00
Karel Zak
f06ec64fda dmesg; support level names (e.g. --console-level=alert)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-01 16:33:34 +02:00