Reference
show info
Display information about the load balancer process.
Description Jump to heading
The show info
command displays information about the load balancer process, such as its software version, number of threads, uptime, and process ID.
You can format the data as:
- Default format, one field and value per line
- Typed
- JSON
As of version 2.4r1
, you can append the optional float
parameter to output certain fields, normally integers, as floats to improve accuracy.
Default format Jump to heading
The default format for the data shows one field and value per line. Fields and their values are separated by a colon:
nix
echo "show info" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show info" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext
Name: hapee-lbVersion: 2.2.0-1.0.0-235.192Release_date: 2021/02/05Nbthread: 2Nbproc: 1Process_num: 1
outputtext
Name: hapee-lbVersion: 2.2.0-1.0.0-235.192Release_date: 2021/02/05Nbthread: 2Nbproc: 1Process_num: 1
Add the desc
parameter to the command to append a description of each line:
nix
echo "show info desc" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show info desc" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext
Name: hapee-lb:"Product name"Version: 2.2.0-1.0.0-235.192:"Product version"Release_date: 2021/02/05:"Date of latest source code update"Nbthread: 2:"Number of started threads (global.nbthread)"Nbproc: 1:"Number of started worker processes (global.nbproc)"Process_num: 1:"Relative worker process number (1..Nbproc)"Pid: 12170:"This worker process identifier for the system"
outputtext
Name: hapee-lb:"Product name"Version: 2.2.0-1.0.0-235.192:"Product version"Release_date: 2021/02/05:"Date of latest source code update"Nbthread: 2:"Number of started threads (global.nbthread)"Nbproc: 1:"Number of started worker processes (global.nbproc)"Process_num: 1:"Relative worker process number (1..Nbproc)"Pid: 12170:"This worker process identifier for the system"
Typed format Jump to heading
Specify the typed
parameter to enable the typed format. Similar to the default format, each field is on its own line, but it uses a different way to categorize fields.
nix
echo "show info typed" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show info typed" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext
0.Name.1:POS:str:hapee-lb1.Version.1:POS:str:2.2.0-1.0.0-235.1922.Release_date.1:POS:str:2021/02/053.Nbthread.1:CGS:u32:24.Nbproc.1:CGS:u32:15.Process_num.1:KGP:u32:16.Pid.1:SGP:u32:12170
outputtext
0.Name.1:POS:str:hapee-lb1.Version.1:POS:str:2.2.0-1.0.0-235.1922.Release_date.1:POS:str:2021/02/053.Nbthread.1:CGS:u32:24.Nbproc.1:CGS:u32:15.Process_num.1:KGP:u32:16.Pid.1:SGP:u32:12170
Each line begins with a dot-delimited value (e.g. 0.Name.1
) that has these fields:
- the numeric position of the field in the list starting at zero
- the field name
- the process number starting at 1
The rest of the values are separated by colons. They break down as follows:
- three letters that correspond to the field’s origin, nature, and scope of the variable:
Parameter | Letter | Meaning |
---|---|---|
Origin | M | Metric |
S | Status | |
K | Key | |
C | Config | |
P | Product | |
Nature | G | Gauge |
L | limit | |
m | min | |
M | max | |
R | rate | |
C | counter | |
D | duration | |
A | age | |
T | time | |
N | name | |
O | output | |
a | average | |
Scope | P | process |
S | service | |
s | system | |
C | cluster |
- the field’s type (e.g.
str
for string and u32 for unsigned 32-bit integer). - the value itself.
For example:
Field position | Field name | Process number | Origin, nature, and scope | Field type | Field Value |
---|---|---|---|---|---|
3 | Nbthread | 1 | CGS | u32 | 2 |
Add the desc
parameter to the command to append a description of each line:
nix
echo "show info typed desc" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show info typed desc" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext
0.Name.1:POS:str:hapee-lb:"Product name"1.Version.1:POS:str:2.2.0-1.0.0-235.192:"Product version"2.Release_date.1:POS:str:2021/02/05:"Date of latest source code update"3.Nbthread.1:CGS:u32:2:"Number of started threads (global.nbthread)"4.Nbproc.1:CGS:u32:1:"Number of started worker processes (global.nbproc)"5.Process_num.1:KGP:u32:1:"Relative worker process number (1..Nbproc)"6.Pid.1:SGP:u32:12170:"This worker process identifier for the system"
outputtext
0.Name.1:POS:str:hapee-lb:"Product name"1.Version.1:POS:str:2.2.0-1.0.0-235.192:"Product version"2.Release_date.1:POS:str:2021/02/05:"Date of latest source code update"3.Nbthread.1:CGS:u32:2:"Number of started threads (global.nbthread)"4.Nbproc.1:CGS:u32:1:"Number of started worker processes (global.nbproc)"5.Process_num.1:KGP:u32:1:"Relative worker process number (1..Nbproc)"6.Pid.1:SGP:u32:12170:"This worker process identifier for the system"
JSON format Jump to heading
Specify the json
parameter to enable the JSON format. To make it human-readable, pipe the result to a JSON formatting tool, such as Python’s json.tool
.
nix
echo "show info json" | \sudo socat stdio tcp4-connect:127.0.0.1:9999 | \python3 -m json.tool | \less
nix
echo "show info json" | \sudo socat stdio tcp4-connect:127.0.0.1:9999 | \python3 -m json.tool | \less
outputjson
[{"field": {"pos": 0,"name": "Name"},"processNum": 1,"tags": {"origin": "Product","nature": "Output","scope": "Service"},"value": {"type": "str","value": "hapee-lb"}},{"field": {"pos": 1,"name": "Version"},"processNum": 1,"tags": {"origin": "Product","nature": "Output","scope": "Service"},"value": {"type": "str","value": "2.2.0-1.0.0-235.192"}},
outputjson
[{"field": {"pos": 0,"name": "Name"},"processNum": 1,"tags": {"origin": "Product","nature": "Output","scope": "Service"},"value": {"type": "str","value": "hapee-lb"}},{"field": {"pos": 1,"name": "Version"},"processNum": 1,"tags": {"origin": "Product","nature": "Output","scope": "Service"},"value": {"type": "str","value": "2.2.0-1.0.0-235.192"}},
The format of the JSON document is described in a schema, which you can get by calling show schema json
.
Examples Jump to heading
In the example below, we call show info
to see information about the load balancer process:
nix
echo "show info" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "show info" | \sudo socat stdio tcp4-connect:127.0.0.1:9999
outputtext
Name: hapee-lbVersion: 2.2.0-1.0.0-235.192Release_date: 2021/02/05Nbthread: 2Nbproc: 1Process_num: 1
outputtext
Name: hapee-lbVersion: 2.2.0-1.0.0-235.192Release_date: 2021/02/05Nbthread: 2Nbproc: 1Process_num: 1
See also Jump to heading
Do you have any suggestions on how we can improve the content of this page?