checking usb0

I’d like to figure out how to check if there is a computer plugged into the usb0 port on my BBB running angstrom (2013.09.04). I thought I could do this by checking dmesg, i.e.

$ dmesg | grep usb0

but found that it would sometimes return info even when there wasn’t anything plugged in.

I’d like to use this feature to determine whether the device should go into a “safe mode”, where it doesn’t automatically run a script at boot.

Thanks for any advice.

jay