A module for the Linux kernel that counts how many packets to each cloud provider your machine has sent
https://deepdives.medium.com/how-much-traffic-from-your-machine-goes-to-the-cloud-63792e670b28
# dnf install gcc make jq curl dig
$ git clone [email protected]:PauloMigAlmeida/kernel-mod-cloud-packet-stats.git --depth=1
$ cd kernel-mod-cloud-packet-stats
$ make modules
# insmod kernel_cloud_packet_stats.ko
$ dmesg -k
You should see something akin to
[ 2923.180487] kernel_cloud_packet_stats: module loaded from 0x00000000b710fd65
$ tail /sys/cloud_packet_stats/*
# Results:
==> /sys/cloud_packet_stats/aws <==
1256
==> /sys/cloud_packet_stats/azure <==
575
==> /sys/cloud_packet_stats/gcp <==
472
Here goes a list of websites that you can use to force counters to go up:
Cloud Provider | URL |
---|---|
AWS | https://www.cloudping.info/ |
GCP | http://www.gcping.com/ |
Azure | https://cloudpingtest.com/azure |
$ sudo -s
# echo reset > /sys/cloud_packet_stats/aws
# rmmod kernel_cloud_packet_stats
$ make clean