Redirecting user space console messages
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.