172 lines
6.1 KiB
HTML
172 lines
6.1 KiB
HTML
<!--startcut ======================================================= -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<html><head>
|
|
<META NAME="generator" CONTENT="lgazmail v1.1preC">
|
|
<TITLE>The Answer Guy 33:
|
|
Psuedo tty Becomes Unusable</TITLE>
|
|
<!-- ORIGINAL SUBJECT:
|
|
tty help
|
|
JTD SUBTITLE:
|
|
|
|
-->
|
|
</head>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#A000A0"
|
|
ALINK="#FF0000">
|
|
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"
|
|
</H4>
|
|
<P> <hr> <P>
|
|
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
|
|
<H1 align="center"><A NAME="answer">
|
|
<img src="../../gx/dennis/qbubble.gif" alt="" border="0" align="middle">
|
|
<a href="../index.html">The Answer Guy</a>
|
|
<img src="../../gx/dennis/bbubble.gif" alt="" border="0" align="middle">
|
|
</A></H1>
|
|
<BR>
|
|
<H4 align="center">By James T. Dennis,
|
|
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a>
|
|
<BR>Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
|
</H4>
|
|
<p><hr><p>
|
|
<!--endcut ========================================================= -->
|
|
<H3><img src="../../gx/dennis/qbub.gif" alt="(?)"
|
|
width="50" height="28" align="left" border="0"
|
|
>Psuedo tty Becomes Unusable</H3>
|
|
<p><strong>From Scott R. Every on 21 Sep 1998</strong></p>
|
|
<!-- begin body -->
|
|
|
|
|
|
<p><strong>
|
|
i have a system which has been running for a while(actually a
|
|
number of systems) after a bit the ttyp0 port is no longer
|
|
available when telnetting in. it doesn't list anywhere as being
|
|
used, but it doesn't work!
|
|
</strong></p>
|
|
|
|
|
|
<p><strong>
|
|
can you offer any suggestions?
|
|
</strong></p>
|
|
|
|
<p><strong>
|
|
thanx
|
|
<br>s
|
|
</strong></p>
|
|
|
|
<blockquote><img src="../../gx/dennis/qbub.gif" alt="(?)"
|
|
width="50" height="28" align="left" border="0"
|
|
>Try the '<tt>lsof</tt>' command. That should find out which
|
|
process is using it.
|
|
</blockquote>
|
|
|
|
|
|
<blockquote>
|
|
The <tt>/dev/ttyp*</tt> devices are for "psuedo" tty's --- these
|
|
are used by rlogind, telnetd, xterms, screen and many
|
|
other programs. There are usually <EM>many</EM> of these
|
|
psuedo tty's on a system.
|
|
</blockquote>
|
|
|
|
|
|
<blockquote>
|
|
Normally a daemon that uses a psuedo tty searches through
|
|
the list and uses the first one that it can open. There
|
|
is another approach used by some other forms of Unix --- and
|
|
supported in recent kernel whereby the daemon makes a request
|
|
of a sort of "dispatcher" device which then provide it with
|
|
the number of the next available pty/ttyp device. This is
|
|
referred to as "Unix '98 PTYs Support" in the linux kernel
|
|
-- and I've heard it referred to as "ptmx" (psudo-tty
|
|
multiplexing, or something like that). In the case of the
|
|
Linux implementation the pty's can be dynamically generated
|
|
under the "pts" virtual filesystem (which is a bit like
|
|
the <tt>/proc</tt> filesystem in that it doesn't exist on a "disk"
|
|
anywhere --- it simply provides a filesystem abstraction of
|
|
the system's in memory data structures). Linux 2.2 will
|
|
also probably support a "/devfs" --- another virtual
|
|
filesystem which makes all of the entries under /dev into
|
|
dynamic entries.
|
|
</blockquote>
|
|
|
|
|
|
<blockquote>
|
|
Of course, none of that applies to your situation. That's
|
|
just the "vaporware report" on the future of the Linux
|
|
kernel.
|
|
</blockquote>
|
|
|
|
|
|
<blockquote>
|
|
If there really is no process that still owns the ttyp0
|
|
in your case then it might be a bug in your kernel.
|
|
I'd check the permissions of the device node to see if
|
|
they are changing (or to see if there is something that's
|
|
just blowing the device node away), then I'd look through
|
|
the "Change Logs" for the recent 2.0.3x kernels. It might
|
|
be that you are bumping into one of the bugs that Alan
|
|
Cox and crew have been fixing. If you aren't running a
|
|
2.0.35 or 2.0.36 kernel --- consider trying it to see
|
|
if that solves the problem.
|
|
</blockquote>
|
|
|
|
|
|
<blockquote>
|
|
To be honest I haven't seen a good description of the
|
|
whole pty*/ttyp* mess or a decent explanation of what
|
|
problems the Unix '98 ptmx design is supposed to solve.
|
|
I've heard that pty's and ttyp's are paired off in
|
|
"master/slave" pairs that have something to do with
|
|
providing different device nodes for control (ioctl()?)
|
|
and communications over the channel. If any of our
|
|
readership knows of a good treatise on the topic, please
|
|
pass me a pointer or mail me a copy.
|
|
</blockquote>
|
|
|
|
|
|
<!-- end body -->
|
|
<!--startcut ======================================================= -->
|
|
<P> <hr> <P>
|
|
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
|
|
>Copyright ©</a> 1998, James T. Dennis <BR>
|
|
Published in <I>Linux Gazette</I> Issue 33 October 1998</H5>
|
|
<P> <hr> <P>
|
|
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<table width="98%"><tr valign="center" align="center">
|
|
<td rowspan="3"><A HREF="../lg_answer33.html"><IMG
|
|
SRC="../../gx/dennis/answernew.gif"
|
|
ALT="[ Answer Guy Index ]"></A></td>
|
|
<td><A HREF="floppy.html">floppy</a>
|
|
<td><A HREF="autocad.html">autocad</a>
|
|
<td><A HREF="scsi.html">scsi</a>
|
|
<td><A HREF="samba_pdc.html">samba_pdc</a>
|
|
<td><A HREF="virthost.html">virthost</a>
|
|
</tr><tr valign="center" align="center">
|
|
<td><A HREF="emacs_cc.html">emacs_cc</a>
|
|
<td><A HREF="ipmasq.html">ipmasq</a>
|
|
<td><A HREF="tty.html">tty</a>
|
|
<td><A HREF="shuffle.html">shuffle</a>
|
|
<td><A HREF="connect.html">connect</a>
|
|
</tr><tr valign="center" align="center">
|
|
<td><A HREF="hostavail.html">hostavail</a>
|
|
<td><A HREF="desqview.html">desqview</a>
|
|
<td><A HREF="catch22.html">catch22</a>
|
|
<td><A HREF="thanks2.html">thanks2</a>
|
|
<td><A HREF="typo.html">typo</a>
|
|
</tr></table>
|
|
<P> <hr> <P>
|
|
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<A HREF="../index.html"><IMG SRC="../../gx/indexnew.gif"
|
|
ALT="[ Table Of Contents ]"></A>
|
|
<A HREF="../../index.html"><IMG SRC="../../gx/homenew.gif"
|
|
ALT="[ Front Page ]"></A>
|
|
<A HREF="../lg_bytes33.html"><IMG SRC="../../gx/back2.gif"
|
|
ALT="[ Previous Section ]"></A>
|
|
<A HREF="../vrenios.html"><IMG SRC="../../gx/fwd.gif"
|
|
ALT="[ Next Section ]"></A>
|
|
<!--::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
</body>
|
|
</html>
|
|
<!--endcut ========================================================= -->
|
|
|
|
|