LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Perl program to list listening ports (https://www.linuxquestions.org/questions/programming-9/perl-program-to-list-listening-ports-211084/)

doza 07-29-2004 12:02 PM

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?

Thanks,
doza

Technoslave 07-29-2004 01:57 PM

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.


All times are GMT -5. The time now is 11:22 PM.