Hi
how can i read logs dynamically in C. like if i do tail -f output goes to
stdout.i want same kind of mechenism to read log files in C.
bye
---
Manish Kumar Arya
See Dave Matthews Band live or win a signed guitar
http://r.lycos.com/r/bmgfly_mail_dmb/http://win.ipromotions.com/lycos_0202
(First post)
Hi,
Doing an strace on tail -f reveals that it does an fstat every
1 second (fstat, nanosleep 1, fstat nanosleep 1...) for the file size and
reads and writes to stdout whenever the value of st_size returned changes.
A better way of doing this IMHO would be for the logging
i have solved the first problem...The RAM in the
machine was bad..and linux was not able to set up a ramdrive
the other problem still remains...it seems REDHAT
7.2 has removed the drivers for Creative Infra CD driveMY CD is detected but
the drivers are not therehow do i get my CD r
IMHO, linux only has the ide-cd driver module(this particular one is an IDE
not SCSI one, right?). I have had a creative infra cd drive before, and I
don't remember requiring special drivers/module for it.
look for ide-cd.o file(redhat normally compiles it as a module) somewhere in
/lib/modules/`
Manish,
If you want to read log files generated by syslogd on the fly, what you can do is that
ask syslogd to log the messages for facility.priority that you are interested in to a
named pipe or [as Sapansuggested] to a psuedo master device.
You can get info about how to do this from man syslo
Sapan,
Welcome to the list! And here begins the nitpicking...
tail does what it does as it cannot assume anything about the source of the generated
file - can be logging process or some app or even a special device file.
Regarding the logging process writing to psuedo master, as per my other p
// Welcome to the list! And here begins the nitpicking...
*groan* :)
// tail does what it does as it cannot assume anything about the source of the
generated file - can be logging process or some app or even a special device file.
Yes, the suggestion for hooking up with a pty was assuming that