How to detect if master port in a switch is connected or not

As soon as at least one slave is connected, the master port gets a running state and ‘link-ok’ status, rate will be ‘10Mbps’ and full-duplex will be ‘no’.

I am trying to make a script to find possibly misconfigured ports/switches (mostly half-dubplex), but the master port gives me false positives, when not connected, and I can’t seem to find a way to distingues the two situations, does anyone have an idea?

I have the same situation: master-port is left unconnected and show status rate 10 Mbps.

I still haven’t found a solution.

Same situation, master port in 10mb/sec half duplex if disconnected.
If master port changed state (connect/disconnect), all slaves do redetection.

CRS125-24G
master-port ether2
Clipboard01.jpg