?
Solved

How to check sys log/events log in linux

Posted on 2006-11-01
10
Medium Priority
?
2,947 Views
Last Modified: 2012-08-13
Does any body know how to check/view logs in Linux (Redhat FC)? Do you have login as root to view the logs?

Thanks, Leo
0
Comment
Question by:msaalim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
10 Comments
 
LVL 14

Accepted Solution

by:
pablouruguay earned 336 total points
ID: 17849198
not. you can view the logs with any user.

the logs are in

/var/log
0
 
LVL 26

Expert Comment

by:jar3817
ID: 17851426
you SHOULD have to be root to look at the system logs. Looking in my /var/logs directory shows me mostly 600 modded files. The file you probably want is /var/log/messages
0
 
LVL 6

Assisted Solution

by:_iskywalker_
_iskywalker_ earned 332 total points
ID: 17862521
you can see as user although also dmesg, these are the kernel messages (The really system). in /var/log/messages are also
messages from daemons, like sshd and login daemon, and in /var/log/Xorg.0.log are the X (gui) messages.
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Author Comment

by:msaalim
ID: 17965588
I found the logs in /var/log folder. Some files have extensions, other don't. Here are some of the files I see in this folder. We have firewall and IDP, the logs are directed to this system. On firewall and IDP, only IP is configured as syslog server. How do I know which ones are from firewall and which one from IDP. Also how to view them. Some files below seems to be huge. Is .gz zip file extension? Is vi editor only way to view them or any other options? I am new to linux. Your help will be appreciated.

extlog   3005821604
extlog.1.gz   271880489
exlog.2.gz    238664375
messages   3005836775
messages.1.gz   271895532
messages.2.gz   238682314

Thanks, Leo
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 17965937
extlog is the recent log for the firewall and messages is the recent log for your machine.
the .1.gz and .2.gz are the result of logrotate script that package any log every week.

vi is an option to see it, you can use too emacs or if you have X installed you can use another texteditor like gedit or kedit
0
 
LVL 26

Assisted Solution

by:jar3817
jar3817 earned 332 total points
ID: 17966025
the .gz extension means the file is compressed using gzip. Uncompress the file doing:

gunzip filename.gz

That will reinflate the file and strip the .gz extension. After that you can use vi to look at the file. You can also leave it compressed and use zcat to look at it:

zcat messages.1.gz |more

That would show the contents of the file page by page (hit space to advace to the next page)
0
 

Author Comment

by:msaalim
ID: 18109788
My uncompressed file is about 3.4 gig, and opening it in vi editor would take a lot of processing. I tried to move the file to windows, but when I unzipped it with winzip, and tried to open it in notepad and word, it would just show a one line garbage. Do you know how can I open it in readable form.

Thanks,
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 18133430
with the split command you can create a files more redeables than 3 gb. for example 300 Mb
http://webtools.live2support.com/linux/split.php

0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question