How do i view / enable kernel logs on centos / red hat linux?
Solution 1
You can see the most recent lines of output from the kernel with the dmesg
command.
Otherwise, you need to ensure that
klogd
is running (it's normally started with syslog, at boot time), and thatsyslogd
is configured to log kernel messages to a file, perhaps with the following line from/etc/syslog.conf
:kern.*<TAB><TAB><TAB>/var/log/kernel
make sure the file /var/log/kernel
exists, and restart syslogd.
Solution 2
You're tuning a performance setting -- you really want to be looking at performance counters, not log messages. Presumably you're increasing the number of concurrent connections to improve the performance of some application; you should keep an eye on your app.
Related videos on Youtube
Chris
Updated on September 18, 2022Comments
-
Chris over 1 year
Possible Duplicate:
How do i view / enable kernel logs on an ec2 instance (amazon linux)?I've got a centos server that i'm playing around with TCP settings in the sysctl.conf to increase the number of concurrent TCP connections it can handle, and i want to be able to view the kernel log to see any errors in the TCP stack, to ensure i've configured everything correctly.
I've read somewhere that i need to enable the kernel log first somehow, and then view the kernel log in /var/log/somewhere. Can anyone point me in the right direction? Thanks.
-
MadHatter over 12 yearsYou're right, my bad (fingers faster than brain). Fixed, and thank you!
-
Chris over 12 yearsTurns out that on my distro it was rsyslog, might be worth mentioning.