summaryrefslogtreecommitdiff
path: root/multipathd/main.c
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2010-05-17 14:04:27 -0500
committerChristophe Varoqui <christophe.varoqui@opensvc.com>2010-05-20 06:49:38 +0200
commit69cb2d84466042ae5021740c04703c2cb92f6c1b (patch)
treee2ac0b2e79b6ef7ac54aaca2a092d5fc4fcf0046 /multipathd/main.c
parent8d63b33d0996e141a2451df552b062b908db15bc (diff)
downloadmultipath-tools-69cb2d84466042ae5021740c04703c2cb92f6c1b.tar.gz
multipath-tools-69cb2d84466042ae5021740c04703c2cb92f6c1b.tar.bz2
multipath-tools-69cb2d84466042ae5021740c04703c2cb92f6c1b.zip
multipath: add "count paths" multipathd command
This adds a new multipathd command, "count paths". which returns information in the format Paths: <nr_of_paths> Busy: <True|False> where "Paths" is the number of monitored paths, and "Busy" is set when multipathd is currently handling uevents. With this, it is possible to quickly get the number of paths being monitored, as well as an idea if more paths may be showing up shortly. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Diffstat (limited to 'multipathd/main.c')
-rw-r--r--multipathd/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/multipathd/main.c b/multipathd/main.c
index c247c43..d2c2cc3 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -783,6 +783,7 @@ uxlsnrloop (void * ap)
set_handler_callback(RESTOREQ+MAP, cli_restore_queueing);
set_handler_callback(DISABLEQ+MAPS, cli_disable_all_queueing);
set_handler_callback(RESTOREQ+MAPS, cli_restore_all_queueing);
+ set_handler_callback(COUNT+PATHS, cli_count_paths);
set_handler_callback(QUIT, cli_quit);
umask(077);