Operating System - HP-UX
1849648 Members
6686 Online
104044 Solutions
New Discussion

Re: Problem in redirecting output to /dev/console

 
Sudhan_2
Occasional Advisor

Problem in redirecting output to /dev/console

Hi All,

In my K Class box when i redirect any output it doesn't repond. I did
# echo "Test" > /dev/console
and it simply hangs.
I have removed /dev/console and recreated it using insf still same problem persists.
Can anyone help me out ?

-ASD
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor

Re: Problem in redirecting output to /dev/console

Since you are running as root (at least I assume that your are given the '#' prompt) permissions on /dev/console don't matter. You need to indicate whether your console is a dumb terminal or do you have a graphics card installed. Even if you are running a dumb terminal, you could have enabled flow control so that the device is blocking until DTR/CTS is asserted. Do a stty -a < /dev/console and an ls -l /dev/console and post the results.
If it ain't broke, I can fix that.
Sudhan_2
Occasional Advisor

Re: Problem in redirecting output to /dev/console

Thanks for ur quick response. PSB :

No graphics card !
#stty -a < /dev/console
speed 9600 baud; line = 0;
rows = 24; columns = 80
min = 1; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^A; eol = ^@; eol2 = ^@; swtch = ^@
stop = ^S; start = ^Q; susp = ^Z; dsusp = ^Z
werase ; lnext
-parenb -parodd cs8 -cstopb hupcl cread clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon ixany -ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo -echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3

#ls -l /dev/console
crw--w--w- 1 root sys 0 0x000000 Apr 5 10:25 /dev/console

Steven E. Protter
Exalted Contributor

Re: Problem in redirecting output to /dev/console

insf -e

will re-establish the device drivers if you or someone else has clobbered them.

You do need a device as console to see the results. It can be a secure web console or an old serial web console.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sudhan_2
Occasional Advisor

Re: Problem in redirecting output to /dev/console

Steven, As said already i have removed and recreated the device file using insf.
Stephen Keane
Honored Contributor

Re: Problem in redirecting output to /dev/console

Are you typing on the console itself, or typing somewhere else and redirecting output to the console?

Can you type on the console keyboard?

Have you tried CTRL-Q on the console keyboard?

Sudhan_2
Occasional Advisor

Re: Problem in redirecting output to /dev/console

Stephen, I am redirecting the output from my telnet session only. If you guess the problem(Ctrl+Q) is with physical console then i will plan for Datacentre visit. Please confirm.
Stephen Keane
Honored Contributor

Re: Problem in redirecting output to /dev/console

I have seen it in the past, one of the operators types CTRL-S on the console (perhaps by mistake, wanting to type capital S) and then the console appears to 'hang'. I'm not saying it's definitely the problem here, but it is a possibility, although I would have thought that recreating the console device would have cleared it. Is there no one at the datacentre that could just walk over and type CTRL-Q ?
Sudhan_2
Occasional Advisor

Re: Problem in redirecting output to /dev/console

Stephen's guess was right. Cleared the physical console and everything looks okay now. Thanks Stephen.
Biswajit Tripathy
Honored Contributor

Re: Problem in redirecting output to /dev/console

Wow Stephen,
though years of experience taught me to try CRTL-Q
on virtually anything that appears to hang, I never
thought that this is the case here. Full marks to
you for guessing this :-)

- Biswajit
:-)
Sudhan_2
Occasional Advisor

Re: Problem in redirecting output to /dev/console

Solved.