LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-09-2004, 01:49 PM   #1
Agent007
LQ Newbie
 
Registered: Oct 2003
Posts: 28

Rep: Reputation: 15
read system log online


I'm trying to write a piece of code *if possible* to read system log online. ie. events that occurs at this moment, or of course view log history.

Is there a way to do this using C system calls ?
 
Old 01-09-2004, 02:04 PM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
Are you looking for this command?

tail -f /var/log/messages
 
Old 01-10-2004, 04:30 AM   #3
Agent007
LQ Newbie
 
Registered: Oct 2003
Posts: 28

Original Poster
Rep: Reputation: 15
I guess that will do
 
Old 01-10-2004, 08:59 AM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
I think you want to look at sys/klog.h

This allows reading from the kernel logs anyway. Check it out to see if it is what you want.

BTW, man klogctl explains it.

Last edited by jtshaw; 01-10-2004 at 09:00 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
mozzla problems-can not read files online, can not read attachments sarajevo Linux - Software 1 09-20-2005 06:58 PM
Everytime I log on to FC3, I have to reset SMB and Network service to get online timswim78 Linux - Networking 4 03-06-2005 04:51 PM
Which free online magazine do you read? linuxhippy Linux - General 1 10-12-2004 06:37 AM
Ultima Online / Log-In ParaKnowYa Linux - General 3 09-24-2003 05:55 PM
Change from Read only to Read Write File System? justiceisblind Linux - Newbie 3 03-03-2002 07:23 PM


All times are GMT -5. The time now is 09:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration