ITEM: AH1769L

How-to redirect system console msgs to a file and console



Question:

How-to redirect system console msgs to a file and console

Response:


   Env:

   Desc:
        How to send console messages to a file?
   Action:
ENV: AIX 3.2.5
      Customer said he wants to redirect console output to a file during
boot of the system - but also wants data to continue to be displayed on
the screen.

1. If he just wants to redirect console output to a file during boot of the
system - run - swcons /tmp/filename - near the beginning of /etc/rc.
2. However if he also wants the data to come to the screen as well as a file
he needs to add the following near the beginning of /etc/rc:

cd /some_directory
mkfifo -m 777 fifofile
swcons fifofile
nohup cat fifofile | tee /some_directory/consfile >/dev/console &

When he wants to return to normal  - need to run "swcons" to direct output
back to console and then kill background process started above.

For the specific case at GTE you need to make sure the terminal emulation
used for the console does not block because the file will be blocked as well.
-------------------------------------------------------------------

Another option is to send the console output to a file eg:
 swcons \
Then use tail  on the file periodically.

I sent the text shown above under ACT: to the customer in a fax. 

   Next Action:
        Close pending callback. 
   Test Case:
        na


Support Line: How-to redirect system console msgs to a file and console ITEM: AH1769L
Dated: April 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:27
Comments or suggestions? Contact us