Re: adding more information about process(es) cpu and memory usage

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: adding more information about process(es) cpu and memory usage
Дата
Msg-id CAB7nPqSUDktsxTYhd4X4fy7AxF15nb3gLd2b_=0=9vhNNz8UHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: adding more information about process(es) cpu and memory usage  (Julien Rouhaud <julien.rouhaud@dalibo.com>)
Список pgsql-hackers
On Sat, Apr 25, 2015 at 4:23 PM, Julien Rouhaud wrote:
> There are at least two projects that provides this kind of statistics
> for backends: pg_proctab (https://github.com/markwkm/pg_proctab) and
> pg_stat_kcache (https://github.com/dalibo/pg_stat_kcache).  Michael also
> wrote an article on this topic some weeks ago
> (http://michael.otacoo.com/postgresql-2/postgres-calculate-cpu-usage-process/).

Don't use that hack except for development purposes ;) pg_stat_kcache
gives shows that core has enough facility for an extension doing
query-base CPU statistics by using the two hooks at executor init and
end with two calls to getrusage to calculate diffs for the stats it
needs. pg_proctab is useful as well to get live data.
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: forward vs backward slashes in msvc build code
Следующее
От: Jan de Visser
Дата:
Сообщение: Re: Idea: closing the loop for "pg_ctl reload"