LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 02-26-2013, 03:57 PM   #1
vinodkd
LQ Newbie
 
Registered: Feb 2013
Posts: 1

Rep: Reputation: Disabled
Redirecting user space console messages


Hi,

I'm working on a third party provided embedded hardware(mips). It has a preloaded linux kernel and CFE boot loader.
My program needs to collect the console/stdout messages from all the running programs and send to a server. (Somewhat similar to netconsole - but netconsole collects only kernel messages.)
Linux bootup options "console=<device>" will help us to add one more console device. But I don't have flexibility to change CFE or rebuild kernel with my own driver.
Fortunately, this linux build supports loadable modules. Can I redirect the console output to a loadable module? If so, what are the steps to do it?
(My idea is to create a tty-console like device, which loops back the messages to userspace.)

PS: Pls let me know, if the system-wide "stdout" redirection is possible by a user land process - that is my first preference.

Thanks in advance.
Vinod
 
Old 03-04-2013, 11:29 PM   #2
comet.berkeley
Member
 
Registered: Dec 2009
Location: California
Distribution: Slackware current
Posts: 152

Rep: Reputation: Disabled
If your system has the syslogd daemon running then you might look at that:

$man 8 syslogd

User programs can write to the system log files by using the logger command from a script:

$man 1 logger

or from calling the syslog function from a program:

$man 3 syslog
 
  


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
user space prints/console output stealth53 Linux - Kernel 2 04-02-2012 01:54 AM
redirecting log messages to /dev/console mlalitha Linux - Newbie 0 01-19-2009 05:09 AM
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 06:39 PM
redirecting cron messages jomy General 1 12-29-2004 02:35 AM
Redirecting console boot messages to different tty. cenkozkan Linux - Software 2 01-17-2004 04:11 AM


All times are GMT -5. The time now is 12:01 PM.

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