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:

GoDaddy.com

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

News:

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:

Feedback:

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:

  • Garegin16

    you are comparing device manager with dmesg? i think you need to lay off the pot, buddy.

  • ChrisLAS

    I think you need to re-listen to what I said. 

    -Chris

  • Jungle-Booige

    Terminator is a great app! Been using it for nearly two years and its SO much more efficient than what I was usually using–tabs.

  • Vulix

    I recently started to watch LAS, and I like it. Thanks for the interesting videos!

  • Dale Moore

    great show, cant wait to see what you do with the stream. JB is putting out some good stuff, keep up the good work

  • Guest

    Fedora is going to have tools for signing [1]. What that means is you are able to sign your modules (and whatever else they wish to sign) and use them with signed kernel.

    [1] https://fedoraproject.org/wiki/Secureboot

    Ubuntu does allow to use unsigned binaries and therefore malware as well. Do you know how users are able to switch on the security features that “Secure Boot” provides on Ubuntu?

    Ubuntu key sounds even more bad and restrictive than Microsoft/Windows key because it seems that Canonical is not going to have a signing service. It means that other distributions are not able to sign their binaries with Ubuntu key. Thanks to Microsoft they are still able to use Microsoft’s key and be usable on those computers.

  • http://pinguy-os.sourceforge.net/ Pinguy

    Thanks for the shout about Pinguy OS.

    Be pretty cool if you did a review on it if its something your listeners would be into. If you decide to do it I could hang about in the IRC and will be able to answer questions people may have.

  • Nordog

    This episode isn’t shoing up in my Itunes mp3 feed. Is it just me or do other have the same problem?

  • ChrisLAS

    The feedburner service had an outage at the time this show was posted, but they are back now!

    -Chris

  • Kabamaru Igano

    Nice suggestion.

  • https://launchpad.net/~nelitonpjr Neliton

    That was handy!!! Thanks to the tips on logging, I was able to find out a small problem I didn’t know I had (common among Dell laptops like Vostro 1000,  Inspiron 1501, etc): for some reason the battery (!) was generating false key press and release events many times a second, flooding the syslog. After coming across some weird solutions, I found out that this can be easily fixed by simply taking the battery out and putting it back again.

    Thank you guys!

  • Lukasz Dudek

    Great show Cris &Matt. Howto – educating. I figured out that with logger you can comment on what you were doing and it will help you to browse the logs easier in that long list. About Jeffrey’s question, there is one other software compilation rescue CD that saved my pc from throwing it under the truck:

    http://www.hiren.info/pages/bootcd

    All doe it has a lot of M$ tools, it has handy linux tools as well (besides window$ box need more help anyway :) )

    @google-f90f52ca16ed104661f10cc3d1a1c06c:disqus  Guys are awsome, true. I dont watch tv (its Cartoon Network there on anyway :) )
    anymore, I just read the news, and then go on JB to check whats on. Great job with th those new shows.

    Keep the great job, thanks for shows.

  • Marcelo Magallon

    Two things:

    1. Secure Boot doesn’t have anything to do with servers (yet).  It’s all PCs.

    2. Ubuntu’s approach screws up the rest of the community (oh, surprise), as it designates Ubuntu as a preferred vendor.  They will compile and sign the bootloader.   This is the only bootloader users get to use.  They say they are doing this to shield against the case of a vendor shipping out a locked-up system where the user can’t disable secure boot or modify the keys installed in the system.  This is winmodems all over again: at the start people would have to pay attention to the fact they weren’t getting a winmodem, and as time passed, real modems started becoming a rare thing and it got to the point where they were hard to find.  Now you will start to look for system that allow you to disable secure boot or install your own keys.  The MS Windows users won’t care about this, and as time passes, these systems will become harder to find.  At some point in the future MS Windows 9 or 10 or 11 will lift the requirement for user-configurable keys.  How do I know that Ubuntu won’t be tempted into locking out other vendors from “their” certified systems?

  • Whitekid3

    large 10,000 pc order??? lol … try 10 million

  • Joren

    probably couldn’t talk about screen?

  • http://twitter.com/bambu85 bambu85

    Please do more episodes like this one!

    I’m not a Linux newbie, but it’s still great to have people with more years of this stuff under their belts to explain it simply. Have you considered an episode covering common Linux folder structures? Something like a LAS version of this:
    http://www.howtogeek.com/117435/htg-explains-the-linux-directory-structure-explained/ 

    Thanks

  • http://techmansworld.blogspot.com/ MHazell

    Thanks for the how to this week.