vladb has asked for the wisdom of the Perl Monks concerning the following question:

Hail thee!

I was just about to commit a horrific sin by doing this in Visual C++, before I realized that Perl might be a perfect fit as well. Basically, I'm wondering whether there's a way to find out list of current running processes on a Win OS inside a Perl script? Again, I hardly wrote any Perl script for Win (I code at work where we have Solaris boxes ;-) and, therefore, may miss some of the tools that Perl provides in that regard (systems programming for e.g.)

Also, once I have found the process list, is there a way to retreave each process' data segment pointers (pointer to a segment of memory where all of the processes data is being kept)?

Greatly appreciate your help! ;-).

PS: did anyone of you experience brutal page load times on perlmonks.org? I couldn't surf the site last weekend =/?

"There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith
  • Comment on Retrieving current process list on Win OS

Replies are listed 'Best First'.
Re: Retrieving current process list on Win OS
by count0 (Friar) on Dec 31, 2001 at 21:05 UTC
    I think this node might come in really handy =)
      Hi,

      Thanks for your reply, I've did notice the node actually... Unfortunately, that's not exactly what I want, which is something what PSAPI.DLL would do for a Microsoft Visual C++ App. I've got latest SDK a few days back and it contains libraries and source code; however, again, I thought if there was a way to do it in Perl. Say, I guess it was fair to assume that since there was already this PSAPI library present on WinOS then there must be some Perl module that taps into this...

      Anyhow, I'll keep searching ;-), or might have to write a Perl interface to PSAPI as well as ToolHelp32, which would be kind of useful hehe.

      cheers,

      "There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith
OFFTOPIC Re: Retrieving current process list on Win OS
by theorbtwo (Prior) on Jan 01, 2002 at 10:45 UTC

    It's a little (OK, a lot) offtopic, but yes, lots of people have had bad load times. Perl Monks Discussion keeps having threads about that fact... it seems that it depends on what nodelets you have up. Try getting rid of some, most importantly those that look at other sites, like "everything developer" and "CPAN".

    Thanks,
    James Mastros,
    Just Another Perl Scribe