LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-02-2012, 12:42 AM   #1
rajini23
Member
 
Registered: Sep 2011
Posts: 160

Rep: Reputation: Disabled
how to find error logs


Hi,


I have doubt that how to find the error logs in
/var/log/messages....etc every thing will be written in that file...

how to i identify the errors on this please suggest me on this to sort out the error in log file in linux...

i use CentOS....
 
Old 02-02-2012, 01:39 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
Hello,

What error are you looking for? If you want to filter out error messages from a specific process or a specific type of error message, you can always use grep to only show the lines containing your keyword(s). Have a look at the man page for grep:
Code:
man grep
Kind regards,

Eric
 
Old 02-03-2012, 12:25 AM   #3
devUnix
Member
 
Registered: Oct 2010
Posts: 606

Rep: Reputation: 59
You can find several log files in "/var/log" as you know. To look for warnings/errors that you are interested in, you can simply perform a "search or scan" by using "grep" command as shown below:

Code:
root@localhost ~]# grep 'error' /var/log/messages | tail -n 2
Feb  3 11:00:49 localhost NetworkManager[1226]: <error> [1328247049.314141] [nm-manager.c:1312] user_proxy_init(): could not init user settings proxy: (3) Could not get owner of name 'org.freedesktop.NetworkManagerUserSettings': no such name
Feb  3 11:00:49 localhost NetworkManager[1226]: <error> [1328247049.526871] [nm-manager.c:1312] user_proxy_init(): could not init user settings proxy: (3) Could not get owner of name 'org.freedesktop.NetworkManagerUserSettings': no such name
[root@localhost ~]#
Code:
grep "keyWord or string" fileName
Use "grep -i" to make a case-insensitive search.

Learn more by running this command:

Code:
man grep
You may want to look for application/software/service specific log files first by looking at their corresponding directories/log files inside "/var/log/".

Run this command:

Code:
dmesg | grep -i error

Code:
[root@localhost ~]# dmesg | grep -i info
EXT4-fs (sda2): INFO: recovery required on readonly filesystem
[root@localhost ~]#

Last edited by devUnix; 02-03-2012 at 12:26 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
To find out the logs count gsiva Programming 1 07-02-2009 06:40 AM
qmail can't find my logs :) OTIM Linux - Server 2 12-05-2007 02:27 PM
Where can i find the logs for Ftp? ZAMO Linux - Server 2 07-09-2007 05:12 AM
Logs: What to check and where to find them? Swakoo Linux - General 2 01-12-2006 03:35 AM
Firefox logs user out? Where are error logs? case1984 Linux - General 0 10-09-2004 02:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration