How do I sense the status of a connector plugged to my PCB socket. Eg. DB9 connector in my PCB. when one inserts or removes the cable I've to sense it.
You have not provided much in the way of details so I am stabbing in the dark. If you have a couple of spare pins then you can use a loop of wire between the two pins in the cable connector. Then you can connect a pullup on one of the pins on the board and ground on the other pin. Then when the connector is unplugged the pin with the pullup is high and then when you plug the connector in, the pullup will be pulled to ground.
I have a 8 pin circular male connector solder to my PCB board. In that 1 pin is Not Used.
I've to sense when a female connector is plugged or un-plugged form it. I just need some kind of voltage signal that is 3.3V for plugged out and 0V for plugged in.
It is likely that one of the pins in the 8 pin connector is ground. You should be able to tie the single unused connector pin to that ground (inside the backshell). Then on your board you can connect that pin to a pullup resistor. On the board you can sense the state of that pin on the connector. When no connector is plugged in then the signal being monitored on the board will be at the voltage to which it is being pulled up. When the connector is plugged in, the signal being monitored will be tied to ground.