.\" Man page generated from reStructuredText. . .TH VARNISH-CLI 7 "" "" "" .SH NAME varnish-cli \- Varnish Command Line Interface . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH DESCRIPTION .sp Varnish has a command line interface (CLI) which can control and change most of the operational parameters and the configuration of Varnish, without interrupting the running service. .sp The CLI can be used for the following tasks: .INDENT 0.0 .TP .B configuration You can upload, change and delete VCL files from the CLI. .TP .B parameters You can inspect and change the various parameters Varnish has available through the CLI. The individual parameters are documented in the varnishd(1) man page. .TP .B bans Bans are filters that are applied to keep Varnish from serving stale content. When you issue a ban Varnish will not serve any \fIbanned\fP object from cache, but rather re\-fetch it from its backend servers. .TP .B process management You can stop and start the cache (child) process though the CLI. You can also retrieve the latest stack trace if the child process has crashed. .UNINDENT .sp If you invoke varnishd(1) with \-T, \-M or \-d the CLI will be available. In debug mode (\-d) the CLI will be in the foreground, with \-T you can connect to it with varnishadm or telnet and with \-M varnishd will connect back to a listening service \fIpushing\fP the CLI to that service. Please see \fIvarnishd(1)\fP for details. .SS Syntax .sp The Varnish CLI is similar to another command line interface, the Bourne Shell. Commands are usually terminated with a newline, and they may take arguments. The command and its arguments are \fItokenized\fP before parsing, and as such arguments containing spaces must be enclosed in double quotes. .sp It means that command parsing of .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C help banner .ft P .fi .UNINDENT .UNINDENT .sp is equivalent to .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C "help" banner .ft P .fi .UNINDENT .UNINDENT .sp because the double quotes only indicate the boundaries of the \fBhelp\fP token. .sp Within double quotes you can escape characters with \e (backslash). The \en, \er, and \et get translated to newlines, carriage returns, an tabs. Double quotes and backslashes themselves can be escaped with \e" and \e\e respectively. .sp To enter characters in octals use the \ennn syntax. Hexadecimals can be entered with the \exnn syntax. .sp Commands may not end with a newline when a shell\-style \fIhere document\fP (here\-document or heredoc) is used. The format of a here document is: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C << word here document word .ft P .fi .UNINDENT .UNINDENT .sp \fIword\fP can be any continuous string chosen to make sure it doesn\(aqt appear naturally in the following \fIhere document\fP\&. Traditionally EOF or END is used. .SS Quoting pitfalls .sp Integrating with the Varnish CLI can be sometimes surprising when quoting is involved. For instance in Bourne Shell the delimiter used with here documents may or may not be separated by spaces from the \fB<<\fP token: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C cat <\(aq Line 1 Pos 1) < .INDENT 0.0 .INDENT 3.5 Authenticate. .UNINDENT .UNINDENT .SS backend.list [\-p] [] .INDENT 0.0 .INDENT 3.5 List backends. \-p also shows probe status. .UNINDENT .UNINDENT .SS backend.set_health [auto|healthy|sick] .INDENT 0.0 .INDENT 3.5 Set health status on the backends. .UNINDENT .UNINDENT .SS ban [&& ...] .INDENT 0.0 .INDENT 3.5 Mark obsolete all objects where all the conditions match. .UNINDENT .UNINDENT .sp See \fIvcl(7)_ban\fP for details .SS ban.list .INDENT 0.0 .INDENT 3.5 List the active bans. .sp The output format is: .INDENT 0.0 .IP \(bu 2 Time the ban was issued. .IP \(bu 2 Objects referencing this ban. .IP \(bu 2 \fBC\fP if ban is completed = no further testing against it. .IP \(bu 2 if \fBlurker\fP debugging is enabled: .INDENT 2.0 .IP \(bu 2 \fBR\fP for req.* tests .IP \(bu 2 \fBO\fP for obj.* tests .IP \(bu 2 Pointer to ban object .UNINDENT .IP \(bu 2 Ban specification .UNINDENT .UNINDENT .UNINDENT .SS banner .INDENT 0.0 .INDENT 3.5 Print welcome banner. .UNINDENT .UNINDENT .SS help [] .INDENT 0.0 .INDENT 3.5 Show command/protocol help. .UNINDENT .UNINDENT .SS panic.clear [\-z] .INDENT 0.0 .INDENT 3.5 Clear the last panic, if any, \-z will clear related varnishstat counter(s) .UNINDENT .UNINDENT .SS panic.show .INDENT 0.0 .INDENT 3.5 Return the last panic, if any. .UNINDENT .UNINDENT .SS param.set .INDENT 0.0 .INDENT 3.5 Set parameter value. .UNINDENT .UNINDENT .SS param.show [\-l] [|changed] .INDENT 0.0 .INDENT 3.5 Show parameters and their values. .UNINDENT .UNINDENT .sp The long form with \fB\-l\fP shows additional information, including documentation and minimum, maximum and default values, if defined for the parameter. If a parameter is specified with \fB\fP, show only that parameter. If \fBchanged\fP is specified, show only those parameters whose values differ from their defaults. .SS ping [] .INDENT 0.0 .INDENT 3.5 Keep connection alive. .UNINDENT .UNINDENT .SS quit .INDENT 0.0 .INDENT 3.5 Close connection. .UNINDENT .UNINDENT .SS start .INDENT 0.0 .INDENT 3.5 Start the Varnish cache process. .UNINDENT .UNINDENT .SS status .INDENT 0.0 .INDENT 3.5 Check status of Varnish cache process. .UNINDENT .UNINDENT .SS stop .INDENT 0.0 .INDENT 3.5 Stop the Varnish cache process. .UNINDENT .UNINDENT .SS storage.list .INDENT 0.0 .INDENT 3.5 List storage devices. .UNINDENT .UNINDENT .SS vcl.discard .INDENT 0.0 .INDENT 3.5 Unload the named configuration (when possible). .UNINDENT .UNINDENT .SS vcl.inline [auto|cold|warm] .INDENT 0.0 .INDENT 3.5 Compile and load the VCL data under the name provided. .sp Multi\-line VCL can be input using the here document \fIref_syntax\fP\&. .UNINDENT .UNINDENT .SS vcl.label