One way to go about this is by checking the blockchain height or the last 100 signatures of blocks to understand if your node is on a fork or not (compare block generators and signatures)
You can use the restapi with swagger on different nodes to compare block # on both. looking for different generators in the same block height.
Know how Blockchain works in depth by enrolling in Blockchain Course.