Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time. Cannot retrieve contributors at this time
61 lines (53 sloc) 1.15 KB

kernel-mod-cloud-packet-stats

A module for the Linux kernel that counts how many packets to each cloud provider you machine has sent

Installation

Dependencies:

# dnf install gcc make jq curl dig

Build:

$ git clone git@github.com:PauloMigAlmeida/kernel-mod-cloud-packet-stats.git --depth=1
$ cd kernel-mod-cloud-packet-stats
$ make modules

Install:

# insmod kernel_cloud_packet_stats.ko

Verify:

$ dmesg -k

You should see something akin to [ 2923.180487] kernel_cloud_packet_stats: module loaded from 0x00000000b710fd65

View packet counters

$ 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

Reset counters

$ sudo -s
# echo reset > /sys/cloud_packet_stats/aws

Uninstall

# rmmod kernel_cloud_packet_stats

Clean

$ make clean
You can’t perform that action at this time.