148
votes
Accepted
How to read dmesg from previous session? (dmesg.0)
Although a bit late for the OP...
I use Fedora, but if your system uses journalctl then you can easily get the kernel messages (dmesg log) from prior shutdown/crash (in a dmesg -T format) through the ...
101
votes
Accepted
dmesg: read kernel buffer failed: Permission denied
So it was actually trivial, looking at the very last message from the bug report:
Re: Bug#842226: dmesg: read kernel buffer failed: Operation not permitted
Part of the changelog from the ...
29
votes
Accepted
Understanding "serial8250: too much work for irq4" kernel message
There is nothing wrong with your kernel or device drivers. The problem is with your machine hardware. The problem is that it is impossible hardware.
This is an error in several virtualization ...
23
votes
Accepted
dmesg with / without sudo on Debian / Mint
This is controlled by the dmesg_restrict sysctl entry, documented in the kernel documentation. Its default value is determined by the CONFIG_SECURITY_DMESG_RESTRICT kernel configuration value, which ...
21
votes
How can I write to dmesg from command line?
For BSDs:
logger -p kern.notice MESSAGE
(courtesy Ian, freebsd-questions mailing list)
or other priorities.
For Linux:
su root -c 'echo MESSAGE > /dev/kmsg'
19
votes
Accepted
What does "usb: port power management may be unreliable" actually mean?
The message was introduced in usb: sysfs link peer ports (it's part of a patch sequence reworking USB port power control). The underlying issue is described in Power Management for USB in the kernel ...
19
votes
Accepted
How to read *.journal files?
Borrowed from this answer:
journalctl --file
e.g.
journalctl --file /path/to/some/file.journal
As indicated in that answer, these logs are regularly rotated, and may not stretch back as far as you ...
19
votes
Accepted
How to filter the dmesg log to see only the errors
use --level option described in man dmesg:
-l, --level list
Restrict output to the given (comma-separated) list of levels.
For example:
dmesg --level=err,warn
...
16
votes
Accepted
What is the first column in dmesg?
That’s the timestamp of the event, i.e. the time at which it occurred, measured in seconds (with 0 being equal to the time at which the kernel booted).
You can print actual times using -T instead, ...
15
votes
command to determine ports of a device (like /dev/ttyUSB0)
Assuming that you know what the device you plugged in is, in 14.04 Ubuntu, at least, there is the command usb-devices that you can look through and find the information:
$ usb-devices
T: Bus=01 Lev=...
13
votes
Accepted
What is the difference between dmesg and journalctl
They are two totally different things.
On most systems that I'm aware of that has dmesg, it is sometimes a command and sometimes a log file in /var/log, and may be both. The log contains messages ...
11
votes
How can I see dmesg output as it changes?
If you are using an embedded system, like BusyBox that is common on systems like OpenWrt, it has very limited functionality and only 2-3 flags are supported.
If you want a quick and dirty way of ...
8
votes
Accepted
How to print kernel time from command line?
Depending on your flavor of Unix, the /proc filesystem may have an uptime file somewhere with the information you want.
Linux> cat /proc/uptime
5899847.37 23165596.55
And the output of the uptime ...
8
votes
Accepted
dmesg + Assuming drive cache: write through
From the link you gave, “So these events can typically be ignored.” That’s the solution.
The kernel prints the message to err on the side of caution; all it means is that the kernel tried to determine ...
7
votes
Accepted
Writing to /dev/kmsg randomly shows up in /proc/kmsg and always in dmesg?
/proc/kmsg is not shareable amongst log readers, and if there are multiple readers only one of them will receive any given log message. /dev/kmsg is shareable amongst multiple log readers, providing ...
7
votes
dmesg follow in FreeBSD
The way to watch the kernel message log in FreeBSD is not with dmesg at all. dmesg is based around sysctl() which does not present a followable interface. Rather, sysctl() only takes snapshots of ...
6
votes
Log iptables events on centos 7
When a packet matches a iptables ... -j LOG rule, a kernel log message is generated. You can specify the severity level of the message using the --log-level <level> option, where the <level&...
6
votes
Accepted
Dev loop0: unable to read RDB block 8
The loop0 device is only 4kB in size, which is 8 blocks of 512 bytes.
The driver for the RDB partition table format tries to read the first 8 kB (16 blocks), because the RDB can be in any of them. ...
5
votes
command to determine ports of a device (like /dev/ttyUSB0)
I found @phemmer's accepted answer regularly helpful and turned it into a bash script. I added shell process backgrounding to make it run a bit faster for lots of USB devices connected to a system (...
5
votes
Tweak perl script for human-readable dmesg output
The POSIX module includes the strftime function, which allows via strftime(3) conversion specifier characters the desired templating of time:
% perl -MPOSIX=strftime -E 'say strftime "[%F %T]", ...
5
votes
Accepted
What is the meaning of "Worm initializing..." in the output of dmesg?
This message is generated by a kernel module called worm:
[myhost ~]% lsmod | grep worm
worm 39172 0
[myhost ~]% grep "Worm initializing..." /usr/diags/kernmods/worm/worm.c
...
5
votes
Accepted
Do I need to take action regarding my Microarchitectural Data Sampling (MDS) status?
Can I do anything further to protect my system, and if so, what should my next steps be?
You can do something further to protect your system: you can disable SMT (hyperthreading). This is usually ...
5
votes
how are early logs logged in rsyslog, when rsyslog is not yet running?
The syslog process typically picks up messages from three sources:
Applications, via /dev/log
Network via port 514
The kernel, via /proc/kmsg
Now the first... traditionally any application that ...
4
votes
Accepted
How can I find out what the entries in dmesg means?
There's no easy way. These messages are intended for kernel developers and experienced system administrators, not for ordinary users. There's no general structure to them (apart from the number in ...
4
votes
Accepted
How to tail dmesg on CentOS 7
dmesg is a ring buffer. Which is to say, when it reaches a certain size, old data are thrown out. Because of this, it doesn't really work like a normal file. It's kind of like the data in /proc - ...
4
votes
How to filter the dmesg log to see only the errors
Direct Answer
dmesg --level=emerg,alert,crit,err
This is what most people are going to be looking for. Add or remove any from the following list of eight, ordered by severity.
emerg - system is ...
4
votes
Accepted
Can I restrict dmesg to a group?
If, by "sudoless", you mean you want to be able to just write dmesg or such on the command line, then the simplest solution would be to make a script that calls /bin/dmesg through sudo, and configure ...
4
votes
Accepted
why MTU change from 1500 to 9000
This means that your interface has been configured to use jumbo frames. If the connection is working, then it’s nothing to worry about, and you’ll get higher throughput as a result. (If it works, it ...
4
votes
Accepted
"kernel: Buffer I/O error on device" - Does my server have a hardware problem?
This I/O error message is written to warn about a hardware error with sdb. It could be with the disks or with the cable, for example.
I suppose it is less likely to be an error in the disks ...
4
votes
How can i find out which hdd is failing
i found it in my noobish way by first doing ls /dev/disk/by-path/pci-0000\:02\:00.1-ata-6 (using tab to list all links/files and to reach ata-6) and then lsblk /dev/disk/by-path/pci-0000\:02\:00.1-ata-...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
dmesg × 256linux × 53
kernel × 47
logs × 31
usb × 30
rhel × 23
linux-kernel × 23
debian × 19
boot × 19
ubuntu × 16
hard-disk × 15
centos × 10
usb-drive × 10
rsyslog × 9
memory × 8
arch-linux × 7
drivers × 7
fdisk × 7
syslog × 7
networking × 6
fedora × 6
systemd × 6
mount × 6
kernel-modules × 6
io × 6