I'm using uclinux and I want to find out which processes are using the serial port. The problem is that I have no lsof or fuser.
Is there any other way I can get this information?
I'm using uclinux and I want to find out which processes are using the serial port. The problem is that I have no lsof or fuser.
Is there any other way I can get this information?
This one-liner should help:
ls -l /proc/[0-9]*/fd/* |grep /dev/ttyS0
replace ttyS0 with actual port name
example output:
lrwx------ 1 root dialout 64 Sep 12 10:30 /proc/14683/fd/3 -> /dev/ttyUSB0
That means the pid 14683 has the /dev/ttyUSB0 open as file descriptor 3