| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
It will be better to support colors customization than use
ugly blue color. BTW, for example git-log uses brow/yellow too
by default.
This reverts commit 0b6fbc25990d9498956e06bfcf699fca094e24a9.
|
|
|
|
|
|
|
| |
The color used for subsystem prefix is useless on
while background. Let's use blue.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
[kzak@redhat.com: - move paths to pathnames.h,
- use static path buffer]
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
when writing to e.g. a pipe, output from dmesg -w can come many
minutes late due to buffering.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1060925
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1049438
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Reported-by: Petr Písař <petr.pisar@atlas.cz>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
|
|
|
| |
References: https://bugzilla.redhat.com/show_bug.cgi?id=984666
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
References: http://marc.info/?l=util-linux-ng&m=137267606929951&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier uptime determination, which was done with sysinfo(2), had one
second resolution, which made time stamps to be rounded unstable way
depending on when a dmesg command was executed. In practical terms; the
command below was supposed not to differ but it did.
$ diff -q <(dmesg --ctime) <(sleep 0.5 ; dmesg --ctime)
[kzak@redhat.com: - add -lrt to Makemodule.am,
- fallback to sysinfo() based boot time
- use #ifdef]
CC: Kay Sievers <kay@vrfy.org>
References: https://lkml.org/lkml/2013/6/30/37
Buglink: https://github.com/karelzak/util-linux/issues/24
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
The ISO-8601 should be welcomed by anyone who tries to parse dmesg time
stamp, and compare them across servers. Time format tries to imitate
coreutils 'date --iso-8601=ns' output, but instead of having nanoseconds
the dmesg is using microseconds.
Reference: http://www.cs.tut.fi/~jkorpela/iso8601.html
Addresses: http://xkcd.com/1179/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
Foremost this commit makes time printing formats explicit.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
... to make the code easy to use in utils.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Delete EXCL_ACT_ERR and EXCL_SYS_ERR defines:
usage is removed in 43d2eeef5dd3a64c372dbf60e4a32aa9e97b4645:
"dmesg: use err_exclusive_options()"
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
Possible facilities and levels are meant to be printed to same file as
the rest of the usage output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* enable --reltime
* enable --color
* a little bit cleanup main()
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* colorize subsystem prefix
* colorize time
* colorize by keywords (now "segfault" only)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
When user runs with --color it should not need to be combined with
filtering per level or facility, or decoding.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
The dmesg should not crash while --decode'ing message facilities and
levels to readable string even if the values are out of bounds.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
[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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit f06ec64f dmesg; support level names (e.g. --console-level=alert)
introduced an off-by-one error. The kernel will print messages with
a *higher* level than the console-level. The bug made it impossible to
set the level for debugging, like it is documented in e.g
Documentation/networking/netconsole.txt :
nemi:/tmp# dmesg -n 8
dmesg: unknown level '8'
And attempting to set the "emerg" level would result in an invalid 0 value:
nemi:/tmp# dmesg -n emerg
dmesg: klogctl failed: Invalid argument
Restoring the old behaviour for numeric levels, and mapping the level
names so that "dmesg -n debug" behaves as expected: logging everything
at level "debug" and higher.
[kzak@redhat.com: - add comment to parse_level()]
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
The /dev/kmsg can return EPIPE if current record has beed modified
while reading.
For init_kmsg, it cause switch to DMESG_METHOD_SYSLOG
(which is not expected) and later it can truncate output.
Signed-off-by: Milan Broz <mbroz@redhat.com>
|
|
|
|
|
|
|
|
|
| |
On old kernels (<3.5) kernel allows to open read-only /dev/kmsg for
root, but read() returns -EINVAL. It means that open() is not enough
to detect /dev/kmsg usability. We have to call read() (or epoll).
Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
Fix to small regression which made 'dmesg --clear' not to error
when running without root privileges. Same happen with '-D' and
few other options as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
.. and if you really want raw data from /dev/kmsg then use dd(1) ;-)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
kmsg advantages:
- extendible format
- tags for messages
- one read() returns one complete record
See kernel Documentation/ABI/testing/dev-kmsg.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
... just for debugging or for people who somehow depends on syslog(2)
behavior.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|