Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to find out what is running on COM port (tty0). I tried dmesg | grep tty0 but it didn't show me anything about tty0 port. How can I get this information? Thanks

share|improve this question
1  
tty0 is not a COM port; it refers to the current virtual console. COM ports start with ttyS, e.g. ttyS0. – grawity May 17 '12 at 11:39
    
Also, could you clarify what you mean by "what module is running"? What exactly is a module here? – grawity May 17 '12 at 15:05
    
It is a Zigbee module, for wireless communication. – cracq May 17 '12 at 15:39
up vote 1 down vote accepted

Assuming that by "COM port" (which is Windows-specific terminology) you mean serial port, it is in fact ttyS0.

If you want to find what's on the first virtual console, tty0, you can do a ps -e | grep tty0. To find out what's using the serial port, fuser /dev/ttyS0 will give the pids of any relevant processes.

share|improve this answer
    
yes, I meant ttyS0. fuser /dev/ttyS0 doesn't show me anything, nor does lsof /dev/ttyS0. Actually, I've now entered dmesg |grep ttyS0 and I've gotten this: [ 1.282940] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a NS16550A. I don't understand the output, how can I find out the module running on COM port from this output? – cracq May 17 '12 at 13:00
    
The problem is solved, I managed to find out what is running on ttyS0 port by running those 2 command. I don't know why it didn't work yesterday. Thank you all for your answers. – cracq May 18 '12 at 11:23

You can try lsof. For all the devices, you can also run

lsof /dev
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .