From: Florian Forster Date: Wed, 26 Aug 2009 09:31:24 +0000 (+0200) Subject: contrib/cussh.pl: Add synopsis for specific commands. X-Git-Tag: collectd-4.6.5~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e391ecd14e8c0f153d46e11213e0effc662ff3b8;p=collectd.git contrib/cussh.pl: Add synopsis for specific commands. You can now do HELP FLUSH to get information about the FLUSH command. --- diff --git a/contrib/cussh.pl b/contrib/cussh.pl index 7357ad78..320bf73b 100755 --- a/contrib/cussh.pl +++ b/contrib/cussh.pl @@ -186,7 +186,14 @@ sub putid { =cut sub cmd_help { - print < < < [ ...] + +Submits a value to the daemon. +HELP + getval => < + +Retrieves the current value or values from the daemon. +HELP + flush => <] [timeout=] [identifier=] [...] + +Sends a FLUSH command to the daemon. +HELP + listval => < < [...] message= + +Sends a notifications message to the daemon. +HELP + ); + + if (!$cmd) + { + $cmd = 'help'; + } + if (!exists ($text{$cmd})) + { + print STDOUT "Unknown command: " . uc ($cmd) . "\n\n"; + $cmd = 'help'; + } + + print STDOUT $text{$cmd}; + return 1; } # cmd_help