pgsql: On win32, there is currently no way to get the equivalent

Started by Bruce Momjianover 21 years ago6 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Log Message:
-----------
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 Hagander

Modified Files:
--------------
pgsql/src/backend/utils/misc:
ps_status.c (r1.21 -> r1.22)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/ps_status.c.diff?r1=1.21&r2=1.22)

#2Jan Wieck
JanWieck@Yahoo.com
In reply to: Bruce Momjian (#1)
Re: pgsql: On win32, there is currently no way to get

On 12/2/2004 5:28 PM, Bruce Momjian wrote:

Log Message:
-----------
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.

doesn't tlist.exe work for that?

Jan

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 Hagander

Modified Files:
--------------
pgsql/src/backend/utils/misc:
ps_status.c (r1.21 -> r1.22)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/ps_status.c.diff?r1=1.21&r2=1.22)

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

#3Dave Page
dpage@pgadmin.org
In reply to: Jan Wieck (#2)
Re: pgsql: On win32, there is currently no way to get

-----Original Message-----
From: pgsql-committers-owner@postgresql.org
[mailto:pgsql-committers-owner@postgresql.org] On Behalf Of Jan Wieck
Sent: 03 December 2004 15:04
To: Bruce Momjian
Cc: pgsql-committers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: On win32, there is currently
no way to get

On 12/2/2004 5:28 PM, Bruce Momjian wrote:

Log Message:
-----------
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.

doesn't tlist.exe work for that?

tlist.exe isn't a standard part of windows.

Regards, Dave.

#4Jan Wieck
JanWieck@Yahoo.com
In reply to: Dave Page (#3)
Re: pgsql: On win32, there is currently no way to get

On 12/3/2004 10:36 AM, Dave Page wrote:

-----Original Message-----
From: pgsql-committers-owner@postgresql.org
[mailto:pgsql-committers-owner@postgresql.org] On Behalf Of Jan Wieck
Sent: 03 December 2004 15:04
To: Bruce Momjian
Cc: pgsql-committers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: On win32, there is currently
no way to get

On 12/2/2004 5:28 PM, Bruce Momjian wrote:

Log Message:
-----------
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.

doesn't tlist.exe work for that?

tlist.exe isn't a standard part of windows.

Hmmm ... where did I get that from? Is it part of the admin tools that
are separate on the Win2K PRO install CD? I see that my WinXP PRO
doesn't have it.

Jan

Regards, Dave.

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #

#5Dave Page
dpage@pgadmin.org
In reply to: Jan Wieck (#4)
Re: pgsql: On win32, there is currently no way to get

-----Original Message-----
From: Jan Wieck [mailto:JanWieck@Yahoo.com]
Sent: 03 December 2004 15:39
To: Dave Page
Cc: Bruce Momjian; pgsql-committers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: On win32, there is currently
no way to get

Hmmm ... where did I get that from? Is it part of the admin
tools that are separate on the Win2K PRO install CD? I see
that my WinXP PRO doesn't have it.

It used to be part of the Resource Kit iirc. There used to be a version
on the net somewhere as well I believe, as a demonstration of
psapi.dll's functionality (again, iirc).

Regards, Dave.

#6Magnus Hagander
magnus@hagander.net
In reply to: Dave Page (#5)
Re: pgsql: On win32, there is currently no way to get

Hmmm ... where did I get that from? Is it part of the admin
tools that are separate on the Win2K PRO install CD? I see
that my WinXP PRO doesn't have it.

It used to be part of the Resource Kit iirc. There used to be a version
on the net somewhere as well I believe, as a demonstration of
psapi.dll's functionality (again, iirc).

On newer windows (XP for example) there is "tasklist.exe" - that's the
replacement for tlist.exe.

But it doesn't show the difference between the postgresql processes. It
just shows one postmaster.exe and <n> postgres.exe:s. It's all based
around "Window Title", and since we don't have a window, we don't have a
window title...

//Magnus