Skip to content

Add network protocol stats to the ContainerStats - #963

Open
JaewonHur wants to merge 1 commit into
apple:mainfrom
JaewonHur:network-protocol-stats
Open

JaewonHur wants to merge 1 commit into
apple:mainfrom
JaewonHur:network-protocol-stats

Conversation

@JaewonHur

Copy link
Copy Markdown
Contributor
  • Add protocols field in ContainerStats proto.

  • Containers share the network namespace, so the reported stats are all identical.

  • Get received/transmitted packets and received/transmitted bytes of the protocols tcp, udp, icmp and ip from Snmp and netstat Linux service. stats of ip are for entire packets and bytes. Bytes are populated only for ip now.

    • Read /proc/<container-pid>/net/snmp, and /proc/<container-pid>/net/netstat and parses the tables.
    • Initialize to 0 if not there.

* Add `protocols` field in `ContainerStats` proto.
* Containers share the network namespace, so the reported stats are all
  identical.
* Get received/transmitted packets and received/transmitted bytes of the
  protocols tcp, udp, icmp and ip from Snmp and netstat Linux service.
  stats of ip are for entire packets and bytes. Bytes are populated only
  for ip now.

  * Read `/proc/<container-pid>/net/snmp`, and
    `/proc/<container-pid>/net/netstat` and parses the tables.
  * Initialize to 0 if not there.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant