Re: win32 ps info

Lists: pgsql-patches
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "PostgreSQL Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: win32 ps info
Date: 2004-11-11 21:07:53
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE476127@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On win32, there is currently no way to get the equivalent function of
the "ps" argument list on Unix - meaning that there is no way to
identify for example the stats processors or the bgwriter.

This patch adds this functionality, in a bit of a crufty way. It creates
a kernel Event object with the name of what would be in the title. This
can be viewed using for example Process Explorer.

It's been very handy for me during both debugging and using. I haven't
figured a better way, but perhaps someone has one that's less crufty? If
not, here is at least a working patch :-)

//Magnus

Attachment Content-Type Size
win32ps.patch application/octet-stream 2.0 KB

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: win32 ps info
Date: 2004-12-02 22:28:11
Message-ID: 200412022228.iB2MSB723543@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

Magnus Hagander wrote:
> On win32, there is currently no way to get the equivalent function of
> the "ps" argument list on Unix - meaning that there is no way to
> identify for example the stats processors or the bgwriter.
>
> This patch adds this functionality, in a bit of a crufty way. It creates
> a kernel Event object with the name of what would be in the title. This
> can be viewed using for example Process Explorer.
>
> It's been very handy for me during both debugging and using. I haven't
> figured a better way, but perhaps someone has one that's less crufty? If
> not, here is at least a working patch :-)
>
> //Magnus
>
>

Content-Description: win32ps.patch

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073