# Querying for the OS for the list of active processes

**URL:** <https://www.ruby-forum.com/t/querying-for-the-os-for-the-list-of-active-processes/63482>\
**Category:** Ruby\
**Created:** [June 15, 2006, 4:39pm UTC](https://www.ruby-forum.com/t/querying-for-the-os-for-the-list-of-active-processes/63482 "2006-06-15T16:39:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [June 15, 2006, 4:39pm UTC](https://www.ruby-forum.com/t/querying-for-the-os-for-the-list-of-active-processes/63482/1 "2006-06-15T16:39:36Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [June 15, 2006, 4:43pm UTC](https://www.ruby-forum.com/t/querying-for-the-os-for-the-list-of-active-processes/63482/2 "2006-06-15T16:43:05Z")

</div>

Alex N. wrote:

> 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

---

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [June 15, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/querying-for-the-os-for-the-list-of-active-processes/63482/3 "2006-06-15T17:43:06Z")

</div>

Thank you, that’s great.
