Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • just curious..how did you map physical port to tty name ? Commented May 21, 2015 at 6:37
  • It's system dependent. In some systems each port number is incremented starting in, lets say 1, when you add a new serial multiplexer, the new ports continue to increment from the last number (AIX fashion), but in others, you have a compound number like 1a, 1b, 2a, 2b, where 1 and 2 the multiplexer number, and a, b the port (SCO fashion with digiboard hardware). Btw you always have an association between hardware and the /dev ports ids. Commented May 22, 2015 at 15:37
  • Are you looking for something like what who reports (based on utmp information) (or who --ips)? Note that ptys can be used for all sorts of things, not only network terminal sessions. Commented May 22, 2015 at 15:56
  • @StéphaneChazelas: Yes. We know that ptys is used for a lot of things, but it could be splited, so, one could be the ptys with an ip source. In legacy systems that just uses tty name for some sort of logic that need infers the tty origin, we cannot change it to call another API. Commented May 22, 2015 at 16:26
  • So, do you want for instance the list of pts that are controlled by a sshd process and for them give the IP address of the peer that spawned that sshd process? Commented May 22, 2015 at 20:06