summaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/unix/cj.c35
-rw-r--r--vlib/vlib/unix/cli.c6
-rw-r--r--vlib/vlib/unix/dir.dox3
-rw-r--r--vlib/vlib/unix/main.c53
4 files changed, 94 insertions, 3 deletions
diff --git a/vlib/vlib/unix/cj.c b/vlib/vlib/unix/cj.c
index 553b450ffaa..33ba163abca 100644
--- a/vlib/vlib/unix/cj.c
+++ b/vlib/vlib/unix/cj.c
@@ -17,6 +17,16 @@
*------------------------------------------------------------------
*/
+/**
+ * @file
+ * Circular joournal diagnostic mechanism.
+ *
+ * The @c cj thread-safe circular log buffer scheme is occasionally useful
+ * when chasing bugs. Calls to it should not be checked in.
+ */
+/*? %%clicmd:group_label Circular Journal %% ?*/
+/*? %%syscfg:group_label Circular Journal %% ?*/
+
#include <stdio.h>
#include <vlib/vlib.h>
@@ -94,6 +104,18 @@ cj_config (vlib_main_t * vm, unformat_input_t * input)
return 0;
}
+/*?
+ * Configure the circular journal diagnostic mechanism. This is only useful
+ * if you, the deveoper, have written code to make use of the circular
+ * journal.
+ *
+ * @cfgcmd{records, &lt;number&gt;}
+ * Configure the number of records to allocate for the circular journal.
+ *
+ * @cfgcmd{on}
+ * Enable the collection of records in the circular journal at the
+ * earliest opportunity.
+?*/
VLIB_CONFIG_FUNCTION (cj_config, "cj");
void
@@ -220,10 +242,21 @@ cj_command_fn (vlib_main_t * vm,
return 0;
}
+/*?
+ * Enable, disable the collection of diagnostic data into a
+ * circular journal or dump the circular journal diagnostic data.
+ * This is only useful if you, the deveoper, have written code to make
+ * use of the circular journal.
+ *
+ * When dumping the data it is formatted and sent to @c stderr of the
+ * VPP process; when running VPP in <code>unix interactive</code> mode
+ * this is typically the same place as the Debug CLI.
+?*/
+
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (cj_command,static) = {
.path = "cj",
- .short_help = "cj",
+ .short_help = "cj <enable | disable | dump>",
.function = cj_command_fn,
};
/* *INDENT-ON* */
diff --git a/vlib/vlib/unix/cli.c b/vlib/vlib/unix/cli.c
index bf09ee0cce2..69fca6ec7bc 100644
--- a/vlib/vlib/unix/cli.c
+++ b/vlib/vlib/unix/cli.c
@@ -42,7 +42,8 @@
* Provides a command line interface so humans can interact with VPP.
* This is predominantly a debugging and testing mechanism.
*/
-/*? %%clicmd:group_label Debug CLI %% ?*/
+/*? %%clicmd:group_label Command line session %% ?*/
+/*? %%syscfg:group_label Command line session %% ?*/
#include <vlib/vlib.h>
#include <vlib/unix/unix.h>
@@ -2504,6 +2505,9 @@ unix_cli_config (vlib_main_t * vm, unformat_input_t * input)
return 0;
}
+/*?
+ * This module has no configurable parameters.
+?*/
VLIB_CONFIG_FUNCTION (unix_cli_config, "unix-cli");
/** Called when VPP is shutting down, this restores the system
diff --git a/vlib/vlib/unix/dir.dox b/vlib/vlib/unix/dir.dox
index cdded0f19d3..1380fa56b37 100644
--- a/vlib/vlib/unix/dir.dox
+++ b/vlib/vlib/unix/dir.dox
@@ -23,5 +23,6 @@
VLIB application library Unix interface layer.
*/
-/*? %%clicmd:group_label VLIB Unix stuff%% ?*/
+/*? %%clicmd:group_label Unix Interface %% ?*/
+/*? %%syscfg:group_label Unix Interface %% ?*/
diff --git a/vlib/vlib/unix/main.c b/vlib/vlib/unix/main.c
index 3087c283d9e..562778e0e5d 100644
--- a/vlib/vlib/unix/main.c
+++ b/vlib/vlib/unix/main.c
@@ -407,6 +407,59 @@ unix_config (vlib_main_t * vm, unformat_input_t * input)
}
/* unix { ... } configuration. */
+/*?
+ *
+ * @cfgcmd{interactive}
+ * Attach CLI to stdin/out and provide a debugging command line interface.
+ * Implies @c nodaemon.
+ *
+ * @cfgcmd{nodaemon}
+ * Do not fork or background the VPP process. Typically used when invoking
+ * VPP applications from a process monitor.
+ *
+ * @cfgcmd{exec, &lt;filename&gt;}
+ * @par <code>startup-config &lt;filename&gt;</code>
+ * Read startup operational configuration from @c filename.
+ * The contents of the file will be performed as though entered at the CLI.
+ * The two keywords are aliases for the same function; if both are specified,
+ * only the last will have an effect.
+ *
+ * @cfgcmd{log, &lt;filename&gt;}
+ * Logs the startup configuration and all subsequent CLI commands in
+ * @c filename.
+ * Very useful in situations where folks don't remember or can't be bothered
+ * to include CLI commands in bug reports.
+ *
+ * @cfgcmd{full-coredump}
+ * Ask the Linux kernel to dump all memory-mapped address regions, instead
+ * of just text+data+bss.
+ *
+ * @cfgcmd{cli-listen, &lt;address:port&gt;}
+ * Bind the CLI to listen at the address and port given. @clocalhost
+ * on TCP port @c 5002, given as <tt>cli-listen localhost:5002</tt>,
+ * is typical.
+ *
+ * @cfgcmd{cli-line-mode}
+ * Disable character-by-character I/O on stdin. Useful when combined with,
+ * for example, <tt>emacs M-x gud-gdb</tt>.
+ *
+ * @cfgcmd{cli-prompt, &lt;string&gt;}
+ * Configure the CLI prompt to be @c string.
+ *
+ * @cfgcmd{cli-history-limit, &lt;nn&gt;}
+ * Limit commmand history to @c nn lines. A value of @c 0
+ * disables command history. Default value: @c 50
+ *
+ * @cfgcmd{cli-no-banner}
+ * Disable the login banner on stdin and Telnet connections.
+ *
+ * @cfgcmd{cli-no-pager}
+ * Disable the output pager.
+ *
+ * @cfgcmd{cli-pager-buffer-limit, &lt;nn&gt;}
+ * Limit pager buffer to @c nn lines of output.
+ * A value of @c 0 disables the pager. Default value: @c 100000
+?*/
VLIB_CONFIG_FUNCTION (unix_config, "unix");
static clib_error_t *