LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   read system log online (https://www.linuxquestions.org/questions/programming-9/read-system-log-online-133144/)

Agent007 01-09-2004 01:49 PM

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 ?

fancypiper 01-09-2004 02:04 PM

Are you looking for this command?

tail -f /var/log/messages

Agent007 01-10-2004 04:30 AM

I guess that will do

jtshaw 01-10-2004 08:59 AM

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.


All times are GMT -5. The time now is 09:55 PM.