Use select function to monitore interfaces