HAProxy Enterprise Documentation 2.7r1

show info

Display information about the HAProxy Enterprise process.

Description

The show info command displays information about the HAProxy Enterprise 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

Optionally, you can append the float parameter to output certain fields, normally integers, as floats to improve accuracy.

Default format

The default format for the data shows one field and value per line. Fields and their values are separated by a colon:

$ echo "show info" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.7/hapee-lb.sock
Name: hapee-lb
Version: 2.2.0-1.0.0-235.192
Release_date: 2021/02/05
Nbthread: 2
Nbproc: 1
Process_num: 1

Add the desc parameter to the command to append a description of each line:

$ echo "show info desc" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.7/hapee-lb.sock
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

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.

$ echo "show info typed" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.7/hapee-lb.sock
0.Name.1:POS:str:hapee-lb
1.Version.1:POS:str:2.2.0-1.0.0-235.192
2.Release_date.1:POS:str:2021/02/05
3.Nbthread.1:CGS:u32:2
4.Nbproc.1:CGS:u32:1
5.Process_num.1:KGP:u32:1
6.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:

$ echo "show info typed desc" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.7/hapee-lb.sock
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

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.

$ echo "show info json" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.7/hapee-lb.sock | \
   python3 -m json.tool | \
   less
[
 {
     "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

In the example below, we call show info to see information about the load balancer process:

$ echo "show info" | \
   sudo socat stdio unix-connect:/var/run/hapee-2.7/hapee-lb.sock
Name: hapee-lb
Version: 2.2.0-1.0.0-235.192
Release_date: 2021/02/05
Nbthread: 2
Nbproc: 1
Process_num: 1

See also


Next up

show libs