FAQ: How to unload NIC driver (clear ifconfig counters)?

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

Question: I want to reset counters in /proc/net/dev (also shown in ifconfig output as RX and TX bytes) and thus I have to unload network interface driver. How to do it?

Answer: There are two commands in Linux CLI coming by default which would help to unload drivers: rmmod and modprobe. First of all it is necessary to find what kernel module controls certain NIC and then unload that module. For example, you have VIA VT6102 (RHINE-II) network card that is recognized by Linux as eth0 and want to disable its driver temporarily. Just execute the following:

"sudo rmmod via-rhine" or "sudo modprobe -r eth0" (or "sudo modprobe -r via-rhine"). You can use command dmesg to determine the name of kernel module you wish to unload.

Share This
 
 
» You might also be interested in the following articles:
Creative Sound Blaster X-Fi Linux driver
Linux history: 0.02 and 0.03 releases memories
Utility to install ATI or NVIDIA proprietary drivers in Ubuntu and Debian
Manage FreeBSD kernel modules on the fly
Get Wi-Fi working on Dell Inspiron 1501 with Ubuntu



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!


1 Response to “FAQ: How to unload NIC driver (clear ifconfig counters)?”


  1. 1 M Audio Blog » Blog Archive » FAQ: How to unload NIC driver?

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | LinuxHaxor.net | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
CyberCapital.Org | G-LOADED! | The Linux Alternative Project
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››