I will give an example of cable diagnostics on ZyXEL switches, for the test I will take the ZyXEL MES-3528 switch.
An example cable diagnostic command (where 2 is the port number):
cable-diagnostics 2
You can test multiple ports at once:
cable-diagnostics 1-2
Command result example:
cable-diagnostics 2
port 2
cable diagnostics result
pairA: Ok
pairB: Ok
See also my articles:
Cable test on Huawei Quidway S2326
Cable Diagnosis in D-Link Switches