Previous page

Next page

Locate page in Contents

Print this page

Viewing Network Traffic Statistics

In Virtuozzo, you can view the current network traffic statistics for virtual machines and Containers using the pnetstat utility. For example:

# pnetstat

UUID Net.Class Input(bytes) Input(pkts) Output(bytes) Output(pkts)

47406484... 0 0 0 0 0

47406484... 1 5867489 37155 58033 1010

49b66605... 0 0 0 0 0

49b66605... 1 7357952 41424 1023555 1023

101 0 0 0 0 0

101 1 58140960 66635 1025931 19408

102 0 0 0 0 0

102 1 0 0 0 0

By default, pnetstat shows network statistics for both virtual machines and Containers. In the example above, this statistics is displayed for two Containers with IDs 101 and 102 and two virtual machines with UUIDs 47406484... and 49b66605... (UUID are truncated for the sake of brevity). Keep in mind that the pnetstat utility displays statistics only about virtual machines and Containers that were started at least once.

The pnetstat utility displays the following information:

Column

Description

UUID

UUID assigned to virtual machine or Container.

Net.Class

ID of the network class for which network statistics is calculated.

Input(bytes)

Amount of incoming traffic, in bytes.

Input(pkts)

Amount of incoming traffic, in packets.

Output(bytes)

Amount of outgoing traffic, in bytes.

Output(pkts)

Amount of outgoing traffic, in packets.

For example, from the command output above, you can see that around 58 MB of data were uploaded to Container 101, (2) about 10 MB were downloaded from it, and all the traffic was exchanged with servers from class 1 networks.

If necessary, you can view network traffic statistics separately for virtual machine or Container by passing the -t option to pnetstat:

  • For Containers only:

    # pnetstat -t ct

    UUID Net.Class Input(bytes) Input(pkts) Output(bytes) Output(pkts)

    101 0 0 0 0 0

    101 1 58140960 66635 1025931 19408

    102 0 0 0 0 0

    102 1 0 0 0 0

  • For virtual machines only:

    # pnetstat -t vm

    UUID Net.Class Input(bytes) Input(pkts) Output(bytes) Output(pkts)

    47406484... 0 0 0 0 0

    47406484... 1 5867489 37155 58033 1010

    49b66605... 0 0 0 0 0

    49b66605... 1 7357952 41424 1023555 1023

You can also view network statistics for a particular virtual machine or Container by specifying its ID after the -v option, for example:

# pnetstat -v 101

UUID Net.Class Input(bytes) Input(pkts) Output(bytes) Output(pkts)

101 0 0 0 0 0

101 1 58140960 66635 1025931 19408

This command displays statistics only for Container 101.