Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-29-2004, 12:02 PM   #1
Registered: Jan 2004
Distribution: Redhat
Posts: 31

Rep: Reputation: 15
Perl program to list listening ports

Hi everybody,

I am writing a server monitoring script and I would like to list the listening ports on my machine. The program is written in Perl and it will run on (mostly) Redhat systems. Is there a better way to do it than grab the output of netstat?

Old 07-29-2004, 01:57 PM   #2
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Unless there's something in a /proc file somewhere, short of recurvesively going through 60 some odd thousand ports ( which is a bad idea on several levels ), not really.


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
Quick Question about listening ports nevarlen Linux - Newbie 9 06-24-2005 03:40 PM
how to minimize listening ports johnnydangerous Fedora 19 02-13-2005 03:15 PM
Ports listening? dareino Linux - Networking 2 03-31-2004 08:40 AM
Listening SuSE 9 ports uniQ Linux - Security 9 01-24-2004 12:48 AM
XDM listening to ports tarballedtux Linux - Security 7 04-28-2002 05:25 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:42 AM.

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