Thread: Monitoring DB activity PosgreSQL 7.3.2
Hi, 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 1665 0.0 0.0 10124 56 ? S Jul18 0:00 [postmaster] postgres 1666 0.0 0.0 9204 236 ? S Jul18 0:00 [postmaster] postgres 1848 0.0 0.0 9944 0 ? SW Jul27 0:00 [postmaster] postgres 4082 0.0 0.0 9844 0 ? SW Jul27 0:00 [postmaster] postgres 4083 0.0 0.0 10512 0 ? SW Jul27 0:00 [postmaster] postgres 4084 0.0 0.0 10604 0 ? SW Jul27 0:00 [postmaster] postgres 5089 0.0 0.0 9908 4 ? S Jul27 0:00 [postmaster] postgres 5963 0.0 0.0 9908 0 ? SW Jul27 0:00 [postmaster] postgres 5984 0.0 0.0 9844 0 ? SW Jul27 0:00 [postmaster] postgres 18014 0.0 0.8 11316 4348 ? S 09:28 0:01 [postmaster] postgres 18431 0.0 0.8 11168 4544 ? S 10:02 0:00 [postmaster] Is there a different way of seeing the user sessions? I thought that my documentation was out of date, so I tried the PostgreSQL site, but that seems to be out of order. http://www.postgresql.org/ gives me the Apache test page. -- Andre Truter Software Engineer Registered Linux user #185282 ICQ #40935899 AIM: trusoftzaf http://www.trusoft.za.net <-------------------------------------------------> < The box said: Requires Windows 95 or better... > < So I installed Linux > <-------------------------------------------------> Disclaimer and Confidentiality Warning This message is intended for the addressee only. If you are not the intended recipient of this message, you are notifiedthat any distribution, use of or copying of this communication is strictly prohibited. If you have received the communicationin error, please notify the sender immediately. The views and opinions expressed in this message are those ofthe individual sender of this message and do not necessarily represent the views and opinions of ATIO. Consequently, ATIOdoes not accept responsibility for such views and opinions and this message should not be read as representing the viewsand opinions of ATIO without subsequent written confirmation. Each page attached hereto must also be read in conjunctionwith this disclaimer.
On Mon, 2003-07-28 at 17:27, Alvaro Herrera wrote: > 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 :-( Yes, I am beginning to suspect 'ps', as it is currently showing about half of all processes to be swapped out, even though top shows them to be very active. Very weird.... -- Andre Truter Software Engineer Registered Linux user #185282 ICQ #40935899 AIM: trusoftzaf http://www.trusoft.za.net <-------------------------------------------------> < The box said: Requires Windows 95 or better... > < So I installed Linux > <-------------------------------------------------> Disclaimer and Confidentiality Warning This message is intended for the addressee only. If you are not the intended recipient of this message, you are notifiedthat any distribution, use of or copying of this communication is strictly prohibited. If you have received the communicationin error, please notify the sender immediately. The views and opinions expressed in this message are those ofthe individual sender of this message and do not necessarily represent the views and opinions of ATIO. Consequently, ATIOdoes not accept responsibility for such views and opinions and this message should not be read as representing the viewsand opinions of ATIO without subsequent written confirmation. Each page attached hereto must also be read in conjunctionwith this disclaimer.
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)