Get Local Console User info
Roland Torres
newslists at autonomy.caltech.edu
Wed May 30 19:31:26 PDT 2007
On May 30, 2007, at 4:16 PM, Charles E. Heizer1 wrote:
> I think I finally found it on ADC
>
> http://developer.apple.com/qa/qa2001/qa1133.html
>
> I'm going after the console user who is the user physically at the
> computer.
Hmm, I wonder how reliable this is, i.e., if it uses the same source
as the unix "w" command -- the system seems to show the last console
user as still being logged in, even if he logged out hours ago:
19:20 up 85 days, 7:29, 53 users, load averages: 1.79 1.97 1.72
USER TTY FROM LOGIN@ IDLE WHAT
roland console - 10:45 8:34 -
roland p0 - 19:19 - w
semat p2 - 10:46 7:52 -tcsh
...etc.
I'm not logged in at the console (no one is), but the system says I am.
Roland
More information about the MacOSX-dev
mailing list