LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Obtain the status of all I/O ports connected to system.. (https://www.linuxquestions.org/questions/linux-newbie-8/obtain-the-status-of-all-i-o-ports-connected-to-system-4175455526/)

roshu10 03-25-2013 12:24 PM

Obtain the status of all I/O ports connected to system..
 
hi
how do i get the status of all active I/O ports connected to system ?
As much as i know we can use "lsusb" and "lspci" commands but the problem is it will list all the ports connected to system(it will also list the entries for non active ports also)
how can i solve this problem ??

Any help ??

ukiuki 03-25-2013 12:47 PM

Try this:
Code:

cat /proc/ioports
Also there is a program iotop.

Regards

roshu10 03-25-2013 12:53 PM

thanks for reply
 
Quote:

Originally Posted by ukiuki (Post 4918501)
Try this:
Code:

cat /proc/ioports
Also there is a program iotop.

Regards

thanks for the reply
can you pl tell much more about iotop program
i have already tried this
cat /proc/ioports
but the problem is it will list many unnecessary things too..

i have to write a program in c language and i will use popen() or system() function to call the commands
which should just list the ports(just mention the ports names and their status..

ukiuki 03-25-2013 04:14 PM

You can reduce the output for cat using this method, example to list only dma:
Code:

cat /proc/ioports | grep dma
About iotop is probably available in the repositorie for your distro, it is top style output.

Regards


All times are GMT -5. The time now is 10:18 AM.