0

I am running a USB Kernel module and it prints messages via printk(). I am using syslog-ng(3.4.5) ,based on the method shown in this link ---> http://www.stackoverflow.com/questions/12500273/is-is-possible-to-pipe-kernel-messages-from-a-specific-process-to-a-file iam filtering out messages based on tags and sending them to an emlog 0.52 based characther device file (/tmp/hello). At the same time i did a simple read (isssued cat /tmp/hello) on the device file. Problem is i am unable to get any messages into /tmp/hello , Is it possible to redirect messages from syslog-ng to a characther device file?? or Is there any easy way to accomplish this?

I was able to get messages by using command line "klogd" ,but i cannot filter out taged messages.

marty
  • 1
  • 1
  • Can you pipe klogd through grep? It's unclear what role you want to have the character device file play - do you just want to write them to a text file? That's not a "device file" (ie device node created with mknod) which is a type of kernel interface, but simply a plain regular file. – Chris Stratton Dec 12 '13 at 16:03
  • I haven't implemented klogd through grep!can you tell me what command should i issue to use klogd through grep?? sorry! yes! its a device node, emlog creates a separate circular buffer ,we have to create a device node with mknod with same major number as of emlogs in /dev and a minor number for buffer size. @http://www.circlemud.org/jelson/software/emlog/ I was able to send klogd messages to this node! All i need is to filter those messages based on printk Tags(shown in my above comment) and send them to emlog's separate device node! Thanks for replying! – marty Dec 23 '13 at 14:35

0 Answers0