X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=contrib%2Fcussh.pl;h=ae758d17b14e1600188f57386572a339c6e338f0;hb=de407dd4e036f73e9bd4658af9d71f504fc11109;hp=b2a44eeb160de289c557cb8f21bf8d3464615639;hpb=086400e695e9348d4fba797f1af75505ec8f42e4;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";