Featured

    Featured Posts

/var/log/messages

'', 'clear' => '', 'margin_top' => '', 'margin_bottom' => '', 'padding_top' => '', 'padding_bottom' => ''), array(), array()) -->

The most important log file in Linux is probably the /var/log/messages file, which records a variety of events, such as system error messages, system startups and shutdowns, change in the network configuration, etc. This is usually the first place to look at in case of problems. This file is a plain text file, so you can check it using any tool that can examine text files, such as less. You can also use the tail command to display the last 10 lines of this file:

As you can see from the output above, each line in this file is a single message recorded by some program or service. The lines are divided into five parts:

the date and time of the messagethe name of the computer from which the message came fromthe program that generated the messagethe process number (enclosed in square brackets) of the program that generated the messagethe actual log message

For example, consider the following line:

linux var log messages example

In the picture above you can see that the message was generated on November 5, 2014, 20:32:42 on a computer named suse1. The program that generated the message was dhcpcd, its PID was 3022, and the message was “eth0: renewing lease of 192.168.198.128“, which indicates that the eth0 adapter is renewing the DHCP lease.

NOTE – the /var/log/messages file doesn’t exist anymore on some distributions, most notably Ubuntu. Instead, the /var/log/syslog file is used.

'', 'clear' => '', 'margin_top' => '', 'margin_bottom' => '', 'padding_top' => '', 'padding_bottom' => ''), array(), array()) -->/var/log/messages file example

author

Author Name

Author Description!

Get Free Email Updates to your Inbox!

Post a Comment

www.ccna.ma

yu
Powered by Blogger.

Translate

Copyright © Learn Linux Th3pro.xyz | Blogger Templates | Designed By Code TAOUSSI