![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to redirect the output to multiple files without putting on console | prashant43 | Shell Programming and Scripting | 2 | 08-26-2009 09:53 AM |
| console redirect on dl365 | pupp | SUN Solaris | 0 | 12-16-2008 01:05 AM |
| console redirect of progress bar | unclecameron | Shell Programming and Scripting | 1 | 11-26-2008 03:45 AM |
| redirect output of dos2unix command | nrbhole | Shell Programming and Scripting | 4 | 01-25-2008 09:30 AM |
| redirect command output to variable | hugow | UNIX for Dummies Questions & Answers | 1 | 06-22-2005 06:43 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Command to redirect console to my tty?
Is there a utility built into Solaris that will allow me to see console messages from a tty?
I've done a search and see that this is possible through software like ILOM, but I'm looking for a method to do this with built in utilities. For example, on AIX, I can use swcons `tty` |
|
||||
|
Quote:
I am managing an application that writes certain messages to console. I don't see them in /var/adm/messages. I think in the simplest form, I am trying to figure out how to access messages written to console, like: Code:
echo "Hello World" > /dev/console |
|
||||
|
Your application should use the logger facility instead of directly accessing the console. Anyway, if your application has the /dev/console steadily open, you can figure out what file descriptor it is using using pfiles:
Code:
pfiles $(pgrep application-name) Code:
22: S_IFCHR mode:0620 dev:323,0 ino:4 uid:10001 gid:7 rdev:0,0
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE
/devices/pseudo/cn@0:console
Code:
truss -f -w 22 -t !all -p pid If that doesn't work, say because /dev/console is open and close immediately, an alternate and interesting way would be using dtrace. |
|
||||
|
not sure but may be this is OK for you...
run tty to check pts number something like this root@solaris# tty /dev/pts/5 root@solrais# after you now tty number you can redirect messages like this way echo"some message here" > /dev/pts/5 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|