Hang when run command with /dev/console


 
Thread Tools Search this Thread
Operating Systems Solaris Hang when run command with /dev/console
# 1  
Old 12-31-2012
Hang when run command with /dev/console

hi guys,

I don't know why I run this command:

echo a>/dev/console

It is not responsed from console and hang. If I run echo a>/dev/null, it is OK.
here it is the console file:
Code:
mcl1101 root#ls -ltr /dev/console
lrwxrwxrwx   1 root     other         30 Aug 18  2009 /dev/console -> ../devices/pseudo/cn@0:console
mcl1101 root#ls -ltr /devices/pseudo/cn@0:console
crw--w----   1 root     tty        0,  0 Dec 30 22:52 /devices/pseudo/cn@0:console

Can anyone help me?

thanks you a lot.
Br.

Moderator's Comments:
Mod Comment edit by bakunin: which part of the many "please use CODE-tags"-hints where so hard to understand that you chose to ignore them all?

Last edited by bakunin; 12-31-2012 at 04:07 AM..
# 2  
Old 12-31-2012
Did you mean to use /dev/tty? /dev/console is owned by another process, owned by root. What are you trying to do? Write a message on the console? if so, try the write command. It allows you to specify both a user and a specific device as the destination for a message.

Last edited by jim mcnamara; 12-31-2012 at 07:10 AM..
# 3  
Old 01-01-2013
@ Jim mcnamara:

I think I meet the problem with console. in other devices such as: tty, tty0, It run OK.
Can i restart the /dev/console? or link the /dev/tty to the /dev/console?

thanks you a lot and happy new year. Smilie
br.
# 4  
Old 01-01-2013
You probably don't have access to write to /dev/console and generally have no reason to do so. What are you actually trying to do, and why?
# 5  
Old 01-01-2013
hi Corona688

Because in crontab file, it have a command:
Code:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/xpg4/bin/date >/dev/console 2>&1


I found that the /dev/console don't work. so that cron daemon is hang.

thanks you,
Br.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script for telnet and run one command kill it and run another command using while loop

( sleep 3 echo ${LOGIN} sleep 2 echo ${PSWD} sleep 2 while read line do echo "$line" PID=$? sleep 2 kill -9 $PID done < temp sleep 5 echo "exit" ) | telnet ${HOST} while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies

2. Emergency UNIX and Linux Support

Capturing console (/dev/ttyS1) logs

Hi, I have been trying to capture console logs from the init script. When the ramfs is mounted, i check if usb is connected , if conncted, i mount it and redirected the console logs like so: cat & /dev/ttyS1 >> /mnt/logs.txt I'm getting /bin/sh : /dev/ttyS1 :permission denied ... (8 Replies)
Discussion started by: xerox
8 Replies

3. Solaris

Server Hang @ init command

Guys, I am having difficulties in bringing my server to OBP. The server hung infinitely after issuing init 0 command. I have already stopped all the applications running but to no avail. :confused: Has anyone encountered this problem before? Appreciate if you could shed some lights. ... (4 Replies)
Discussion started by: honmin
4 Replies

4. UNIX for Advanced & Expert Users

console /dev/console get image

We are using software (Pegasys) which runs on SunOS 5.8 and reads images from a Philips nuclear camera. The software is designed to run from the console. I need to be able to capture the images it produces on the display. The caveat is that I cannot use the X Windows display because the X Server... (3 Replies)
Discussion started by: sreyes27
3 Replies

5. BSD

Logging to /dev/console

Hi, The output of the cat ttys on a free BSD m/c console none unknown off secure # # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. ttyd0 "/usr/libexec/getty std.9600" unknown on secure ttyd1 "/usr/libexec/getty std.9600" dialup off ttyd2... (0 Replies)
Discussion started by: mlalitha
0 Replies

6. Solaris

script hangs when outputing to /dev/console

I am running solaris 8 on a sparcs box. The system is connected to a lightwave console server. I have a script that hangs when sending output to '/dev/console'. Any ideas? -V (2 Replies)
Discussion started by: vada010
2 Replies

7. UNIX for Advanced & Expert Users

make a foreground running process to run background without hang up

I've tried this a long time ago and was successful but could not remember how i did it. Tried ctrl+Z and then used bg % could not figure what i did after to keep it no hangup - not sure if used nohup -p pid, can u plz help me out if this can be done. Any help will be appreciated. (12 Replies)
Discussion started by: pharos467
12 Replies

8. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

9. UNIX for Dummies Questions & Answers

console message from Crontab run

I run my nightly backup thru a crontab job. Is there any way to get the message to mount a new tape to the console? Currently it appears to go to an email. (1 Reply)
Discussion started by: aixhelp
1 Replies

10. UNIX for Dummies Questions & Answers

/dev/console file

Hello, I am fairly new to UNIX. I ran command tty on my shell prompt and it return me /dev/console. I was reading in the book that normally output of tty command is tty01 , tty02 or so on. My question is this is the file for my monitor? UNIX called it Terminal or Workstation? What is this... (4 Replies)
Discussion started by: malikabid
4 Replies
Login or Register to Ask a Question