dbTalk Databases Forums  

solaris and ps

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss solaris and ps in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Leonardo Francalanci
 
Posts: n/a

Default solaris and ps - 10-14-2004 , 04:16 AM






I read "Chapter 23. Monitoring Database Activity" to monitor postgresql,
but on Solaris it doesn't work. I tried "/usr/ucb/ps", but it doesn't
work either (I only see the postmaster startup parameters). Isn't there
any other solution to see what postgresql instances are doing?


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #2  
Old   
Richard Huxton
 
Posts: n/a

Default Re: solaris and ps - 10-14-2004 , 05:14 AM






Leonardo Francalanci wrote:
Quote:
I read "Chapter 23. Monitoring Database Activity" to monitor postgresql,
but on Solaris it doesn't work. I tried "/usr/ucb/ps", but it doesn't
work either (I only see the postmaster startup parameters). Isn't there
any other solution to see what postgresql instances are doing?
If the tips on solaris ps haven't helped, you can turn on statistics
gathering and check pg_stat_activity.

--
Richard Huxton
Archonet Ltd

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



Reply With Quote
  #3  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: solaris and ps - 10-14-2004 , 09:24 AM



On Thu, Oct 14, 2004 at 11:14:10AM +0100, Richard Huxton wrote:
Quote:
Leonardo Francalanci wrote:
I read "Chapter 23. Monitoring Database Activity" to monitor postgresql,
but on Solaris it doesn't work. I tried "/usr/ucb/ps", but it doesn't
work either (I only see the postmaster startup parameters). Isn't there
any other solution to see what postgresql instances are doing?

If the tips on solaris ps haven't helped, you can turn on statistics
gathering and check pg_stat_activity.
pargs should work, but you'll probably have to run it as the postgres
user or as root or you'll get "cannot examine <pid>: permission denied".

pargs `/usr/bin/ps -opid -Upostgres | tail +2`

I just did some tests on Solaris 9 and, curiously, whether /usr/ucb/ps
shows the altered argument list or not appears to depend on the
lengths of the original and replacement arguments:

% ./foo x
PID TT S TIME COMMAND
28106 pts/2 S 0:00 baz qux

% ./foo xy
PID TT S TIME COMMAND
28109 pts/2 S 0:00 ./foo xy

As far as I can tell, for /usr/ucb/ps the show the replacement
arguments, the sum of the lengths of the replacement arguments
must be 2 or more greater than the sum of the lengths of the
original arguments. I'm guessing that if the postmaster used
a longer status message, then /usr/ucb/ps would show it. I'll
test that the next time I rebuild PostgreSQL.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html



Reply With Quote
  #4  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: solaris and ps - 10-14-2004 , 09:31 AM



On Thu, Oct 14, 2004 at 08:24:19AM -0600, Michael Fuhr wrote:
Quote:
As far as I can tell, for /usr/ucb/ps the show the replacement
arguments, the sum of the lengths of the replacement arguments
must be 2 or more greater than the sum of the lengths of the
original arguments. I'm guessing that if the postmaster used
a longer status message, then /usr/ucb/ps would show it.
I just noticed that this is already mentioned in the PostgreSQL
documentation:

"In addition, your original invocation of the postmaster command
must have a shorter ps status display than that provided by each
server process."

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match



Reply With Quote
  #5  
Old   
Leonardo Francalanci
 
Posts: n/a

Default Re: solaris and ps - 10-14-2004 , 09:44 AM



Quote:
"In addition, your original invocation of the postmaster command
must have a shorter ps status display than that provided by each
server process."
Yes, using PGDATA instead of the whole path eith the -D option worked:
now I can see the different status displays.


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
  #6  
Old   
Andrew Sullivan
 
Posts: n/a

Default Re: solaris and ps - 10-15-2004 , 01:50 PM



On Thu, Oct 14, 2004 at 11:16:48AM +0200, Leonardo Francalanci wrote:
Quote:
I read "Chapter 23. Monitoring Database Activity" to monitor postgresql,
but on Solaris it doesn't work. I tried "/usr/ucb/ps", but it doesn't
work either (I only see the postmaster startup parameters). Isn't there
any other solution to see what postgresql instances are doing?
/usr/ucb/ps -auxww will work. I've used it thousands of times.

A

--
Andrew Sullivan | ajs (AT) crankycanuck (DOT) ca
The fact that technology doesn't work is no bar to success in the marketplace.
--Philip Greenspun

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.