Syslog Viewer Ubuntu Stage 2




The log file is a file that stores all the OS behavior, ranging from the system, application, user and others. The log file records every command that is executed by the user, the ip address to access the web (if the webserver), incoming and outgoing email (if your mailserver) etc.

Here are some log files and their uses:
  • /var/log/messages : General log messages
  • /var/log/boot : System boot log
  • /var/log/debug : Debugging log messages
  • /var/log/auth.log : User login and authentication logs
  • /var/log/daemon.log : Running services such as squid, ntpd and others log message to this file
  • /var/log/dmesg : Linux kernel ring buffer log
  • /var/log/dpkg.log : All binary package log includes package installation and other information
  • /var/log/faillog : User failed login log file
  • /var/log/kern.log : Kernel log file
  • /var/log/lpr.log : Printer log file
  • /var/log/mail.* : All mail server message log files
  • /var/log/mysql.* : MySQL server log file
  • /var/log/user.log : All userlevel logs
  • /var/log/xorg.0.log : X.org log file
  • /var/log/apache2/* : Apache web server log files directory
  • /var/log/lighttpd/* : Lighttpd web server log files directory
  • /var/log/fsck/* : fsck command log
  • /var/log/apport.log : Application crash report / log file
Well to see the log files above, we could use some Linux commands, including:



Tail (see/paling under the latest log on the list).
tail -f /var/log/file.log

More (see log more fully).
more /var/log/file.log

Paint (see the log with a standard view) –> the most commonly used.
cat /var/log/file.err

Less (see logs per page/a lull divided per screen)
less /var/log/file.log

Grep (see the log by giving the desired word filter), the example below is view logs containing the word "fail".
grep -i fail /var/log/file.log

For those of you who use the GUI (KDM or GDM) can see the log by going to:
System = > Administration = > Log File Viewer


Or just type (Gnome-specific):
gnome-system-log &

There are times when we need to monitor the system log in realtime on our ubuntu machine. It's easy, which is as follows:

Open Your linux terminal
And run the following command:
tail -f /var/log/syslog



Next
Previous
Click here for Comments

0 comments: