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`

Not exactly the same but this is close:

tail -f /var/adm/messages

If your tty is a real one, you might also try:

consadm -a $(tty)

use the dmesg command

This shows the last lines of the message file but doesn't kind of redirect its output as the OP asked for.

Unfortunately my tty is not a real device. I am logged in remotely using SSH.

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:

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:

pfiles $(pgrep application-name)

The console file descriptor (here 22) should appear this way:

  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

then use truss to display what is written there like this:

truss -f -w 22 -t !all -p pid

with pid being your application process id.

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