Querying for the OS for the list of active processes

Hi guys,
I have a question.

Under Linux I know I can get information about active processes by querying the /proc/PID/stat files.
But I need this for a cross-platform script, and I have no idea on how to do it in windows.

So ... how could I query Windows for the list of active processes, along with statistics like cpu/memory consumption ?
Are there any Ruby wrappers for win32api ... or something ?

Thank you,

Alex Nedelcu wrote:

Hi guys,
I have a question.

Under Linux I know I can get information about active processes by querying the /proc/PID/stat files.
But I need this for a cross-platform script, and I have no idea on how to do it in windows.

So ... how could I query Windows for the list of active processes, along with statistics like cpu/memory consumption ?
Are there any Ruby wrappers for win32api ... or something ?

Thank you,

See sys-proctable, available on the RAA.

Regards,

Dan

Thank you, that's great.

Daniel Berger wrote:

ยทยทยท

Alex Nedelcu wrote:

Hi guys,
I have a question.

Under Linux I know I can get information about active processes by querying the /proc/PID/stat files.
But I need this for a cross-platform script, and I have no idea on how to do it in windows.

So ... how could I query Windows for the list of active processes, along with statistics like cpu/memory consumption ?
Are there any Ruby wrappers for win32api ... or something ?

Thank you,

See sys-proctable, available on the RAA.

Regards,

Dan