Re: Monitoring DB activity PosgreSQL 7.3.2

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Andre Truter <andre(dot)truter(at)intekom(dot)co(dot)za>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Monitoring DB activity PosgreSQL 7.3.2
Date: 2003-07-28 15:27:34
Message-ID: 20030728152734.GA26271@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-07-28 15:40:54 Re: psql -e
Previous Message David Wheeler 2003-07-28 14:41:52 ANNOUNCE: Bricolage 1.6.2