1820390 Members
3628 Online
109623 Solutions
New Discussion юеВ

pseudo terminal

 
SOLVED
Go to solution
Lalo_Weng
Advisor

pseudo terminal

Hi, Could anyone tell me that what's pseudo terminal? what's it for? why we need pseudo terminal in hp-ux? I want to understand its mechanism thoroughly.

Thanks in advance.
Keep finding is the way.
3 REPLIES 3
T. M. Louah
Esteemed Contributor
Solution

Re: pseudo terminal

In a Nutshell:
pseudo terminals are required by processes that need to establish a terminal session like telnet/rlogin as well as TSM and other applications.
The kernel parameter npty controls the number that can be in use at the same time, but insf installs these only based on the -n option.

Example:
To create the ptys, two methods can be used (after adjusting npty in the kernel):
cd /dev
insf -n 500 -d pty0
insf -n 500 -d pty1

Note that both commands are needed. Or, the following method can do this in two steps:
cd /dev
insf -n 500 -C pseudo
The second form includes all the pseudo drivers.
For more information check:
http://www.docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90147/B2355-90147_top.html&con=/hpux/onlinedocs/B2355-90147/00/00/17-con.html&toc=/hpux/onlinedocs/B2355-90147/00/00/17-toc.html&searchterms=pseudo%7cterminals&queryid=20011224-223532

Little learning is dangerous!
Printaporn_1
Esteemed Contributor

Re: pseudo terminal

simply think that we need device file to communicate between user and system.
if we login from dump or serial terminal we get real terminal device file but if we login from telnet /rlogin this is not real then it is pseudo device file.
that all,
enjoy any little thing in my life
Bill Hassell
Honored Contributor

Re: pseudo terminal

It helps to understand that Unix does not communicate with terminals at all. Now this may sound strange but the concept of logging in requires some method to begin communicating with the terminal (getty for serial devices and modems, pty or pseudo terminals for network connections).

A program (such as getty or telnetd) then calls the login program to validate the user (again, HP-UX is just processing device file and file system requests), and finally schedules a shell program for the user to type commands.

So in order for anyone to communicate with HP-UX, there must be some sort of connection program (called a daemon), and a method to accept terminal characters and perform HP-UX functions (typically a shell).

The pty device files serve as a funnel for inbound and outbound characters. A network connection is quite complex as there are thousands of possible message types and these must be directed to the appropriate daemon or program. So daemons such as telnetd or rlogind are scheduled by inetd and they use pty device files to keep the data streams under control.


Bill Hassell, sysadmin