... | ... | @@ -54,8 +54,21 @@ The BIND [statistics channel](https://bind9.readthedocs.io/en/latest/reference.h |
|
|
|
|
|
Memory usage as seen by the operating system should be close to sum of all 'Malloced' values.
|
|
|
|
|
|
To summarize BIND's view of memory use, use script [memory-json.py](uploads/d907c0f06b7d36469443019920bf4b05/memory-json.py). The script parses the statistics channel output from URL `<bind>/json/v1` and produces summaries. In case BIND was compiled only with XML statistics output take statistics from URL `<bind>/xml/v3` and convert them to JSON using [xq command](https://kislyuk.github.io/yq/#xml-support):
|
|
|
To summarize BIND's view of memory use, use script [memory-json.py](uploads/d907c0f06b7d36469443019920bf4b05/memory-json.py). The script parses the statistics channel output from URL `<bind>/json/v1` and produces summaries. In case BIND was compiled only with XML statistics output take statistics from URL `<bind>/xml/v3` and convert them to JSON using [xq command](https://kislyuk.github.io/yq/#xml-support).
|
|
|
|
|
|
For example, if [statistics-channels]() statement in named.conf is configured like this:
|
|
|
```
|
|
|
statistics-channels {
|
|
|
inet 127.0.0.111 port 8080;
|
|
|
};
|
|
|
```
|
|
|
you can obtain memory statistics using e.g. [curl](https://curl.se/docs/manpage.html):
|
|
|
```
|
|
|
curl http://127.0.0.1:8080/json/v1 > stats.json
|
|
|
```
|
|
|
or if JSON support is not compiled in, use:
|
|
|
```
|
|
|
curl http://127.0.0.1:8080/xml/v3 > stats.xml
|
|
|
xq < stats.xml > stats.json
|
|
|
```
|
|
|
|
... | ... | |