Sysbox: counters

Sysbox: counters

Usage: counters [OPTION]... DEV_NAME DEV_UNIT

Display device (or service) counters. The counters that can be displayed depends on the device, not on this tool. Some devices will grant many counters, some devices none.

The argument DEV_NAME will be used as the name of the device to open, and the argument DEV_UNIT will be the unit number to use.

The counters are key-value pairs, where the key is always a string, and the value is always and integer. The meaning of the counters are highly device specific.

In some cases the DEV_UNIT is meaningless (whatever the device got always reply the same counters), in some cases they are used to simulate a simple menu system. See the counters tcpip example below.

Options:

Examples:

$ counters tcpip 0
unit help: 0
unit state: 1
unit ni_list: 2
unit ni_detail: 3
unit protocols: 4
unit ilcb: 5
unit tlcb: 6
unit alcb: 7
unit sock_list: 8
unit sock_detail: 9
$
$ counters tcpip 1
num_loaded_protos: 9
num_nifaces: 2
num_virt_nifaces: 0
num_free_mbufs: 4194
num_free_extbufs: 2048
num_free_rxp: 256
num_free_txp: 256
MBUF_SIZE: 512
MBUF_COUNT: 4200
EXTBUF_COUNT: 2048
MAX_SOCKETS: 2048
FIRST_USER_PORT: 49152
LAST_USER_PORT: 65535
$
$ counters tmpfs 0
0/files_open: 0
0/files_max: 2048
0/dirs_open: 0
0/dirs_max: 512
1/files_open: 0
1/files_max: 2048
1/dirs_open: 0
1/dirs_max: 512
$
$ counters -h tmpfs 0
0/files_open: 0x0
0/files_max: 0x800
0/dirs_open: 0x0
0/dirs_max: 0x200
1/files_open: 0x0
1/files_max: 0x800
1/dirs_open: 0x0
1/dirs_max: 0x200
$