agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Subject: Re: PostgrSQL server : CPU and Memory
Date: Wed, 17 May 2017 21:03:10 -0700
Message-ID: <8cc6480c-199e-c37a-736b-4aece76630ec@hogranch.com> (raw)
In-Reply-To: <CALb1ETPD_yjC4Jc2rKhesm=rO+xZZGNaiTd-FothPUh+5uSWrQ@mail.gmail.com>
References: <CALb1ETPD_yjC4Jc2rKhesm=rO+xZZGNaiTd-FothPUh+5uSWrQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 5/17/2017 8:50 PM, kaustubh kelkar wrote:
> I am a developer and I want to monitor metrics related to CPU and 
> Memory of PostgreSQL server only using SQL queries.

postgres itself doesn't track that level of OS specific stuff.

>
> Do we have any system tables which can give us the data? I have found 
> this one
> https://aaronparecki.com/2015/02/19/8/monitoring-cpu-memory-usage-from-postgres 
>
> but dont know whether it is exactly the same what I need.


thats reading the /proc/.... stuff available on Linux systems via SQL, 
its the same stuff OS level tools like ps, top, free use... it won't 
work on non-Linux systems, even other Unix systems like BSD don't have 
the same /proc stuff, and other OS's like Windows don't have /proc at all.

if you don't know whether that's what you need, I'm not sure how we 
could know what you need.

-- 
john r pierce, recycling bits in santa cruz



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



view thread (2+ messages)

Message-ID: <8cc6480c-199e-c37a-736b-4aece76630ec@hogranch.com>
Permalink:  ../8cc6480c-199e-c37a-736b-4aece76630ec@hogranch.com/
Also on:    postgresql.org/message-id/8cc6480c-199e-c37a-736b-4aece76630ec@hogranch.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pierce@hogranch.com, pgsql-general@postgresql.org
  Subject: Re: PostgrSQL server : CPU and Memory
  In-Reply-To: <8cc6480c-199e-c37a-736b-4aece76630ec@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox