pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedbackend cpu usage? [7.2]
2+ messages / 2 participants
[nested] [flat]
* backend cpu usage? [7.2]
@ 2003-08-01 20:23 george young <gry@ll.mit.edu>
2003-08-01 22:21 ` Re: backend cpu usage? [7.2] Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: george young @ 2003-08-01 20:23 UTC (permalink / raw)
To: pgsql-sql
[postgresql-7.2, x86 linux]
How can I get cpu usage info in 7.2 about the backend process of my db
connection? I tried looking at the pg_stat_get_backend_pid function
but it requires a backend_id that I don't know how to get.
If I can get the backend pid I can fork a 'ps' command from my app,
though it would be nicer to get it directly through sql.
-- George Young
--
I cannot think why the whole bed of the ocean is
not one solid mass of oysters, so prolific they seem. Ah,
I am wandering! Strange how the brain controls the brain!
-- Sherlock Holmes in "The Dying Detective"
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: backend cpu usage? [7.2]
2003-08-01 20:23 backend cpu usage? [7.2] george young <gry@ll.mit.edu>
@ 2003-08-01 22:21 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2003-08-01 22:21 UTC (permalink / raw)
To: gry@ll.mit.edu; +Cc: pgsql-sql
george young <gry@ll.mit.edu> writes:
> How can I get cpu usage info in 7.2 about the backend process of my db
> connection? I tried looking at the pg_stat_get_backend_pid function
> but it requires a backend_id that I don't know how to get.
> If I can get the backend pid I can fork a 'ps' command from my app,
> though it would be nicer to get it directly through sql.
There's a pg_backend_pid() function in 7.3 that returns your own PID.
Not sure if it was in 7.2.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-08-01 22:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-01 20:23 backend cpu usage? [7.2] george young <gry@ll.mit.edu>
2003-08-01 22:21 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox