Solved

Device busy??

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

770 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