Sponsored Content
Full Discussion: Find PID for a port
Top Forums UNIX for Dummies Questions & Answers Find PID for a port Post 302649967 by vbe on Friday 1st of June 2012 09:46:19 AM
Old 06-01-2012
Code:
ant:/home/vbe $ ps -ef|grep [t]tp
     www  1823  1808  0  Sep  6  ?         0:00 /opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
     www  1825  1808  0  Sep  6  ?         0:00 /opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
    root  1808     1  0  Sep  6  ?        22:48 /opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
     www  1810  1808  0  Sep  6  ?         0:00 /opt/hpws/apache/bin/httpd -d /opt/hpws/apache -k start
     www 13502  9312  0  May 15  ?         0:00 /opt/apache/bin/httpd
     www 15985  9312  0  Apr 30  ?         0:00 /opt/apache/bin/httpd
     www 10748  9312  0  May 31  ?         0:00 /opt/apache/bin/httpd
    root  9312     1  0  Oct 25  ?        14:57 /opt/apache/bin/httpd
     www 12327  9312  0  May 21  ?         0:00 /opt/apache/bin/httpd
     www 15213  9312  0  May  8  ?         0:00 /opt/apache/bin/httpd
     www 19945  9312  0  Apr  4  ?         0:00 /opt/apache/bin/httpd

Since the port 8082 is listened by httpd and as you can see above there can be many, I dont see how you want to point to a unique unless you have more precision we are unaware of ( and still I doubt...).
 

8 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. Shell Programming and Scripting

how to find only PID value

When I run ps -aef | grep aaa.exe it gives out put user 5091 5518 0 10:13:25 pts/1 0:00 grep aaa.exe user 4647 2479 0 09:26:31 ? 0:25 /kk/zzz/user/xxx/bin/aaa.exe user1 1111 2222 0 08:26:31 ? 0:25 /kk/zzz/user1/xxx/bin/aaa.exe I need Only PID value ie... (5 Replies)
Discussion started by: madhusmita
5 Replies

3. UNIX for Dummies Questions & Answers

pid from port number in AIX

Hello guys, How to shut down a port number in AIX. May be first I need to find out what is the process ID of that process that listens to this particular port.. Is there any command to find a process ID from the port number other than "lsof". thanks (1 Reply)
Discussion started by: solaix14
1 Replies

4. Shell Programming and Scripting

Get opened port with given PID?

i want to get tomcat listening port , from a command. ps -ef | grep catalina | grep -v "grep catalina" | grep -v "catalina.out" | awk '{print $2}' | head -1 output : ----- 1234 Now with this 1234 i need to know , in which port my tomcat is running... i tried , netstat -ao | grep... (14 Replies)
Discussion started by: linuxadmin
14 Replies

5. HP-UX

Find port for Pid

Hi, Is this the most appropriate way of finding the listen port number given the pid is "16659" ? lsof -Pan -i tcp -i udp | grep 16659 | grep -i "listen"If so, how can I extract "7001" and assign it to a variable say myport=7001 from the below output which happens to be actual port number? ... (1 Reply)
Discussion started by: mohtashims
1 Replies

6. UNIX for Advanced & Expert Users

Find PID using a Port?

Hi, I do not have root user credentials nor do I have the functional id of the process that uses port 80. How can I find the pid of the process using the port number 80 ? Operating System: Linux (6 Replies)
Discussion started by: mohtashims
6 Replies

7. 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

8. UNIX for Beginners Questions & Answers

Bash script, find the next closed (not in use) port from some port range.

hi, i would like to create a bash script that check which port in my Linux server are closed (not in use) from a specific range, port range (3000-3010). the print output need to be only 1 port, and it will be nice if the output will be saved as a variable or in same file. my code is: ... (2 Replies)
Discussion started by: yossi
2 Replies
bup-margin(1)						      General Commands Manual						     bup-margin(1)

NAME
bup-margin - figure out your deduplication safety margin SYNOPSIS
bup margin [options...] DESCRIPTION
bup margin iterates through all objects in your bup repository, calculating the largest number of prefix bits shared between any two entries. This number, n, identifies the longest subset of SHA-1 you could use and still encounter a collision between your object ids. For example, one system that was tested had a collection of 11 million objects (70 GB), and bup margin returned 45. That means a 46-bit hash would be sufficient to avoid all collisions among that set of objects; each object in that repository could be uniquely identified by its first 46 bits. The number of bits needed seems to increase by about 1 or 2 for every doubling of the number of objects. Since SHA-1 hashes have 160 bits, that leaves 115 bits of margin. Of course, because SHA-1 hashes are essentially random, it's theoretically possible to use many more bits with far fewer objects. If you're paranoid about the possibility of SHA-1 collisions, you can monitor your repository by running bup margin occasionally to see if you're getting dangerously close to 160 bits. OPTIONS
--predict Guess the offset into each index file where a particular object will appear, and report the maximum deviation of the correct answer from the guess. This is potentially useful for tuning an interpolation search algorithm. --ignore-midx don't use .midx files, use only .idx files. This is only really useful when used with --predict. EXAMPLE
$ bup margin Reading indexes: 100.00% (1612581/1612581), done. 40 40 matching prefix bits 1.94 bits per doubling 120 bits (61.86 doublings) remaining 4.19338e+18 times larger is possible Everyone on earth could have 625878182 data sets like yours, all in one repository, and we would expect 1 object collision. $ bup margin --predict PackIdxList: using 1 index. Reading indexes: 100.00% (1612581/1612581), done. 915 of 1612581 (0.057%) SEE ALSO
bup-midx(1), bup-save(1) BUP
Part of the bup(1) suite. AUTHORS
Avery Pennarun <apenwarr@gmail.com>. Bup unknown- bup-margin(1)
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy