Zilla Runtime CLI
Zilla Runtime CLI
The Zilla Runtime command line interface uses the Zilla Runtime Configuration to control and observe the Zilla runtime.
Commands
zilla dump
Feature Coming Soon
This is currently on the Zilla roadmap. Star and watch the Zilla repo for new releases!
The zilla dump
command creates a pcap
file that can be opened in Wireshark. Using the Zilla dissector plugin, Wireshark shows detailed information about the internal state of the current Zilla instance.
<affinity>
-a --affinity Only dump the frames that match the specified affinity mask.
<bindings>
-b --bindings Only dump the frames for the specified bindings.
<plugin-directory>
-i --install Install the dissector plugin zilla.lua
to the plugin directory of Wireshark. This is only necessary if you run the dump
command for the first time or if you want to update the plugin to the current version.
To find the Wireshark plugin directory navigate the menu: About Wireshark -> Folders -> Personal Lua Plugins; or use this command:
tshark -G folders | grep "Personal Lua Plugins"
To find out the plugin version navigate the menu: About Wireshark -> Plugins -> search: zilla; or use this command:
tshark -G plugins | grep zilla
You may need to reload Lua plugins from the menu: Analyze -> Reload Lua Plugins or with the keyboard shortcut (Command+Shift+L or Ctrl+Shift+L).
Example:
./zilla dump -v -w zilla.pcap -i ~/.local/lib/wireshark/plugins
-v --verbose
Show verbose output
<output>
-w --write Write the pcap
output to this file.
Example:
./zilla dump -v -w zilla.pcap
zilla generate
Feature Coming Soon
This is currently on the Zilla roadmap. Star and watch the Zilla repo for new releases!
The zilla generate
command generates a zilla configuration file from an OpenAPI or AsyncAPI service definition.
The command currently has templates for the following common scenarios:
openapi.http.proxy
- create an http proxy config based on an OpenAPI service definitionasyncapi.http.proxy
- create an http proxy config based on an AsyncAPI service definitionasyncapi.mqtt.proxy
- create an mqtt proxy config based on an AsyncAPI service definition
You have to specify which template to use, the OpenAPI/AsyncAPI service definition as the input file and the output file name you want the generated zilla config to be saved.
zilla generate -t <template> -i <input-file> -o <output-file>
<template>
-t --template The template to use for the config generation.
<input-file>
-i --input The OpenAPI/AsyncAPI service definition.
<output-file>
-o --output The file name you want the generated zilla config to be saved.
Example:
./zilla generate -t asyncapi.http.proxy -i my-asyncapi-service.yaml -o zilla.yaml
zilla help
The zilla help
command shows help information about available commands, or more information for a specific command.
zilla help [command]
Examples:
./zilla help start
zilla metrics
The zilla metrics
command provides metrics for each binding in the configuration.
zilla metrics
Optionally specify a binding name to output metrics for that binding only.
zilla metrics [binding-name]
<namespace>
--namespace Filters bindings by namespace
Examples:
./zilla metrics echo_server
namespace binding metric value
example echo_server stream.opens.received 24
example echo_server stream.opens.sent 24
example echo_server stream.closes.received 24
example echo_server stream.closes.sent 24
example echo_server stream.data.received 13
example echo_server stream.data.sent 13
example echo_server stream.errors.received 0
example echo_server stream.errors.sent 0
zilla start
The zilla start
command resolves the Zilla Runtime Configuration in a zilla.yaml
to start the runtime engine.
zilla start
started
-v --verbose
Show verbose output
zilla start -v
name: example
bindings:
tcp:
type: tcp
kind: server
options:
host: 0.0.0.0
port:
- 12345
- 12346
exit: echo
echo:
type: echo
kind: server
started
--workers
Defaults to # CPU cores available
Worker count
zilla stop
The zilla stop
command signals the runtime engine to stop.
zilla stop
stopped
zilla tune
Feature Coming Soon
This is currently on the Zilla roadmap. Star and watch the Zilla repo for new releases!
The zilla tune
command tunes the mapping from runtime engine workers to bindings.
zilla tune [NAME=VALUE]
./zilla tune
xxxx example.tcp
xxxx example.echo
./zilla tune example.echo=2
..x. example.echo
./zilla tune
xxxx example.tcp
.x.. example.echo