From deathwing00.org
This check is great to detect when a network cable for whatever reason deteriorates and stops providing the desired up-link speed. It works perfectly for any system that has ethtool installed.
This particular check has helped me as a sysadmin to detect bad quality cables that, after being reused many times, end up deteriorating and do not let me get 1Gbps in RJ-45 CAT 5E cables. I have also been able to detect network card failures, and also malfunctioning switch ports.
Download the file: check_physical_link