I recently discovered a really cool command for Cisco 3560 switches.
It has a TDR (Time-domain reflectometer). It basically means you can test how long the cable is, if it has a short, pair of wires open and any other problem. More info available here from cisco.
Switch# test cable-diagnostics tdr interface g0/1
TDR test started on interface Gi0/1
A TDR test can take a few seconds to run on an interface
Use ‘show cable-diagnostics tdr’ to read the TDR results.
Switch# sh cable-diagnostics tdr int g0/1
TDR test last run on: March 01 00:09:06
Interface Speed Local pair Pair length Remote pair Pair status
——— —– ———- —————— ———– ——————–
Gi0/1 auto Pair A 20 +/- 4 meters N/A Open
Pair B 20 +/- 4 meters N/A Open
Pair C 21 +/- 4 meters N/A Open
Pair D 20 +/- 4 meters N/A Open