Created
November 29, 2018 22:28
-
-
Save ElliotNB/9df95749eafd0982e3386d1dd2200394 to your computer and use it in GitHub Desktop.
Disable all forms of offloading for all network interfaces on the local machine.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
## Disable all NIC offloading | |
## 2018-11-29 10:16 ElliotNB - bug fixes for non-interactive sessions and `sudo su` commands | |
## Licensed under MIT | |
## | |
## This script will disable all forms of offloading on all network interfaces found on | |
## this machine. This script was built to resolve system crashes related to the Xen kernel | |
## and certain hardware. | |
## | |
## Tested on RHEL6 and RHEL7. | |
## | |
## Usage: | |
## | |
## sudo sh disableNicOffloading.sh | |
## | |
for iface in $(ifconfig | cut -d ' ' -f1| tr ':' '\n' | awk NF) | |
do | |
## printf "$iface\n" | |
ethtool -K $iface tso off | |
ethtool -K $iface gso off | |
ethtool -K $iface gro off | |
ethtool -K $iface ufo off | |
ethtool -K $iface sg off | |
ethtool -K $iface highdma off | |
ethtool --offload $iface rx off tx off | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment