SESSION idle time

SESSION idle time

Post by Dirk Moolma » Thu, 21 Feb 2002 20:35:26



I received the following request from one of our department managers

"I want to show somebody in my department that she hardly ever works -
can the system tell you how long a session was not used in a day ?"

Is this possible ?  I know about the login times (using the command "last"),
but I don't know if it is possible to find the idle time during the time the
user was logged in, and even if I do, how do I interpret that ?

Any help on this subject will be appreciated.
Regards
Dirk

 
 
 

SESSION idle time

Post by Jason Saslo » Fri, 22 Feb 2002 01:54:26



> I received the following request from one of our department managers

> "I want to show somebody in my department that she hardly ever works -
> can the system tell you how long a session was not used in a day ?"

> Is this possible ?  I know about the login times (using the command "last"),
> but I don't know if it is possible to find the idle time during the time the
> user was logged in, and even if I do, how do I interpret that ?

> Any help on this subject will be appreciated.
> Regards
> Dirk

Type "w" and hit return. You will get something that looks like this:

bash-2.05# w
 11:48am  up 100 day(s),  1:25,  4 users,  load average: 1.80, 1.73,
1.58

jsaslow  console      Fri 8am 5days                /usr/dt/bin/sdt_shell
-c  ?    u
jsaslow  pts/4        Fri 8am         8:35      1  w
jsaslow  pts/5        Fri 8am 19:19                bash
jsaslow  pts/6        Fri 8am  1:08      3      3  telnet machine2
jsaslow  pts/7        Fri 8am  3:02                telnet machine
jsaslow  pts/11       Fri 8am 20:31                ssh deuce
jsaslow  pts/12       Fri 8am 18:54   2:28      1  bash
jsaslow  pts/16       Fri 8am  2:26                bash
jsaslow  pts/17       Fri 8am    15     11     10  ssh deuce
jsaslow  pts/18       Fri 8am 20:31      1         ssh firewall
dlord    pts/10       11Feb02 9days      1         -csh
jsaslow  pts/1        Fri 8am 22:57                mysql -u root -p
syse_dev
jsaslow  pts/2        Fri 8am 5days      1         ssh deuce
jsaslow  pts/3        Fri 8am 19:19      2         bash
jsaslow  pts/21       Fri 8am 21:23                telnet machine3
jsaslow  pts/22       Fri10am    55  11:20   9:06  ./xanim +V +Ae 1F09
Homer the Vi
dlord    pts/20       11Feb02 8days      1         -csh
dlord    pts/8        11Feb02 9days                -csh

From that, you can see on this machine that dlord, for example, logged
in on pts/20 on Feb 11, 2002 and has been idle on that tty for 8 days.
You can also see what command they're running from that tty.

Hope that's helpful.

PS- Pay no attention to the episode of the Simpsons playing on this
machine :o)

--
Please note: If you would like to respond to me, don't use my "From" or
"Reply-to" address as it is used as a spam filter. You can contact me
directly by sending e-mail to jsaslow using the shoelacecity domain.
BTW- that's a dotcom!

 
 
 

SESSION idle time

Post by Jeremiah DeWitt Weine » Fri, 22 Feb 2002 07:30:41




>> I received the following request from one of our department managers

>> "I want to show somebody in my department that she hardly ever works -
>> can the system tell you how long a session was not used in a day ?"
> Type "w" and hit return. You will get something that looks like this:

        Yeah, but that will only show you how long the session's been idle
/at that moment/.  It won't tell you how much idle time a given session
racked up in one day, nor do I think there is a simple way to tell.  I
guess you could do something with auditing, and see how long it was
between commands issued by the user.

JDW

--
If mail to me bounces, try removing the "+STRING" part of the address.

 
 
 

SESSION idle time

Post by Dirk Moolma » Fri, 22 Feb 2002 14:56:09


Thank you Jason & Jeremiah,

yeah, that's also what I thought. The "w" command will give me the status of
all *currently* logged in sessions.
I will have a look at the auditing you are refering to. Is there a good
online manual to describe this, and can I enable auditing for one user only
?

Dirk

PS if you don't mind, please send a copy of your reply to my personal e-mail
address as well.
Very much appreciated - thanks !






> >> I received the following request from one of our department managers

> >> "I want to show somebody in my department that she hardly ever works -
> >> can the system tell you how long a session was not used in a day ?"

> > Type "w" and hit return. You will get something that looks like this:

> Yeah, but that will only show you how long the session's been idle
> /at that moment/.  It won't tell you how much idle time a given session
> racked up in one day, nor do I think there is a simple way to tell.  I
> guess you could do something with auditing, and see how long it was
> between commands issued by the user.

> JDW

> --
> If mail to me bounces, try removing the "+STRING" part of the address.

 
 
 

SESSION idle time

Post by mack » Sat, 23 Feb 2002 01:16:42


the whodo command may give you some additional info

Mac


> Thank you Jason & Jeremiah,

> yeah, that's also what I thought. The "w" command will give me the status
of
> all *currently* logged in sessions.
> I will have a look at the auditing you are refering to. Is there a good
> online manual to describe this, and can I enable auditing for one user
only
> ?

> Dirk

> PS if you don't mind, please send a copy of your reply to my personal
e-mail
> address as well.
> Very much appreciated - thanks !



message



> > >> I received the following request from one of our department managers

> > >> "I want to show somebody in my department that she hardly ever
works -
> > >> can the system tell you how long a session was not used in a day ?"

> > > Type "w" and hit return. You will get something that looks like this:

> > Yeah, but that will only show you how long the session's been idle
> > /at that moment/.  It won't tell you how much idle time a given session
> > racked up in one day, nor do I think there is a simple way to tell.  I
> > guess you could do something with auditing, and see how long it was
> > between commands issued by the user.

> > JDW

> > --
> > If mail to me bounces, try removing the "+STRING" part of the address.

 
 
 

SESSION idle time

Post by Alan Coopersmi » Sat, 23 Feb 2002 01:26:50



|> "I want to show somebody in my department that she hardly ever works -
|> can the system tell you how long a session was not used in a day ?"
|
|Type "w" and hit return. You will get something that looks like this:
|From that, you can see on this machine that dlord, for example, logged
|in on pts/20 on Feb 11, 2002 and has been idle on that tty for 8 days.
|You can also see what command they're running from that tty.

That only works for tty-based commands.  It could show 8 hours idle
while the user has been busily working in StarOffice, Netscape, Xemacs,
or any number of other X-based applications.

--
________________________________________________________________________


  Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

SESSION idle time

Post by Jason Saslo » Wed, 27 Feb 2002 04:40:56





> |> "I want to show somebody in my department that she hardly ever works -
> |> can the system tell you how long a session was not used in a day ?"
> |
> |Type "w" and hit return. You will get something that looks like this:
> |From that, you can see on this machine that dlord, for example, logged
> |in on pts/20 on Feb 11, 2002 and has been idle on that tty for 8 days.
> |You can also see what command they're running from that tty.

> That only works for tty-based commands.  It could show 8 hours idle
> while the user has been busily working in StarOffice, Netscape, Xemacs,
> or any number of other X-based applications.

Right, same if you open an xterm using that tty. It's not a terribly
good way of doing this sort of thing, but you can get the general idea.

--
Please note: If you would like to respond to me, don't use my "From" or
"Reply-to" address as it is used as a spam filter. You can contact me
directly by sending e-mail to jsaslow using the shoelacecity domain.
BTW- that's a dotcom!