pseudo-terminal masters

Tom Buskey tom at buskey.name
Wed Jan 14 08:46:35 EST 2009


On Tue, Jan 13, 2009 at 4:45 PM, Bill McGonigle <bill at bfccomputing.com>wrote:

> Hi, all,
>
> Anybody familiar with the pseudoterminal setup on linux?
>
> I've got some scripts which look for idle time on connections.  They're
> currently using the output of 'w' which I see now is really just
> reporting the last modified date of /dev/pts/x, so I can throw out the
> 'w' parsing.
>
> However, /dev/pts/x's modification date depends on data written to the
> terminal by the system (for lack of better terms).  What I actually want
> is to figure out idle time based on input by the user.
>
> On some other unixes there are /dev/ptm/x which represents this, but in
> linux, apparently you open /dev/ptmx which returns to you a filehandle
> for a new ptm, but I'm not sure how to find that from userspace.
>
> If I knew what I was looking for I wouldn't mind implementing a wrapper
> in c, but I'm not sure where to look.
>

This is an old problem :-) that should be part of the standard unix toolkit.
:-(

I remember something called idled

 http://www.itworld.com/nls_unix_login2
I googled upon an rpm of it.

I'd imagine Kerberos does something like it (though I don't know Kerberos).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20090114/f9c59912/attachment.html 


More information about the gnhlug-discuss mailing list