https://github.com/postgrespro/memstat
https://github.com/postgrespro/memstat
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/postgrespro/memstat
- Owner: postgrespro
- Created: 2016-07-20T16:42:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-08T13:44:56.000Z (about 6 years ago)
- Last Synced: 2025-04-24T10:48:41.896Z (7 days ago)
- Language: C
- Size: 4.88 KB
- Stars: 9
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Module adds statistic report about memory contexts in local and all backends.
Functions:
setof (name text, level integer, nblocks bigint, freechunks bigint,
totalspace bigint, freespace bigint)
local_memory_stats()
prints memory context's statistic for current backendsetof (pid integer, name text, level integer, nblocks bigint, freechunks bigint,
totalspace bigint, freespace bigint)
instance_memory_stats()
prints memory context's statistic for all alive backend, works if library
was preloaded via shared_preload_libraries.view memory_stats
prints per backend summary memory statistics
To use instance_memory_stats() it's needed to add memstat library to
shared_preload_libraries. And it should be last in that list!GUC variable:
memstat.period = 10 # seconds
Module collects memory statistics at a begining of each query and
it could be expensive on highloaded instances, so, this variable
set minimal time between statistic obtaining.Copyright (c) 2016, Teodor Sigaev