/dev/pts/n

/dev/pts/n

am 06.01.2006 17:27:29 von Dermot Paikkos

Hi,

I have been trying to working out how to create additional pseudo-
terminal devices in pts. Currently there are 9 device file in
/dev/pts numbered between 1 - 12.

I need to ensure that I can have about 40 users attach to the system
using xterminals. I have tried MAKEDEV but nothing happens. The man
pages for pts doesn't say how to make any new devices, only that a
pty are opened when a process opens /dev/ptmx.


Does anyone know who I can create new character files in /dev/pts?

TIA.
Dp.

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: /dev/pts/n

am 06.01.2006 18:22:07 von Carl Lawton

At 16:27 06/01/2006, Dermot Paikkos wrote:
>Hi,
>
>I have been trying to working out how to create additional pseudo-
>terminal devices in pts. Currently there are 9 device file in
>/dev/pts numbered between 1 - 12.
>
>I need to ensure that I can have about 40 users attach to the system
>using xterminals. I have tried MAKEDEV but nothing happens. The man
>pages for pts doesn't say how to make any new devices, only that a
>pty are opened when a process opens /dev/ptmx.
>
>
>Does anyone know who I can create new character files in /dev/pts?

I'm not authorative on this subject but here goes.

They will be created automatically for you. Hence why you have
missing numbers in your current sequence.
As someone logs out the pts is destroyed.

The limit is a kernel parameter. Most distros i have seen had the
limit set to 256.

Older kernels require a change to the kernel config and recompile,
newer kernels should be controllable
with sysctl.

Try "sysctl -a | grep pty" and see what you get. Not sure if this is
correct but might be.

Try googling for "pseudo tty" and look at the kernel docos.

--
Carl




-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: /dev/pts/n

am 06.01.2006 18:50:46 von Dermot Paikkos

Thanx. that's a start.

sysctl -a | grep pty:
kernel.pty.nr = 13
kernel.pty.max = 4096

So I should have enough as a maximum. I am not a sure what the pty.nr
means (possibly next available number??).

The crux of my problem is the database frontend has a table of
terminal definitions which I have defined as /dev/pts/0....50. Now
from what you have said (and I have seen it in action now) the only
way to create files in /dev/pts/ is to ssh into the system. However
the database frontend is a java-terminal that operates out of a
browser window. I don't think it knows how to open a pty.

I have tried to use mknod to create devices and I get operation not
permitted. So I am a bit stuck at the moment.

Thanx for the help though.
Dp.



On 6 Jan 2006 at 17:22, Carl wrote:

> At 16:27 06/01/2006, Dermot Paikkos wrote:
> >Hi,
> >
> >I have been trying to working out how to create additional pseudo-
> >terminal devices in pts. Currently there are 9 device file in
> >/dev/pts numbered between 1 - 12.
> >
> >I need to ensure that I can have about 40 users attach to the system
> >using xterminals. I have tried MAKEDEV but nothing happens. The man
> >pages for pts doesn't say how to make any new devices, only that a
> >pty are opened when a process opens /dev/ptmx.
> >
> >
> >Does anyone know who I can create new character files in /dev/pts?
>
> I'm not authorative on this subject but here goes.
>
> They will be created automatically for you. Hence why you have
> missing numbers in your current sequence.
> As someone logs out the pts is destroyed.
>
> The limit is a kernel parameter. Most distros i have seen had the
> limit set to 256.
>
> Older kernels require a change to the kernel config and recompile,
> newer kernels should be controllable with sysctl.
>
> Try "sysctl -a | grep pty" and see what you get. Not sure if this is
> correct but might be.
>
> Try googling for "pseudo tty" and look at the kernel docos.
>
> --
> Carl
>
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin"
> in the body of a message to majordomo@vger.kernel.org More majordomo
> info at http://vger.kernel.org/majordomo-info.html
>


-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: /dev/pts/n

am 06.01.2006 19:45:47 von Glynn Clements

Dermot Paikkos wrote:

> The crux of my problem is the database frontend has a table of
> terminal definitions which I have defined as /dev/pts/0....50. Now
> from what you have said (and I have seen it in action now) the only
> way to create files in /dev/pts/ is to ssh into the system. However
> the database frontend is a java-terminal that operates out of a
> browser window. I don't think it knows how to open a pty.
>
> I have tried to use mknod to create devices and I get operation not
> permitted. So I am a bit stuck at the moment.

You cannot create additional Unix98 ptys manually. Every time you open
/dev/ptmx, a new slave is created automatically in /dev/pts/.

You may be able to use BSD ptys (/dev/pty[p-za-e][0-9a-f] and
/dev/tty[p-za-e][0-9a-f]), which are created statically. However, the
application will need to be designed to use BSD ptys and not Unix98
ptys.

--
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html