Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Find what process on port number Post 302267295 by zaxxon on Friday 12th of December 2008 05:30:08 AM
Old 12-12-2008
Code:
lsof -p <pidofyourprocess> | grep -E "TCP|UDP"

It should show something like (I took apache2 in my example):
Code:
apache2 30941 root    4u  IPv6 264107             TCP *:www (LISTEN)
apache2 30941 root    6u  IPv6 264112             TCP *:webcache (LISTEN)

You can check this service names (www and webcache) in your /etc/services to get the port number.
 

10 More Discussions You Might Find Interesting

1. HP-UX

To find pid from port number

Hi, I am working on HP-UX Release 11i. I want to find the process id (PID) of the process running on a particular port. lsof command fuser does not work on this system. Please suggest some alternative. Thanks (6 Replies)
Discussion started by: gmat
6 Replies

2. UNIX for Dummies Questions & Answers

How to find the port number of the oracle process

Hi Unix Gurus, Can we find out the port number used by the oracle process is running.I tried to search the forum but coudnt find. Can anyone help me out with the command (2 Replies)
Discussion started by: thana
2 Replies

3. Solaris

How to find the process that is using the port 80 and apache server.

How to find the process that is using the port 80 and apache server. When i used the command 'netstat -a|grep 80' it given that port 80 is in listening mode. I had used the following command: telnet localhost 80 GET / I had got some HTML script. But when I accessed the GUI ( url is... (7 Replies)
Discussion started by: vamshikrishnab
7 Replies

4. UNIX for Advanced & Expert Users

find out unix port number

Please could some advise me the command to find out the unix port number. regards venhart (4 Replies)
Discussion started by: venhart
4 Replies

5. Shell Programming and Scripting

Find port number being used by a given process id

Unix gurus, I have a requirement wherein I want to find the port number for a given process id. Is it possible? If so how? TIA, Regards, Praveen (3 Replies)
Discussion started by: sunpraveen
3 Replies

6. AIX

How to find what process is using a port in AIX 5L and above.

There have been a lot of threads about how to find processes that are using a specific port on an AIX server. After long hours of research and reading countless "you can't do that" responses, I finally found the answer. YES IT CAN BE DONE! YES ITS EASY. NO, I DON'T KNOW WHY NO ONE GETS THIS... (2 Replies)
Discussion started by: troym72
2 Replies

7. Solaris

To get process id for port number

Hi All, How to get the list of port numbers and it is correspoding proceses id that are currently running on. Please suggest and it is urgent Thanks. (7 Replies)
Discussion started by: rbalaj16
7 Replies

8. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

9. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

10. UNIX for Beginners Questions & Answers

Getting correct port number from process id

Hi All, i am trying to find the Jobss port number(either default port number or any other port number assigned) from the running process id. But it's giving me multiple port numbers when searching with netstat command. Can someone help me in finding the correct port number from the... (3 Replies)
Discussion started by: sravani25
3 Replies
APACHE2(8)                                                            apache2                                                           APACHE2(8)

NAME
apache2 - Apache Hypertext Transfer Protocol Server SYNOPSIS
apache2 [ -d serverroot ] [ -f config ] [ -C directive ] [ -c directive ] [ -D parameter ] [ -e level ] [ -E file ] [ -k start|restart|graceful|stop|graceful-stop ] [ -R directory ] [ -h ] [ -l ] [ -L ] [ -S ] [ -t ] [ -v ] [ -V ] [ -X ] [ -M ] SUMMARY
apache2 is the Apache HyperText Transfer Protocol (HTTP) server program. It is designed to be run as a standalone daemon process. When used like this it will create a pool of child processes or threads to handle requests. In general, apache2 should not be invoked directly, but rather should be invoked via /etc/init.d/apache2 or apache2ctl. The default Debian configuration requires environment variables that are defined in /etc/apache2/envvars and are not available if apache2 is started directly. However, apache2ctl can be used to pass arbitrary arguments to apache2. DOCUMENTATION
The full documentation is available in the apache2-doc package or at http://httpd.apache.org/docs/2.2/ . Information about Debian specific changes and configuration can be found in /usr/share/doc/apache2/README.Debian.gz . OPTIONS
-d serverroot Set the initial value for the ServerRoot directive to serverroot. This can be overridden by the ServerRoot directive in the configu- ration file. -f config Uses the directives in the file config on startup. If config does not begin with a /, then it is taken to be a path relative to the ServerRoot. The default is /etc/apache2/apache2.conf. -k start|restart|graceful|stop|graceful-stop Signals apache2 to start, restart, or stop. See Stopping Apache for more information. -C directive Process the configuration directive before reading config files. -c directive Process the configuration directive after reading config files. -D parameter Sets a configuration parameter which can be used with <IfDefine> sections in the configuration files to conditionally skip or process commands at server startup and restart. -e level Sets the LogLevel to level during server startup. This is useful for temporarily increasing the verbosity of the error messages to find problems during startup. -E file Send error messages during server startup to file. -R directory When the server is compiled using the SHARED_CORE rule, this specifies the directory for the shared object files. -h Output a short summary of available command line options. -l Output a list of modules compiled into the server. This will not list dynamically loaded modules included using the LoadModule directive. -L Output a list of directives together with expected arguments and places where the directive is valid. -M Dump a list of loaded Static and Shared Modules. -S Show the settings as parsed from the config file (currently only shows the virtualhost settings). -t Run syntax tests for configuration files only. The program immediately exits after these syntax parsing tests with either a return code of 0 (Syntax OK) or return code not equal to 0 (Syntax Error). If -D DUMP_VHOSTS is also set, details of the virtual host con- figuration will be printed. If -D DUMP_MODULES is set, all loaded modules will be printed. -v Print the version of apache2, and then exit. -V Print the version and build parameters of apache2, and then exit. -X Run apache2 in debug mode. Only one worker will be started and the server will not detach from the console. SEE ALSO
apache2ctl(8), /usr/share/doc/apache2/README.Debian.gz Apache HTTP Server 2008-04-05 APACHE2(8)
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy