Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
/ netcost Public archive

use BPF to calculate network ingress/egress for specified CIDRs

License

Notifications You must be signed in to change notification settings

kinvolk/netcost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netcost

How to use

docker run --rm --privileged --net=host -ti docker.io/kinvolk/netcost netcost -ifindex 3 -netlist 192.168.0.0/16,127.0.0.0/8,10.0.0.0/8,0.0.0.0/0 -pretty
{
    "timestamp": "2020-08-07T17:05:36+02:00",
    "networks": {
        "0.0.0.0/0": {
            "ingressBytes": 1756,
            "egressBytes": 2097
        },
        "10.0.0.0/8": {
            "ingressBytes": 0,
            "egressBytes": 0
        },
        "127.0.0.0/8": {
            "ingressBytes": 0,
            "egressBytes": 0
        },
        "192.168.0.0/16": {
            "ingressBytes": 0,
            "egressBytes": 0
        }
    }
}

About

use BPF to calculate network ingress/egress for specified CIDRs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published