LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   pts/# ever increasing and never going away. (https://www.linuxquestions.org/questions/linux-newbie-8/pts-ever-increasing-and-never-going-away-214409/)

statuszero 08-06-2004 05:06 PM

pts/# ever increasing and never going away.
 
Hi,
I have read up about pts and my understanding is that they are psuedo terminals for when logging in via ssh. Now i am logging into my server via ssh and did a "who -a" and saw that there were a lot of pts's - at the time about 75. Then i logged out and back in again, I was assigned pts/76 and pts/75 still existed. In fact I could see pts's going back as far as when I has started logging into the server using ssh.

So my questions are....
1 - Is this normal?
2 - If not how do I clean this up and sort the problem?
3 - If I dont change anything will a new pts keep being created until I run out of memory or something else goes wrong?

Many thanks.
s0

Tinkster 08-06-2004 05:12 PM

Re: pts/# ever increasing and never going away.
 
Quote:

Originally posted by statuszero
1 - Is this normal?
No, it's definitely not. Doesn't happen on my
Slackware boxes or the debian machines at work

Quote:

2 - If not how do I clean this up and sort the problem?
No idea ... you could try a kill on the porcesses
that supposedly hold the pty's.


Quote:

3 - If I dont change anything will a new pts keep being created until I run out of memory or something else goes wrong?
Not as much memory as the maximum number
of pty's that the kernel was compiled with. Linux'
default is 256. Once that's reached you won't be
able to open any more...


Cheers,
Tink

btmiller 08-06-2004 08:06 PM

What do you mean that pts/75 still existed? You mean there was still a device entry for it in /dev/pts? That shouldn't be happening. There's an option in the kernel, I think, to not wrap around pty numbers (at least this happens on one machine I have after tinkering with some pty options in the kernel config), but old pseudo terminals that aren't in use are always deleted from /dev/pts.

statuszero 08-07-2004 04:59 AM

Many thanks for the replies.
Sorry should have explained myself better.

The OS is fedora. When I log in via ssh and do "who -a" there are a number of pts's with say the highest being pts/76 which is where I am logged in.

i.e. "who -a" output (shortened)


Code:

                                Jul 16 02:19              176 id=si    term=0 exit=0
          system boot          Jul 16 02:19
          run-level 3          Jul 16 02:19              last=S
                                Jul 16 02:20              1047 id=l3    term=0 exit=0
LOGIN      tty1                  Jul 16 02:20              1928 id=1
LOGIN      tty2                  Jul 16 02:20              1929 id=2
LOGIN      tty3                  Jul 16 02:20              1930 id=3
LOGIN      tty4                  Jul 16 02:20              1931 id=4
LOGIN      tty5                  Jul 16 02:20              1932 id=5
LOGIN      tty6                  Jul 16 02:20              1933 id=6
          pts/0                Jul 16 03:07              2088 id=ts/0  term=0 exit=0
          pts/1                Jul 16 02:32              2140 id=ts/1  term=0 exit=0
...
...
          pts/73                Aug  6 18:28            10803 id=s/73  term=0 exit=0
          pts/74                Aug  6 19:12            10883 id=s/74  term=0 exit=0
          pts/75                Aug  6 22:46            11010 id=s/75  term=0 exit=0
          pts/76                Aug  6 23:06            11038 id=s/76  term=0 exit=0
myuser +  pts/77                Aug  7 10:46  .        11652 (xxmyresolvedaddressxx)

Now if I log out of ssh then log back in via ssh and do "who -a" again i would be on pts/78 but pts/77 would be shown in the "who -a" output but now having details like the others "id=s/77 term=0 exit=0". As you can see I logged on yesterday and today, but there are still pts's from july.

In /dev/pts there is only the one entry - which is my current pts. Which is adding to my confusion now :) because I guess that means those other pts's dont really exist as there would be an entry in /dev/pts (am i correct? still learning :) ) so why does "who" still show them?

s0


All times are GMT -5. The time now is 04:01 AM.