LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 08-09-2010, 04:12 PM   #1
SJDad
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Rep: Reputation: 0
Is it possible to redirect all outputs from /dev/console to /dev/pts/0?


Newbie here.

The serial console is for debugging and will physically disappear when product is mature. However, there are many background processes that may print out statuses/results. These go to /dev/console or serial console.

Telnet will be the only way to get a console. I tried netconsole (with netcat) and it works, but it is only for kernel printk messages. I tried "program > /dev/pts/0" and it works also. However, it would be better if I can just change/add the console /dev/pts/0 to the existing /dev/console.

Is it possible? Thanks.
 
Old 08-09-2010, 04:48 PM   #2
ZaSter
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Rep: Reputation: 0
Why not use log files?

SJDad,

Why not redirect the program outputs to log files that have the advantage of being viewable from any terminal login?

If you are logging in using Bash, then the programs could be started up like so:

program >& /var/log/program.log

The >& captures both standard output (STDOUT) and standard error output (STDERR).
 
Old 08-09-2010, 04:54 PM   #3
SJDad
LQ Newbie
 
Registered: Aug 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Using logfile works great if the system does not crash. If the system crashes, we would like to get as much information as possible by logging user-space messages remotely as well.
 
Old 08-09-2010, 05:59 PM   #4
ZaSter
LQ Newbie
 
Registered: Apr 2006
Posts: 9

Rep: Reputation: 0
Sounds like you should use syslogd. See the documentation via the command: man syslogd.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp rtspitz Linux - Software 2 12-02-2011 02:07 PM
How can I have /dev/ttyp1 instead of /dev/pts/0 sablonpi Linux - General 3 02-03-2010 01:09 AM
/dev/tty vs /dev/pts anshexp Linux - Kernel 1 09-21-2009 09:13 AM
Kernel config options (/dev, /dev/pts) jrdioko Slackware 5 08-22-2005 01:25 AM
What is /dev/pts, /dev/shm? mrpc_cambodia Red Hat 1 10-18-2004 03:27 AM


All times are GMT -5. The time now is 12:43 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