SUMMARY2: Re: Q. Relation btwn pts, pty and tty?

From: Stephanie Lam (MIS) (slam@ros.com)
Date: Mon Aug 09 1999 - 14:10:28 CDT


Hi,

Additional information from Ken.

- Steph

-----Original Message-----
From: Robson, Ken [mailto:robsonk@ebrd.com]
Sent: Monday, August 09, 1999 11:49 AM
To: 'Stephanie Lam (MIS)'
Subject: RE: SUMMARY: Re: Q. Relation btwn pts, pty and tty?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stephanie,

The relationships is as follows:-

* many moons ago there used to be a /dev/tty[xx] driver for every
serial port, which invariably had terminals connected to them. This
device entry was a direct link into the driver itself and any
functionality had to be contained within that driver.

* some moons later streams were introduced to UNIX. The point to
streams was code re-use and to simplify device driver implementation.
Streams have a header which is a generic API for the O/S at large
(freeing apps from any funny bits in the device driver), and a footer
(which interfaces with the low grungy device driver), now there is a
defined API between all streams modules that is uniform, so we then
have the following:-

                #######################
            # header #
            #######################
                
                Uniform API

                #######################
            # footer #
            #######################

Now because we have the uniform header and footer we can pop and push
modules in any order we like and we can construct a stream of our
choice. Hope this makes sense so far! Now this helps the re-use of
code because we have a number of standard modules that we know are
there and we can pop and push these into streams for various devices
(please see man pages for ldterm for example).

So now what do /dev/pty* and /dev/pts/* do, well /dev/pty are the
stream heads for any serial ports you might have in the system and
/dev/pts/* are the stream heads for any networked connections that you
might have that need to present a terminal type interface to the O/S
at large and again are really just stream heads.

Hope this all makes sense.

Regards,

Ken.

PS - This is a slight oversimplification, but should be enough to get
your head round!

PPS - Other useful manual pages:- strconf, pty, pts
 
> -----Original Message-----
> From: Stephanie Lam (MIS) [mailto:slam@ros.com]
> Sent: 09 August 1999 18:27
> To: sun-managers@sunmanagers.ececs.uc.edu
> Subject: SUMMARY: Re: Q. Relation btwn pts, pty and tty?
>
>
> Hi,
>
> Thanks for the replies from Casper, Sean, Robert and
> Nickolai. Appreciate
> them.
>
> Found other info from various docs:
>
> To find out how many ptys are being used:
>
> root@abba >crash
> dumpfile = /dev/mem, namelist = /dev/ksyms, outfile = stdout
> > pty
> ptms_tty TABLE SIZE = 48
> SLOT MWQPTR SWQPTR PT_BUFP TTYPID STATE
> 0 605d7dd8 60536a70 604e9248 103 mopen sopen
> 1 60630b78 60630988 604e8e88 465 mopen sopen
> 2 60655a08 60655818 604e88e8 103 mopen sopen
> 3 60654898 606546a8 6067c348 103 mopen sopen
>
> To find out what processes are using the pts:
> fuser /dev/pts/*
>
> To extend the number of ptys allowed:
> increase "pt_cnt" in /etc/system and "boot -r".
>
> I think pty and pts are the same (based on the replies). Tty
> is the terminal
> connection...
>
> I am still a little uncertain about the relationships among
> them - how they
> relate to each other but I will keep on looking.
>
> Thanks for your time!
>
> - Stephanie
>
> >Hi,
> >
> >What is the relation among pts, pty and tty? How many
> pts,pty,tty does a
> >user take up when he/she telnets/logins into a system?
>
>
> He will use one /dev/pts/* entry for each telnet, one for
> each login and
> one for each xterm/dtterm window.
>
> To get more ptys, increase "pt_cnt" in /etc/system and "boot -r".
>
> (You cannot change them on the fly an dyou do not have to
> change anything
> but pt_cnt)
>
> Casper
> %--
> First, telnet requires 1 pts per telnet. rlogin requires 2 pts' per
> session.
>
> pts=pseudo terminal (alt login/window device). Solaris gives 48 by
> default. When they're all in use, no more logins or windows
allowed.
> pty=same BSD-style
> tty=terminal type (aka teletype), also, a command that
> returns the terminal
> name (eg: /dev/pts/4).
>
> Hope this helps.
>
> Sean Quaint, CSA, CSNA
> %--
> A tty is a physical serial connection.
> On the back of your machine, you'll see
> two 25 pin rs232 connections labelled
> ttya and ttyb. You can add physical tty's
> with specilized hardware.
>
> pttys are "psuedo" tty's, created by telnet
> sessions. there is a limit to the number
> of pttys' that a system will support. That
> limit is controlled out of /etc/system.
>
> Metcalf, Robert
> %--
> I _think_ in most configurations users just use one pts.
>
> Nikolai
>
> (EBRD IT Security Notice ---- This message has been virus scanned)
>
>
>

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.0.2i

iQA/AwUBN68ijI3++wZnbTGUEQIAWwCePgODA4gT6CdcY6oBi4+C9NBC04kAnjH2
9zRcah4da52ku7aRenCR/aDb
=8vd8
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:24 CDT