blob: c19b22597f4c1067fb10d94b7406ba47738b8b8f [file] [log] [blame]
Jacob Erlbeck45513e62015-10-19 15:14:13 +02001/* OpenBSC stats helper for the VTY */
2/* (C) 2009-2010 by Harald Welte <laforge@gnumonks.org>
3 * (C) 2009-2014 by Holger Hans Peter Freyther
4 * (C) 2015 by Sysmocom s.f.m.c. GmbH
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 */
22
23#include <stdlib.h>
24#include <string.h>
25
26#include "../../config.h"
27
28#include <osmocom/vty/command.h>
29#include <osmocom/vty/buffer.h>
30#include <osmocom/vty/vty.h>
31#include <osmocom/vty/telnet_interface.h>
32#include <osmocom/vty/misc.h>
33
34#define CFG_STATS_STR "Configure stats sub-system\n"
35#define CFG_REPORTER_STR "Configure a stats reporter\n"
36
37#define SHOW_STATS_STR "Show statistical values\n"
38
39DEFUN(show_stats,
40 show_stats_cmd,
41 "show stats",
42 SHOW_STR SHOW_STATS_STR)
43{
44 vty_out_statistics_full(vty, "");
45
46 return CMD_SUCCESS;
47}
48
49void stats_vty_add_cmds(const struct log_info *cat)
50{
51 install_element_ve(&show_stats_cmd);
52}