Change in libosmocore[master]: vty: add "show pid"

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Mon Jul 12 16:26:04 UTC 2021


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/24925 )


Change subject: vty: add "show pid"
......................................................................

vty: add "show pid"

Related: OS#4609
Change-Id: Ib636050afc1eed134f450f2f1cdd3b51153b0160
---
M src/vty/command.c
1 file changed, 8 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/24925/1

diff --git a/src/vty/command.c b/src/vty/command.c
index 854c379..e747add 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -3040,6 +3040,13 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(show_pid,
+      show_pid_cmd, "show pid", SHOW_STR "Displays the process ID\n")
+{
+	vty_out(vty, "%i%s", getpid(), VTY_NEWLINE);
+	return CMD_SUCCESS;
+}
+
 DEFUN(show_uptime,
       show_uptime_cmd, "show uptime", SHOW_STR "Displays how long the program has been running\n")
 {
@@ -4365,6 +4372,7 @@
 	install_node(&config_node, config_write_host);
 
 	/* Each node's basic commands. */
+	install_lib_element(VIEW_NODE, &show_pid_cmd);
 	install_lib_element(VIEW_NODE, &show_uptime_cmd);
 	install_lib_element(VIEW_NODE, &show_version_cmd);
 	install_lib_element(VIEW_NODE, &show_online_help_cmd);

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/24925
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib636050afc1eed134f450f2f1cdd3b51153b0160
Gerrit-Change-Number: 24925
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210712/cbc2dfc1/attachment.htm>


More information about the gerrit-log mailing list