my friend have been written a linux kernel module to count traffic which gets through his tor node.
https://github.com/edwardoid/nc_mod
counter data gets available to user as a file in /proc directory.
#linux #network #traffic #counter #tor #kernel #module #programming