Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Red Hat Enterprise Linux 9 Essentials Book now available.

Purchase a copy of Red Hat Enterprise Linux 9 (RHEL 9) Essentials

Red Hat Enterprise Linux 9 Essentials Print and eBook (PDF) editions contain 34 chapters and 298 pages

Preview Book

17.4. Viewing Log Files

Most log files are in plain text format. You can view them with any text editor such as Vi or Emacs. Some log files are readable by all users on the system; however, root privileges are required to read most log files.
To view system log files in an interactive, real-time application, use the Log File Viewer.

Note: Installing the gnome-system-log package

In order to use the Log File Viewer, first ensure the gnome-system-log package is installed on your system by running, as root:
~]# yum install gnome-system-log
For more information on installing packages with Yum, refer to Section 1.2.2, “Installing”.
After you have installed the gnome-system-log package, you can open the Log File Viewer by clicking on ApplicationsSystemLog File Viewer, or type the following command at a shell prompt:
~]$ gnome-system-log
The application only displays log files that exist; thus, the list might differ from the one shown in Figure 17.1, “ Log File Viewer.
Log File Viewer
Log File Viewer
Figure 17.1.  Log File Viewer

The Log File Viewer application lets you filter any existing log file. Click on Filters from the menu and select Manage Filters to define or edit your desired filter.
Log File Viewer - Filters
Log File Viewer - Filters
Figure 17.2.  Log File Viewer - Filters

Adding or editing a filter lets you define its parameters as is shown in Figure 17.3, “ Log File Viewer - Defining a Filter.
Log File Viewer - Defining a Filter
Log File Viewer - Defining a Filter
Figure 17.3.  Log File Viewer - Defining a Filter

When defining a filter, you can edit the following parameters:
  • Name — Specifies the name of the filter.
  • Regular Expression — Specifies the regular expression that will be applied to the log file and will attempt to match any possible strings of text in it.
  • Effect
    • Highlight — If checked, the found results will be highlighted with the selected color. You may select whether to highlight the background or the foreground of the text.
    • Hide — If checked, the found results will be hidden from the log file you are viewing.
When you have at least one filter defined, you may select it from the Filters menu and it will automatically search for the strings you have defined in the filter and highlight/hide every successful match in the log file you are currently viewing.
Log File Viewer - Enabling a Filter
Log File Viewer - Enabling a Filter
Figure 17.4.  Log File Viewer - Enabling a Filter

When you check the Show matches only option, only the matched strings will be shown in the log file you are currently viewing.

 
 
  Published under the terms of the Creative Commons License Design by Interspire