summaryrefslogtreecommitdiff
path: root/lib/memory_vty.c
AgeCommit message (Collapse)Author
2019-12-06lib: rename memory_vty.c to lib_vty.cDavid Lamparter
And memory_init() to lib_cmd_init(). Signed-off-by: David Lamparter <equinox@diac24.net>
2019-07-02lib: add process pids to 'show modules'Mark Stapp
Add the process pids to the output produced by 'show modules'. At least in a development setting, where there may be multiple instances of frr running, it can be handy to be able to id the exact pids, for debugging e.g. Signed-off-by: Mark Stapp <mjs@voltanet.io>
2018-09-08lib: Cleanup include of link.hDonald Sharp
We need link.h for the HAVE_DLINFO_LINKMAP, so include it if we need it for that code path. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-28lib: qmem show changes (header and max)Lou Berger
add header to show qmem, align table with headers add tracking of max # allocs and max bytes alloc'ed Signed-off-by: Lou Berger <lberger@labn.net>
2018-08-08lib: count total memory allocation per MTYPEDavid Lamparter
If malloc_usable_size() or malloc_size() are available, we can count total usage of a particular MTYPE. (Without the functions, we don't know how much to subtract on free.) Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-08build: rework mallinfo test & find malloc_sizeDavid Lamparter
Signed-off-by: David Lamparter <equinox@diac24.net>
2017-07-17*: reindentreindent-master-afterwhitespace / reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14*: remove VTYNL, part 4 of 6David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-13*: ditch vty_outln(), part 1 of 2David Lamparter
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-06-29*: s/VTY_NEWLINE/VTYNL/gQuentin Young
Should be able to fit more vty_out onto one line now Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29*: use vty_outlnQuentin Young
Saves 400 lines Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-15*: make consistent & update GPLv2 file headersDavid Lamparter
The FSF's address changed, and we had a mixture of comment styles for the GPL file header. (The style with * at the beginning won out with 580 to 141 in existing files.) Note: I've intentionally left intact other "variations" of the copyright header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-04-04vtysh: handle "show modules" like "show memory"David Lamparter
Preface with line identifying which daemon it applies to. [Also fixes a missed "plugin" -> "module" replace.] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-03-24lib: add "show modules" CLI commandDavid Lamparter
(for simplicity, this is stuffed in with memory_vty.c) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15build: massively remove needless checksDavid Lamparter
Since we have autoconf results from a wide swath of target platforms, we can go remove checks that have the same result on all systems. This also removes several "fallback" implementations of functions that, at some point in the history, weren't available on all target platforms. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-10-07*: Consolidate all double VIEW_NODE and ENABLE_NODE'sDonald Sharp
If a command is put into the VIEW_NODE, it is going into the ENABLE_NODE as well. This is especially true for show commands. As such if a command is in both consolidate it down to VIEW_NODE. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-10-07bgpd, lib: Remove RESTRICTED_NODE from code baseDonald Sharp
The RESTRICTED_NODE command is not used, introduces code complexity and provides no additional levels of security. The only way to get into RESTRICTED_NODE is to add, under vty configuration the command 'anonymous restricted', and then telnet to a daemon, provide a password, then type 'enable' and fail to enter the password three times. Then the user can enter a very limited set of commands to monitor bgp and only bgp behavior. This commit removes both the RESTRICTED_NODE usage as well as the lib/* usage of the code Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-29lib: Only display memory items that have allocationsDonald Sharp
When displaying memory via a 'show run' only display items that have actual memory allocated. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-19lib: clean/restore memory debugging functionsDavid Lamparter
This adapts the dump-at-exit handler and removes the old leftover code. (Note the text in log_memtype_stderr was actually incorrect as the only caller in bgpd cleans up configuration before calling it, i.e. any remaining allocations are missing-cleanup bugs.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-09-19lib: migrate to new memory-type handlingDavid Lamparter
Move over to the new allocation counting added in the previous commit. (This commit is mostly mechanical.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
2016-09-19lib: add new extensible memory-type handlingDavid Lamparter
This rewrites Quagga's memory per-type allocation counting, without using a fixed global list of types. Instead, source files can declare memory types which get handled through constructor functions called by the dynamic linker during startup. Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com> [DL: v3: forgot "nonnull" attribute on XFREE] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-09-19lib: move memory.[ch] out of the wayDavid Lamparter
The following commit will recreate memory.[ch]. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Vincent JARDIN <vincent.jardin@6wind.com> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>