X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fcussh.pl;fp=contrib%2Fcussh.pl;h=ae758d17b14e1600188f57386572a339c6e338f0;hb=79c87aeda9172e219a842e393c6499c8bf37662a;hp=b2a44eeb160de289c557cb8f21bf8d3464615639;hpb=e6a052ab22a285b1c6e91fb8678168fd1ffdca92;p=collectd.git diff --git a/contrib/cussh.pl b/contrib/cussh.pl index b2a44eeb..ae758d17 100755 --- a/contrib/cussh.pl +++ b/contrib/cussh.pl @@ -187,7 +187,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 @@ -354,7 +400,7 @@ sub flush { $args{"timeout"} = $value; } elsif ($option eq "identifier") { - my $id = getid (\$value); + my $id = getid ($value); if (!$id) { print STDERR "Not a valid identifier: \"$value\"\n";