Determine server idle time via command line?

Anyone know a way to query a machine's idle time via the command line?

I know about `uptime` which doesn't appear to cover it. Can't find anything in `man pmset` either.

PowerBook G4 12" 867 MHz Mac OS X (10.4.3) 1 GB, 60 GB, AirPort Extreme, Bluetooth

Posted on Dec 25, 2005 1:00 PM

Reply
13 replies

Dec 27, 2005 3:08 PM in response to jaydisc

Mine looks like:
Processes: 91 total, 3 running, 88 sleeping... 278 threads 18:07:05
Load Avg: 0.32, 0.31, 0.31 CPU usage: 4.9% user, 15.4% sys, 79.7% idle
SharedLibs: num = 177, resident = 40.1M code, 4.94M data, 9.01M LinkEdit
MemRegions: num = 8458, resident = 146M + 15.4M private, 117M shared
PhysMem: 58.5M wired, 187M active, 235M inactive, 481M used, 30.3M free
VM: 4.96G + 123M 38430(0) pageins, 196(0) pageouts


Above includes a % idle.
But I see you are looking for idle time, so this may not be at all what you need.

Jeff

Mar 22, 2006 3:26 PM in response to jaydisc

I think I'm not quite understanding the situation.

Are your users logged in to the console of a Server?

Or are you looking for some server technology to monitor user behavior?

As has been noted, the unix command w will give you idle time. But that's not all that helpful in determining if your users are 'doing their work' A low idle time could indicate idle fiddling with the mouse, the keyboard, working hard on an excel spreadsheet, chatting via iChat, surfing for **** or any number of things.

Similarly, long idle time could mean answering an important phone call, thinking about a difficult problem, taking a coffee break, or drooling over internet ****.

Users could even write scripts to create 'activity' for energy saver or w to see.

If your organization allows for more intrusive observation of users, ARD would allow you to observe the console of users' machines.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Determine server idle time via command line?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.