LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-25-2013, 12:24 PM   #1
roshu10
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Rep: Reputation: Disabled
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 ??
 
Old 03-25-2013, 12:47 PM   #2
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Try this:
Code:
cat /proc/ioports
Also there is a program iotop.

Regards
 
1 members found this post helpful.
Old 03-25-2013, 12:53 PM   #3
roshu10
LQ Newbie
 
Registered: Mar 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks for reply

Quote:
Originally Posted by ukiuki View Post
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..

Last edited by roshu10; 03-25-2013 at 12:55 PM. Reason: for more simplification
 
Old 03-25-2013, 04:14 PM   #4
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
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
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
opening ports on a windows pc connected to a linux box which serves as a gateway fieska Linux - Security 4 06-02-2009 02:19 AM
Wireless status connected, cannot ping router. vivekjoshi Linux - Wireless Networking 3 02-27-2009 10:19 AM
Obtain file system info with df AQG Solaris / OpenSolaris 1 08-02-2007 09:18 PM
what software I use to monitoring status of cisco ports. xcore_on Linux - Networking 4 07-15-2007 06:00 PM
Check for status of Serial ports in any language? BongFish Programming 11 09-11-2003 02:46 AM


All times are GMT -5. The time now is 07:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration