diff options
-rw-r--r-- | src/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -52,8 +52,11 @@ int main(int argc, char* argv[]) { status.nprocs = get_nprocs(); // Store number of processors to make load values more useful - status.nettx = net_x_bytes("wlan0", 't'); - status.netrx = net_x_bytes("wlan0", 'r'); + char* netdev = "wlan0"; + if(getenv("CMON_NETDEV") != NULL) + netdev = getenv("CMON_NETDEV"); + status.nettx = net_x_bytes(netdev, 't'); + status.netrx = net_x_bytes(netdev, 'r'); // Store uptime status.uptime = proc_uptime(); |