Solved

Device busy??

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix, date minus 1, 2 or 3 days (last working day) 11 87
Shell script errors 10 143
Ubuntu install gnome-session-fallback is failing 4 118
reinstall 1 92
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 …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

735 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