Re: Monitoring DB activity PosgreSQL 7.3.2 - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Monitoring DB activity PosgreSQL 7.3.2
Date
Msg-id 20030728152734.GA26271@dcc.uchile.cl
Whole thread Raw
In response to Monitoring DB activity PosgreSQL 7.3.2  (Andre Truter <andre.truter@intekom.co.za>)
List pgsql-general
On Mon, Jul 28, 2003 at 12:36:29PM +0200, Andre Truter wrote:

> I have PostgreSQL 7.3.2 server running.
> I could normally view the sessions by doing
> 'ps auxww | grep ^postgres' like the documentation states.
>
> But, recently it is not showing me expected output anymore.
>
> THis is what I get:
> postgres  1661  0.0  0.0  9132  176 ?        S    Jul18   0:00 [postmaster]
> postgres  1848  0.0  0.0  9944    0 ?        SW   Jul27   0:00 [postmaster]

The processes with the W status are swapped out.  In some Linux versions
and maybe some other platforms, swapped out processes have the
/proc/<pid>/cmdline file truncated, so ps uses the /proc/<pid>/exe
symlink instead, which does know what executable file the process is
running ("postmaster"), but not the nice status line that Postgres sets.

Well, whether you understand or not what I just said, truth is the
mechanism for showing process status in ps is not bulletproof, and this
is one example where it fails :-(

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"A wizard is never late, Frodo Baggins, nor is he early.
He arrives precisely when he means to."  (Gandalf, en LoTR FoTR)

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql -e
Next
From: kay-uwe.genz
Date:
Subject: CREATE TABLE with REFERENCE