X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id AC56BD1C9FC for ; Fri, 1 Aug 2003 20:23:08 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 67093-10 for ; Fri, 1 Aug 2003 17:22:01 -0300 (ADT) Received: from ll.mit.edu (LLMAIL.LL.MIT.EDU [129.55.12.40]) by svr1.postgresql.org (Postfix) with ESMTP id A0CD3D1C9F8 for ; Fri, 1 Aug 2003 17:23:06 -0300 (ADT) Received: (from smtp@localhost) by ll.mit.edu (8.12.9/8.8.8) id h71KN73H013441 for ; Fri, 1 Aug 2003 16:23:07 -0400 (EDT) Received: from sty.llan.ll.mit.edu( ), claiming to be "sty.llan" via SMTP by llpost, id smtpdAAALoaGfA; Fri Aug 1 16:23:01 2003 Date: Fri, 1 Aug 2003 16:23:01 -0400 From: george young To: pgsql-sql@postgresql.org Subject: backend cpu usage? [7.2] Message-Id: <20030801162301.4ae86d31.gry@ll.mit.edu> Reply-To: gry@ll.mit.edu Organization: MIT Lincoln Laboratory X-Mailer: Sylpheed version 0.9.2 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/14 X-Sequence-Number: 14630 [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"