How to determine the login duration of current user?

Kevin Davison kdavison at innosphere.ca
Thu Oct 14 14:07:49 CEST 2010


Technically, they do. The programmers who use them often work "when inspiration strikes". I encourage them to log out when they're done but the machines need to be available for an RDP connection 24/7. 


----- Original Message -----
From: Kevin Keane <subscription at kkeane.com>
To: Nagios Users List <nagios-users at lists.sourceforge.net>
Sent: Wed Oct 13 17:33:11 2010
Subject: Re: [Nagios-users] How to determine the login duration	of	current	user?

Do these virtual machines have to run 24/7? If not, you could automatically shut them down at 2 AM - either from your hypervisor, or with the shutdown.exe command.

When you do that, you could leave the VMs simply sitting there taking up disk space, or you can check the file date of the .VMDK file for that VM.

By the way, some vendors have yet another solution that might work for you. Has nothing to do with Nagios. You can auto-create virtual machines as needed. Basically, you just create one template XP VM image. Only when a user logs on, this template is cloned. When the user logs off, the clone is destroyed. The next time the same user logs on, he gets a completely fresh virgin copy of XP.

Citrix has something like this, and I believe Microsoft also is working on offering something similar. I'm sure VMWare does, too, but I haven't heard anything specific about it. 

-----Original Message-----
From: Kevin Davison [mailto:kdavison at innosphere.ca] 
Sent: Wednesday, October 13, 2010 2:02 PM
To: Nagios Users List
Subject: Re: [Nagios-users] How to determine the login duration of current user?

I took a look at that and the machines aren't generating log entries when a user logs in. 

I also forgot to mention that since these XP's are just used for software testing, the machines aren't joined to a domain.

-----Original Message-----
From: Jim Avery [mailto:jim at jimavery.me.uk]
Sent: October-13-10 4:22 PM
To: Nagios Users List
Subject: Re: [Nagios-users] How to determine the login duration of current user?

On 13 October 2010 18:37, Kevin Davison <kdavison at innosphere.ca> wrote:
> We have a large number of XP Virtual Machines that are used for 
> various software testing requirements. The testers are supposed to 
> notify their supervisor when an XP instance is no longer required. 
> Unfortunately that isn't working very well. The end result is that 
> there are a large number of XP instances sitting doing nothing for 
> long periods of time. Ideally, I'd love to receive a notification in 
> the event that any XP instance hasn't been used for x period of time.
>
>
>
> As the machines are accessed by the testers solely via RDP, I was 
> thinking that if I could determine how long it had been since someone 
> had logged into the machine I would be able to judge which machines 
> had been abandoned and remove them.
>
>
>
> I was mulling over using a WMI check to pull what I need from 
> Win32_NetworkLoginProfile but I'm not getting anything returned that I 
> know how to make use of.
>
>
>
> Has anyone had a need to perform a check like this in the past or can 
> anyone offer any advice as to where else I should start looking?


Is an entry made in one of the Windows Event Logs whenever a user logs in?  If so I guess you could use CheckEventLog in NSClient++ to warn if there have been no logins in x days.  For an example, see the section "Check if a script is running as it should" on the page describing the old syntax:

http://www.nsclient.org/nscp/wiki/CheckEventLog/CheckEventLog/old

hth,

Jim

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list