summaryrefslogtreecommitdiffstats
path: root/src/vty/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* vty/osmo_counter: use name if description is NULLAlexander Couzens2016-10-131-1/+5
| | | | | | | | | | | `show stats` shows (null) for osmocom_counters when description is null. OpenBSC> show stats Ungrouped counters: (null): 4 Change-Id: I553b88a6fca688924b1f2b49e8cb17e90f057bb1
* stat: Explicitly support stat_items without unitJacob Erlbeck2015-12-081-1/+4
| | | | | | | Add OSMO_STAT_ITEM_NO_UNIT for stat items without an unit. The statsd reporter uses gauges ("g") to report them. Sponsored-by: On-Waves ehf
* stats/vty: Add selective show stats commandJacob Erlbeck2015-08-221-2/+16
| | | | | | | | | | | | | | | | Currently there is only the 'show stats' command which shows all counter and stat_item values. This can lead to many lines of output if there are per-subscriber rate counters. The new command added by this commit allows it to only show groups of a certain level (class_id), similar to the 'level' configuration command for stats reporter. The new command is show stats level (global|peer|subscriber) Sponsored-by: On-Waves ehf
* stats: Add osmo_ name prefix to identifiersJacob Erlbeck2015-11-021-8/+8
| | | | | | | | | | Since the the stat_item and stats functions and data types are meant to be exported, they get an osmo_ prefix. Sponsored-by: On-Waves ehf [hfreyther: Prepended the enum values too. This was requested by Jacob]
* stat/vty: Add vty_out_statistics_full to show all statisticsJacob Erlbeck2015-10-281-0/+58
| | | | | | | This functions shows the state of all osmo_counters, stat_item groups, and counter groups. Sponsored-by: On-Waves ehf
* stat/vty: Use the iterator algorithms to show ctrg and statgJacob Erlbeck2015-10-281-20/+43
| | | | | | | | | | Currently the groups for stat_items and counter are iterated manually. This commit makes use of the new iterator functions to access the single elements via handlers. Sponsored-by: On-Waves ehf
* stats: Add vty_out_stat_item_groupJacob Erlbeck2015-10-281-0/+22
| | | | | | This functions dumps a whole stat item group to the VTY. Sponsored-by: On-Waves ehf
* vty: Support multi-char separators and end stringsJacob Erlbeck2013-08-061-4/+5
| | | | | In vty_cmd_string_from_valstr() include the real string lengths of the sep and end arguments into the buffer size calculation.
* vty: Fix misusage of snprintf in vty/utils.cJacob Erlbeck2013-08-061-2/+2
| | | | | | | | | | | | | | | Compiled with ubuntu 1204 (precise), where -Wformat-security is enabled by -Wall. Test yields ok, but the current implementation doesn't properly support multi-character separators and end strings. So the test output is truncated. Addresses: utils.c: In function 'vty_cmd_string_from_valstr': utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security] utils.c:84:2: warning: format not a string literal and no format arguments [-Wformat-security] utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security] utils.c:108:2: warning: format not a string literal and no format arguments [-Wformat-security]
* vty: Address compiler warning about tolowerHolger Hans Peter Freyther2012-09-111-0/+1
| | | | | | | Include ctype.h to have a declaration of tolower. utils.c: In function 'vty_cmd_string_from_valstr': utils.c:95:6: warning: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
* import vty_cmd_string_from_valstr() from osmo-btsHarald Welte2012-08-201-0/+54
| | | | | This function is able to generate a VTY help string based on an array of 'struct value_string'.
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* doxygen: Add (partial) VTY API documentationHarald Welte2011-08-171-0/+13
|
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-4/+4
| | | | | | | | | | | | This patch moves all GSM-specific definitions to include/osmocom/gsm. Moreover, the headers in include/osmocore/ have been moved to include/osmocom/core. This has been proposed by Harald Welte and Sylvain Munaunt. Tested with `make distcheck'. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
* Create libosmovty as library from OpenBSC VTY functionsHarald Welte2010-05-251-0/+50