Solved

Device busy??

Posted on 1997-06-24
3
1,334 Views
Last Modified: 2009-07-29
Scenario
========
I issued the command :
chdev -l 'tty0' -a parity='odd' and received the following :
Method error (/etc/methods/chgtty):
          0514-062 Cannot perform the requested function because the specified device is busy

Question
========
1) I have checked through 'ps -ef | grep tty0' and there was no such process.  Is this the correct command to issue to find out whether the device is used?

2) How do I make the device not busy as I think my program causes the device to be busy?  I've killed my program but the device is still busy!

3) Is there a command that I can use to test whether tty is working?

NB. My program was working perfectly on another machine's tty!!
0
Comment
Question by:Rita060297
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
jos010697 earned 30 total points
ID: 2006453
A device can be in one of three different 'states':

   defined
   stopped
   available

If a device is 'available' (read: busy), some changes can not
be made to the device. You can however use the chdev
command with the '-P' flag. The changes will not be made
immediately then; just the configured device database
will be updated. If you restart the device (normally by
simply rebooting the machine), the device will be changed
accordingly.

You didn't mention your flavor of Un*x your using; check your
manuals for the 'lsdev' command (usually found in /usr/sbin).
It lists all devices and their states ...

kind regards,

Jos aka jos@and.nl
0
 

Author Comment

by:Rita060297
ID: 2006454
I've changed the properties of the device port but have problem
opening the port through a C program as the device is busy.
How do I make the device not busy?

FYI, I'm using Korn shell in AIX 4.1
0
 
LVL 4

Expert Comment

by:jos010697
ID: 2006455
Have you checked /dev/ty0's permissions? Do a ls -l /dev/tyt0
and see what permissions are set; I bet it displays something
like:

crw-------   1 root     system    17,  0 Jun 09 07:51 /dev/tty0

in which case you have to have root privileges to access
the console tty ...

kind regards,

Jos aka jos@and.nl
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
create user in TSM 7 590
g++ pthread_init failure on AIX 10 71
NTP Server in VMware 5 165
Using gawk to read and manipulate multiple texts from a file 1 54
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now