Solved

Device busy??

Posted on 1997-06-24
3
1,325 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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 how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

758 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

21 Experts available now in Live!

Get 1:1 Help Now