Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Getting correct port number from process id Post 303042850 by sravani25 on Wednesday 8th of January 2020 11:27:58 AM
Old 01-08-2020
Hi Rudi,


i need to find exact/correct port number from the process id.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking invoice number not correct

hello, I have the following script to check the invoice number is in order or not. However, it cannot show out the correct information. My expect output show below and I would like to only list out the NOT IN SEQUENCE inovice number (not included "ok") #!/bin/sh start=1 for file_number in... (8 Replies)
Discussion started by: happyv
8 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. UNIX for Dummies Questions & Answers

Find what process on port number

Hi, I am on a Sun Solaris and I want to find out which process is allocated on a certain port. How can I do that? BR Andreas (4 Replies)
Discussion started by: mr_andrew
4 Replies

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

5. Programming

Problem in getting the correct number from the string.

I have string named texts which consist of section label “BOOK-SEC-“. Section starts from 1 to n, where n is a number. For this example conside the value of n is 9. That is, the string variable looks like “BOOK-SEC-1... (2 Replies)
Discussion started by: SamRoj
2 Replies

6. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

7. Shell Programming and Scripting

What is the correct way to process files

Is there a general way I can use so as to process paths/files from your terminal without the need to backslash things? Till recently I used to use touch "file_here" but it does not work if file_here contains any of the characters ` and ", I still need to backslash them if I want to make the... (1 Reply)
Discussion started by: hakermania
1 Replies

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

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

10. 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
socket_from_name(3ncs)													    socket_from_name(3ncs)

Name
       socket_from_name - convert a name and port number to a socket address

Syntax
       #include <idl/c/socket.h>

       void socket_$from_name(family, name, nlength, port, sockaddr, slength,				status)
       unsigned long family;
       socket_$string_t name;
       unsigned long nlength;
       unsigned long port;
       socket_$addr_t *sockaddr;
       unsigned long *slength;
       status_$t *status;

Arguments
       family The  integer  representation  of	an  address  family.   Value  can be socket_$internet or socket_$unspec If the family parameter is
	      socket_$unspec, then the name parameter is scanned for a prefix of family: (for example, ip:).

       name   A string in the format family:host[port], where family:, host, and [port] are all optional.  The family is an address  family.   The
	      only  valid  family  is  ip.   If  you specify a family as part of the name parameter, you must specify socket_$unspec in the family
	      parameter.  The host is a host name.  A leading number sign (#) can be used to indicate that  the  host  name  is  in  the  standard
	      numeric  form (for example, #192.9.8.7).	If host is omitted, the local host name is used.  The port is a port number.  If you spec-
	      ify a port as part of the name parameter, the port parameter is ignored.

       nlength
	      The length, in bytes, of name.

       port   A port number.  If you specify a port number in the name parameter, this parameter is ignored.

       sockaddr
	      A socket address.

       slength
	      The length, in bytes, of sockaddr.

       status The completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it was  success-
	      ful.

Description
       The  routine converts a textual address family, host name, and port number to a socket address.	The address family and the port number can
       be either specified as separate parameters or included in the name parameter.

Files
See Also
       intro(3ncs), socket_family_from_name(3ncs), socket_to_name(3ncs)

															    socket_from_name(3ncs)
All times are GMT -4. The time now is 03:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy