Results 1 to 1 of 1
I'm in the process of porting some BSD code over to Linux. One of the functions we need to duplicate is related to performance statistics (network, CPU, hdd, etc). Right ...
- 11-10-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 11
Need to collect network performance stats
I'm in the process of porting some BSD code over to Linux. One of the functions we need to duplicate is related to performance statistics (network, CPU, hdd, etc). Right now I'm working on the network data. The structure I have to fill up looks like this:
I accessed some kernel structures in BSD to collect a lot of this information, and naturally this code is completely wrong for Linux. Can someone suggest where I should look to get these fields filled in for Linux? Thanks!Code:typedef struct { string *ifcId; int64 linkState; int64 baudrate; int64 rxPkts; int64 rxPktsErrors; int64 txPkts; int64 txPktsErrors; int64 collisions; int64 rxBytes; int64 txBytes; int64 rxPktsMcast; int64 txPktsMcast; int64 iDrops; } platform_perf_net_attributes;


Reply With Quote