By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,710 Members | 1,906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,710 IT Pros & Developers. It's quick & easy.

solaris and ps

P: n/a
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 ma*******@postgresql.org)

Nov 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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.

--
Richard Huxton
Archonet Ltd

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

Nov 23 '05 #2

P: n/a
On Thu, Oct 14, 2004 at 11:14:10AM +0100, Richard Huxton wrote:
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

Nov 23 '05 #3

P: n/a
On Thu, Oct 14, 2004 at 08:24:19AM -0600, Michael Fuhr wrote:

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

Nov 23 '05 #4

P: n/a
> "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

Nov 23 '05 #5

P: n/a
On Thu, Oct 14, 2004 at 11:16:48AM +0200, 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?


/usr/ucb/ps -auxww will work. I've used it thousands of times.

A

--
Andrew Sullivan | aj*@crankycanuck.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

Nov 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.