On Wed, 12 Jan 2005 Jim Bauer wrote :
>On Wednesday 12 January 2005 09:34, sounak chakraborty wrote:
> > i am writing a program which willcopy all the lines from system log
> > file /var/log/messages and put it in a user log file i am using
> > syslog with syscall3 but when i am using write system cal it is not
> > able to write anything do i have to add something more
> > i have added the syscall3 macro for write too
> > do i have to do it for open system call also
> > i am little bit confuse with the kernel-user mode switching concept
> > too could you please help me out
>
>This didn't make any sense the first time you posted it. It still
>doesn't. Perhaps some sample code/commands would enlighten us.
>(Punctuation wouldn't hurt either.)
>
>Just reading what is probably the first sentence would make one think
>all you want is "cp /var/log/messages myfile". Or perhaps you want
>syslogd to write everything it puts in /var/log/messages into another
>file as well. If so see syslog.conf. Trying to figure out what this
>has to do with syscall3 or with a kernel is making my brain hurt.
>
>
exactly i want to scan through the log file and extract my useful messages to myfile and this program will work as a deamon