Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

under Solaris, find which program is serving a tcp port?

Posted on 2003-03-17
6
Medium Priority
?
410 Views
Last Modified: 2013-12-21
Hi, without root permission, how do I find out the program listening
to a paticular tcp port under Solaris?

Thx.
Sean
0
Comment
Question by:xzhang4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 160 total points
ID: 8155962
use "netstat" command:

   eg:
    netstat -a | grep LISTEN | grep port-no

    check port 80:

    netstat -a | grep LISTEN | grep 80

man netstat
to learn more details
0
 
LVL 6

Assisted Solution

by:bummerlord
bummerlord earned 160 total points
ID: 8156468
That would be true for netstat shipped with recent(?) Linux distributions.
Not Solaris netstat though... (unsure about Sol9)

If you have the administrator install "lsof" on the system, you could use "lsof -i :80" to list processes bound to port 80 for instance (and alot more...).

/b

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 8158361
get and install lsof http://www.sunfreeware.com/
0
 
LVL 8

Expert Comment

by:JIEXA
ID: 8309271
man fuser
0
 
LVL 18

Expert Comment

by:liddler
ID: 10475249

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Points split yuzh & bummerlord

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question