LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2004, 05:06 PM   #1
statuszero
LQ Newbie
 
Registered: May 2002
Distribution: Mandrake 10?
Posts: 26

Rep: Reputation: 15
Question 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
 
Old 08-06-2004, 05:12 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 08-06-2004, 08:06 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 08-07-2004, 04:59 AM   #4
statuszero
LQ Newbie
 
Registered: May 2002
Distribution: Mandrake 10?
Posts: 26

Original Poster
Rep: Reputation: 15
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

Last edited by statuszero; 08-07-2004 at 05:05 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pts/0, pts/1 devices ?? nadine.mauch Linux - General 1 10-07-2004 11:00 AM
how to determine which pts do I actually use Luskacik Linux - Newbie 2 10-05-2004 02:39 AM
which pts do I use Luskacik Linux - Newbie 0 09-30-2004 10:07 AM
TTY pts/# terminals increasing. Technoslave Linux - General 1 04-22-2004 01:28 PM
what is pts/# Cichlid Linux - General 2 12-27-2002 11:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration