Ruby task monitoring

I want to use ruby to monitor other programs that are running in
Windows. Is there anyway to access information about other programs
through ruby? If not does anyone know any useful windows command line
commands to find out that kind of information.

I saw an application which could also look at the title of an open
window and use that information. This information would be super useful
as it gives insight into what the user is doing in that application.
E.g. looking at a webpage in XP, the title usually has the website name
etc.

The goal of all this is to basically help with tracking the time a user
spends working on certain projects.

Any ideas?

You were fine up until ‘on windows.’ Most of the ruby stuff I know that
does
this is Unix based.

On Sat, Sep 17, 2011 at 7:22 AM, Chase W. [email protected]
wrote:

I want to use ruby to monitor other programs that are running in
Windows. Is there anyway to access information about other programs
through ruby? If not does anyone know any useful windows command line
commands to find out that kind of information.

PS C:\ > get-process | select-object -Property Id, Name, CPU, Path,
Company, FileVersion, WorkingSet
PS C:\ > Get-WmiObject Win32_NetworkAdapterConfiguration

In other words: Check out PowerShell, and Windows Management
Instrumentation.

And, to cover your ass, get a green-light by legal / a higher up. User
monitoring can get you into legal trouble really fast.


Phillip G.

gplus.to/phgaw | twitter.com/phgaw

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
– Leibniz

On Sat, Sep 17, 2011 at 7:22 AM, Chase W. [email protected]
wrote:

I want to use ruby to monitor other programs that are running in
Windows. Is there anyway to access information about other programs
through ruby? If not does anyone know any useful windows command line
commands to find out that kind of information.

Kind regards

robert

Chase W. wrote in post #1022417:

I want to use ruby to monitor other programs that are running in
Windows. Is there anyway to access information about other programs
through ruby? If not does anyone know any useful windows command line
commands to find out that kind of information.

I saw an application which could also look at the title of an open
window and use that information. This information would be super useful
as it gives insight into what the user is doing in that application.
E.g. looking at a webpage in XP, the title usually has the website name
etc.

The goal of all this is to basically help with tracking the time a user
spends working on certain projects.

Any ideas?

Depending upon your appetite for rolling-your-own, check out using FFI
to converse with the Win32 API.

ffi | RubyGems.org | your community gem host
Windows Examples · ffi/ffi Wiki · GitHub

And you might find win32ole (included in MRI and JRuby) useful similar
to

http://pragmaticdevnotes.wordpress.com/2008/12/17/with-a-little-help-from-ruby/

Jon