Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output of ps 1

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
0
0
US
Good Day,

I see the following -

! % ==> ps -ef | grep content
autonomy 3456 1 0 01:25 ? 00:00:06 ./content9300.exe
autonomy 8528 1 0 11:51 pts/3 00:00:01 ./content9100.exe
autonomy 9165 1 0 14:01 pts/3 00:00:00 ./content9200.exe
autonomy 9209 1 6 14:09 pts/3 00:00:00 ./content9500.exe
autonomy 9234 8465 0 14:09 pts/3 00:00:00 grep content

What is pts/3 that shows up in four lines?

Regards,
Dan
 
The associated tty, in this case a psedo tty that the process is connected. Do a who or last...



 
If you're interested in the history, the term "tty" is derived from TeleType:


In the days before TCP/IP, Ethernet, etc, each terminal or "tty" had to be physically wired to the server, I believe using serial connections (although this pre-dates me, so correct me if you've been around long enough to know better :) ). Therefore you had to create a /dev/tty device for each terminal.

Nowadays due to networking the number of terminals available on a system is dynamic, so pseudo-ttys are generated on-the-fly as required when people log in. But they are still used as a way to uniquely identify each user's connection, and the processes they run on that connection are associated with that particular tty.

Annihilannic.
 
Thank you Annihilannic for the explanation.

I see the following -

root 5437 1 0 2009 tty2 00:00:00 /sbin/mingetty tty2
root 5438 1 0 2009 tty3 00:00:00 /sbin/mingetty tty3
root 5439 1 0 2009 tty4 00:00:00 /sbin/mingetty tty4
root 5440 1 0 2009 tty5 00:00:00 /sbin/mingetty tty5
root 5441 1 0 2009 tty6 00:00:00 /sbin/mingetty tty6
root 5442 1 0 2009 ? 00:00:01 svscan /service
root 5447 5442 0 2009 ? 00:00:00 supervise dah.exe
root 6244 3976 0 Apr22 ? 00:00:00 sshd: sysadmin [priv]
sysadmin 6246 6244 0 Apr22 ? 00:00:00 sshd: sysadmin@pts/1
sysadmin 6247 6246 0 Apr22 pts/1 00:00:00 -bash
root 6277 6247 0 Apr22 pts/1 00:00:00 su -
root 6278 6277 0 Apr22 pts/1 00:00:00 –bash


What's the difference between tty* and pts/1?

Regards,
Dan
 
tty1 through 7 are the plain text terminals usually managed by a process called mgetty (or mingetty or getty, depending on the vintage and flavour of OS you're running).

Those are the ones you can see before starting X windows, or if you don't run X at all. You can access each individual one by hitting Alt-F1 through Alt-F6 (or Ctrl-Alt-F1 through F6 if you are in X). Alt-F7 usually takes you back to your X session, if it is running. Sometimes Alt-F8 to F10 have other non-login terminals where system console output or hardware detection information is displayed.

pts are the pseudo-tty's I mentioned earlier, see man pts.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top