pseudo-terminal masters
mark
prgrmr at gmail.com
Tue Jan 13 17:02:39 EST 2009
Isn't this what the TMOUT shell variable is doing? In which case you could
look at the code in bash or ksh to see if that mechanism is available for
your script or as a wrapper.
---
mark
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.
>
> Thanks,
> -Bill
>
> --
> Bill McGonigle, Owner Work: 603.448.4440
> BFC Computing, LLC Home: 603.448.1668
> bill at bfccomputing.com Cell: 603.252.2606
> http://www.bfccomputing.com/ Page: 603.442.1833
> Blog: http://blog.bfccomputing.com/
> VCard: http://bfccomputing.com/vcard/bill.vcf
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20090113/0bd17ea6/attachment-0001.html
More information about the gnhlug-discuss
mailing list