iMacMonitor
This is an app running on the display iMac that monitors the Thunderbolt bus.
iMacMonitor is a small application running on the “display” iMac that monitors the Thunderbolt bus and automatically switches to Target Display Mode if necessary.