|
struct rate_ctr_group * | rate_ctr_group_alloc (void *ctx, const struct rate_ctr_group_desc *desc, unsigned int idx) |
|
static void | rate_ctr_group_upd_idx (struct rate_ctr_group *grp, unsigned int idx) |
|
void | rate_ctr_group_set_name (struct rate_ctr_group *grp, const char *name) |
|
struct rate_ctr * | rate_ctr_group_get_ctr (struct rate_ctr_group *grp, unsigned int idx) |
|
void | rate_ctr_group_free (struct rate_ctr_group *grp) |
|
void | rate_ctr_add (struct rate_ctr *ctr, int inc) |
|
static void | rate_ctr_add2 (struct rate_ctr_group *ctrg, unsigned int idx, int inc) |
|
static void | rate_ctr_inc (struct rate_ctr *ctr) |
|
static void | rate_ctr_inc2 (struct rate_ctr_group *ctrg, unsigned int idx) |
|
int64_t | rate_ctr_difference (struct rate_ctr *ctr) |
|
int | rate_ctr_init (void *tall_ctx) |
|
struct rate_ctr_group * | rate_ctr_get_group_by_name_idx (const char *name, const unsigned int idx) |
|
const struct rate_ctr * | rate_ctr_get_by_name (const struct rate_ctr_group *ctrg, const char *name) |
|
int | rate_ctr_for_each_counter (struct rate_ctr_group *ctrg, rate_ctr_handler_t handle_counter, void *data) |
|
int | rate_ctr_for_each_group (rate_ctr_group_handler_t handle_group, void *data) |
|
void | rate_ctr_reset (struct rate_ctr *ctr) |
|
void | rate_ctr_group_reset (struct rate_ctr_group *ctrg) |
|
static | LLIST_HEAD (rate_ctr_groups) |
|
static bool | rate_ctrl_group_desc_validate (const struct rate_ctr_group_desc *desc) |
|
static char * | mangle_identifier_ifneeded (const void *ctx, const char *in) |
|
static struct rate_ctr_group_desc * | rate_ctr_group_desc_mangle (void *ctx, const struct rate_ctr_group_desc *desc) |
|
static unsigned int | rate_ctr_get_unused_name_idx (const char *name) |
|
static void | interval_expired (struct rate_ctr *ctr, enum rate_ctr_intv intv) |
|
static void | rate_ctr_group_intv (struct rate_ctr_group *grp) |
|
static int | rate_ctr_timer_cb (struct osmo_fd *ofd, unsigned int what) |
|
static int | rate_ctr_handler (struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *vctx_) |
|
void | vty_out_rate_ctr_group2 (struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg, bool skip_zero) |
| print a rate counter group to given VTY
|
|
void | vty_out_rate_ctr_group (struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg) |
|
static char * | pad_append_str (char *s, const char *a, int minwidth) |
|
static char * | pad_append_ctr (char *s, uint64_t ctr, int minwidth) |
|
static int | rate_ctr_handler_fmt (struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *vctx_) |
|
void | vty_out_rate_ctr_group_fmt2 (struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg, bool skip_zero) |
| print a rate counter group to given VTY, formatting the line for each counter according to a format string.
|
|
void | vty_out_rate_ctr_group_fmt (struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg) |
|
static int | rate_ctr_group_handler (struct rate_ctr_group *ctrg, void *vctx_) |
|
void vty_out_rate_ctr_group_fmt2 |
( |
struct vty * |
vty, |
|
|
const char * |
fmt, |
|
|
struct rate_ctr_group * |
ctrg, |
|
|
bool |
skip_zero |
|
) |
| |
print a rate counter group to given VTY, formatting the line for each counter according to a format string.
The following format string directives are supported:
- d: The description of the counter
- n: The name of the counter
- c: The current value of the counter
- p: The previous value of the counter
- S: The interval of the counter in seconds
- M: The interval of the counter in minutes
- H: The interval of the counter in hours
- D: The interval of the counter in days
- %%: Print a literal %.
An optional number between % and the letter in a format directive may be used to set a minimum field width. If the expanded format directive is smaller than this width (according to strlen()) the string will be left-padded (if the number is positive) or right-padded (if the number is negative) with spaces. For example, "%25n" prints the counter name left-padded up to a minimum width of 25 columns.
VTY_NEWLINE will be appended to the format string when it is printed.
- Parameters
-
[in] | vty | The VTY to which it should be printed |
[in] | ctrg | Rate counter group to be printed |
[in] | fmt | A format which may contain the above directives. |
[in] | skip_zero | Skip all zero-valued counters |
References rate_ctr_for_each_counter(), rate_ctr_handler_fmt(), vty_out_context::skip_zero, and vty_out_context::vty.
Referenced by rate_ctr_group_handler(), and vty_out_rate_ctr_group_fmt().