Operating System - HP-UX
1834142 Members
2271 Online
110064 Solutions
New Discussion

Re: How to capture the output on system console?

 
Zhang Zhao gui
Frequent Advisor

How to capture the output on system console?

Anybody can tell me is there anyway to capture the output on the system
console?
Advises are appreciated.
By the way, how come I am getting the following messages on the system
console. But I haven't see any
similar messages from syslog.log.

*TQ* CRITICAL: <65.31> isdux2 High Disk Service Time c2t12d0
Disk Service Time is high.
&TQ* CRITICAL: <6.09> isdux2 Long Run Queue
The CPU is busy.
Some processes may need to be terminated.
Additional CPUs may be needed.
*TQ* NORMAL: <1.38> isdux2 CPU Waiting on IO
6 REPLIES 6
Chris Lonergan_1
New Member

Re: How to capture the output on system console?

Recently displayed messages can be read by using the `dmesg` command. These
can be trapped into a file using "/usr/sbin/dmesg - >> /var/adm/messages"
which can be run by cron typically every 10 minutes.
Randy Mather
Frequent Advisor

Re: How to capture the output on system console?

What model system, number of cpus, amount of memory ?
Melvyn Burnard_1
Regular Advisor

Re: How to capture the output on system console?

Assuming the console is something along the lines of a 700/92 character based
terminal, you could hook up a printer to the second serial port, and then using
hte soft keys, turn on logging to set LOG BOTTOM to be on.
This would log every line to the printer as it scrolls through on te console.
Zhang Zhao gui
Frequent Advisor

Re: How to capture the output on system console?

I am using HP-UX 10.20 on HP9000/K260 with 3 CPUs and
1GB memory. I prefer the message on the console to be
captured into a console.log file so that I can view it
from time to time. As far as I know, dmesg is not able
to show you what is displayed on the system console.
How can I redirect the output of console to a file and
better still, if I can also see messages on console.
Is there any way to do that?
David Bacon_4
New Member

Re: How to capture the output on system console?

Hi,

You might want to see if you can find swcons (ie: switch console) and redirect
your console output with that tool. I use this on AIX machines, there is
probably a gnu version available.

You might also want to see if your syslog.conf file can catch things too.

good luck
david
Zhang Zhao gui
Frequent Advisor

Re: How to capture the output on system console?

Sorry to reply you so late. Because I just returned from a long leave.

Where can I find swcon(switch console) ?
I checked syslog.conf and it shows as below,

# See syslogd(1M) for information about the format of this file.
#
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *

How do I modify this file? Can I redirect the output of *.alert to another
file say "/tmp/sysconsole.log" besides /dev/console just like what 'tee' can
do? If that can be done, then I can just dial in from home to check this file
and it should be the same as what is
shown on the system console.