.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "COLLECTDCTL 1" .TH COLLECTDCTL 1 "2020-07-20" "5.11.0.94.g41b1e33" "collectd" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" collectdctl \- Control interface for collectd .SH "SYNOPSIS" .IX Header "SYNOPSIS" collectdctl \fI[options]\fR \fI\fR \fI[command options]\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" collectdctl provides a control interface for collectd, which may be used to interact with the daemon using the \f(CW\*(C`unixsock plugin\*(C'\fR. .SH "OPTIONS" .IX Header "OPTIONS" collectdctl supports the following options: .IP "\fB\-s\fR \fIsocket\fR" 4 .IX Item "-s socket" Path to the \s-1UNIX\s0 socket opened by collectd's \f(CW\*(C`unixsock plugin\*(C'\fR. Default: /var/run/collectd\-unixsock .IP "\fB\-h\fR" 4 .IX Item "-h" Display usage information and exit. .SH "AVAILABLE COMMANDS" .IX Header "AVAILABLE COMMANDS" The following commands are supported: .IP "\fBgetval\fR \fI\fR" 4 .IX Item "getval " Query the latest collected value identified by the specified \&\fI\fR (see below). The value-list associated with that data-set is returned as a list of key-value-pairs, each on its own line. Keys and values are separated by the equal sign (\f(CW\*(C`=\*(C'\fR). .IP "\fBflush\fR [\fBtimeout=\fR\fI\fR] [\fBplugin=\fR\fI\fR] [\fBidentifier=\fR\fI\fR]" 4 .IX Item "flush [timeout=] [plugin=] [identifier=]" Flush the daemon. This is useful, e.\ g., to make sure that the latest values have been written to the respective \s-1RRD\s0 file before graphing them or copying them to somewhere else. .Sp The following options are supported by the flush command: .RS 4 .IP "\fBtimeout=\fR\fI\fR" 4 .IX Item "timeout=" Flush values older than the specified timeout (in seconds) only. .IP "\fBplugin=\fR\fI\fR" 4 .IX Item "plugin=" Flush the specified plugin only. I.\ e., data cached by the specified plugin is written to disk (or network or whatever), if the plugin supports that operation. .Sp Example: \fBrrdtool\fR. .IP "\fBidentifier=\fR\fI\fR" 4 .IX Item "identifier=" If this option is present, only the data specified by the specified identifier (see below) will be flushed. Note that this option is not supported by all plugins (e.\ g., the \f(CW\*(C`network\*(C'\fR plugin does not support this). .RE .RS 4 .Sp The \fBplugin\fR and \fBidentifier\fR options may be specified more than once. In that case, all combinations of specified plugins and identifiers will be flushed only. .RE .IP "\fBlistval\fR" 4 .IX Item "listval" Returns a list of all values (by their identifier) available to the \&\f(CW\*(C`unixsock\*(C'\fR plugin. Each value is printed on its own line. I.\ e., this command returns a list of valid identifiers that may be used with the other commands. .IP "\fBputval\fR \fI\fR [\fBinterval=\fR\fI\fR] \fI\fR" 4 .IX Item "putval [interval=] " Submit one or more values (identified by \fI\fR, see below) to the daemon which will then dispatch them to the write plugins. \fBinterval\fR specifies the interval (in seconds) used to collect the values following that option. It defaults to the default of the running collectd instance receiving the data. Multiple \fI\fR (see below) may be specified. Each of them will be submitted to the daemon. The values have to match the data-set definition specified by the type as given in the identifier (see \&\fBtypes.db\fR\|(5) for details). .SH "IDENTIFIERS" .IX Header "IDENTIFIERS" An identifier has the following format: .PP [\fIhostname\fR/]\fIplugin\fR[\-\fIplugin_instance\fR]/\fItype\fR[\-\fItype_instance\fR] .PP Examples: somehost/cpu\-0/cpu\-idle uptime/uptime otherhost/memory/memory\-used .PP Hostname defaults to the local (non-fully qualified) hostname if omitted. No error is returned if the specified identifier does not exist (this is a limitation in the \f(CW\*(C`libcollectdclient\*(C'\fR library). .SH "VALUE-LIST" .IX Header "VALUE-LIST" A value list describes one data-set as handled by collectd. It is a colon (\f(CW\*(C`:\*(C'\fR) separated list of the time and the values. Each value is either given as an integer if the data-type is a counter, or as a double if the data-type is a gauge value. A literal \f(CW\*(C`U\*(C'\fR is interpreted as an undefined gauge value. The number of values and the data-types have to match the type specified in the identifier (see \fBtypes.db\fR\|(5) for details). The time is specified as epoch (i.\ e., standard \s-1UNIX\s0 time) or as a literal \f(CW\*(C`N\*(C'\fR which will be interpreted as now. .SH "EXAMPLES" .IX Header "EXAMPLES" .ie n .IP """collectdctl flush plugin=rrdtool identifier=somehost/cpu\-0/cpu\-wait""" 4 .el .IP "\f(CWcollectdctl flush plugin=rrdtool identifier=somehost/cpu\-0/cpu\-wait\fR" 4 .IX Item "collectdctl flush plugin=rrdtool identifier=somehost/cpu-0/cpu-wait" Flushes all \s-1CPU\s0 wait \s-1RRD\s0 values of the first \s-1CPU\s0 of the local host. I.\ e., writes all pending \s-1RRD\s0 updates of that data-source to disk. .ie n .IP """for ident in \`collectdctl listval | grep users/users\`; do collectdctl getval $ident; done""" 4 .el .IP "\f(CWfor ident in \`collectdctl listval | grep users/users\`; do collectdctl getval $ident; done\fR" 4 .IX Item "for ident in collectdctl listval | grep users/users; do collectdctl getval $ident; done" Query the latest number of logged in users on all hosts known to the local collectd instance. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBcollectd\fR\|(1), \&\fBcollectd.conf\fR\|(5), \&\fBcollectd\-unixsock\fR\|(5), \&\fBtypes.db\fR\|(5) .SH "AUTHOR" .IX Header "AUTHOR" collectd has been written by Florian Forster and many contributors (see `\s-1AUTHORS\s0'). .PP collectdctl has been written by HXkon J Dugstad Johnsen and Sebastian Harl .