Solved

Device busy??

Posted on 1997-06-24
3
1,355 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
AIX Server 10 96
UNiX Script filesystem space usage 19 83
Sed question 2 139
Image not there 4 76
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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 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…
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.
Suggested Courses

751 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