Linux Logging Basics | LAS | s22e05

Linux Logging Basics | LAS | s22e05

We get you familiar with the essentials of Linux logging, our tips for the logs to check, and the tools to use. And graphical tools to view your logs.

Plus: NVIDIA’s big loss, Ubuntu’s SecureBoot plans, and some sad news for QT.

Then: Chris has big news about Jupiter Radio, our new Airtime powered community project!

All this week on, The Linux Action Show!

Thanks to:

Limited time offer:
$1.99/mo economy hosting for 3 months – code: 199linux
Expires: June 31, 2012

Want to save money on your entire order? Use our code LINUX and save 10%!

Direct Download:

HD Video | Mobile Video | Ogg Video | MP3 Audio | Ogg Audio | YouTube | Torrent File

RSS Feeds:

HD Video Feed | Large Video Feed | Mobile Video Feed | MP3 Feed | Ogg Feed | iTunes Feeds | Torrent Feed

Support the Show:

Show Notes:

Runs Linux:

Android Pick:

Universal Pick:

Distro Pick:

Linux Action Show Subreddit


Linux Logs Explained:

  • Syslog

    There are two services, or daemons, that control logging, klogd and syslogd. klogd only deals with kernel messages. syslogd deals with other system messages, such as applications. You can configure the behavior of both by editing the files /etc/syslog.conf and /etc/sysconfig/syslog

  • /var/log/messages

    The messages log is the core system log file. It contains the boot messages when the system came up as well as other status messages as the system runs. Errors with IO, networking, and other general system errors are reported in this file. Other information, such as when someone becomes root, is listed here as well. If services are running, such as DHCP servers, you can watch the action in the messages file. /var/log/messages is generally your first place to look when you are troubleshooting.

  • dmesg

    To get a quick view of the boot log for the last system boot, use the command dmesg. It generally puts out a lot of text, so you will generally want to pipe it through a viewer.
    dmesg | more

  • tail

    Sometimes you want to keep an eye on a log file as activity is occurring. Tail is designed to show the last few lines of a text file. By adding the -f switch, tail will continue to show new output as it occurs.
    tail -f /var/log/messages

  • more

    More works the same as the DOS version. You can point it to a file, or pipe output through it to see the information one screen page at a time. For example, to show the contents of the Xfree86 startup log file one screen page at a time:
    more /var/log/XFree86.0.log

  • less

    Less is another text viewer, but it allows you to scroll through a file and search for information.
    less /var/log/messages

  • logger

    You may want to put your own messages into the log file. You could just append the log message to the correct text file, but you would have to duplicate the log information style. Also, you would have to change your code if the logging system had been customized. The logger command lets you send your own messages to the logging facility. Use it in scripts to provide messages about execution and errors.

  • Remote Syslog

    You can have it sent to a remote host where that host will process it according to its own syslogd configuration. Remote logging is an excellent security feature.

GUI Linux Log Viewers:


Jupiter Radio Signup:


Chris’ Stash:

Matt’s Project:

Find us on Google+
Find us on Twitter:

Follow the network on Facebook:

Jupiter Broadcasting Forum:

Catch the show LIVE Sunday 10am Pacific / 5pm UTC:

Question? Comments? Contact us here!