03-30-2006
1. When you run the application, run the command: ps -ef | grep name_of_app. This will show you the pids (processes) that are running for your application. Also, regarding the socket connection, unix treats a socket connection as just another file that is opened by the process. However, your application might have a process that is listening to a particular port and then spawns a new process that actually connects to the database.
So it is a bit difficult to tell you something like that.
2. The three conditions that you can see are some of the different conditions that your socket can have. I do not think that you can release sockets/ports without killing the process that is listening on the port.
10 More Discussions You Might Find Interesting
1. Programming
question: for the below program
i just printed the value for pid, child pid and parent pid
why does it give me 6 values? i assume ppid is 28086
but can't figure out why there are 5 values printed instead of just two!
can someone comment on that!
#include<stdio.h>
#define DIM 8
int... (3 Replies)
Discussion started by: a25khan
3 Replies
2. Shell Programming and Scripting
Hi All,
In my project i have two process runs in the back end.
Once i start my project, and execute the command ps, i get below output:
PID TTY TIME CMD
9086 pts/1 0:00 ksh
9241 pts/1 0:02 java
9240 pts/1 0:00 shell_script_bg
java with 9241 PID is the main... (4 Replies)
Discussion started by: rkrgarlapati
4 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I am trying to connect the open socket and its owner PID on my Solaris9 system. But it seems not very easy.
As netstat is not as powerful as it is on Linux platform, without the "-program" option, and "lsof -i <UDP|TCP>@<hostIP>" won't show the one i want although it lists some... (1 Reply)
Discussion started by: sleepy_11
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Discussion started by: samudha
7 Replies
5. UNIX for Dummies Questions & Answers
Hello people,
This question might seem to be a little naive but here it goes:
I want to know the PID of a script that is running in the background.
eg: There is a script called Data_Downloader.sh
I am using the command:
ps -ef | grep Data_Downloader.sh
But I am getting the output as
wrkarea... (9 Replies)
Discussion started by: Rajat
9 Replies
6. Solaris
I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies
7. Shell Programming and Scripting
Hi,
If I use this command netstat | grep "1268" it shows me all IP addresses connected via port 1268, which is half of what I want.
I would like to be able to then map these against a PID on the system, and also thereby get the userid.
I have done a couple of days google bashing but... (3 Replies)
Discussion started by: gcraill
3 Replies
8. Red Hat
Hi,
I want to kill TCP connections which have status as TIME_WAIT & no PID
(as per the output of the "netstat - p" command).
Is there any command/utility available to kill connections to a specific port or IP address.
The problem is that these connections don't have process ID (see... (4 Replies)
Discussion started by: Davinder31may
4 Replies
9. Shell Programming and Scripting
Hello,
I would like to know what this command means?
PID=$!
what does "!" stand for? (5 Replies)
Discussion started by: googlietdr
5 Replies
10. Linux
I have the PID of a process running on Linux mymac 2.6.18-417.el5 #1 SMP Sat Nov 19 14:54:59 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
I need to get the ip & port i.e socket details of the given PID (32752).
Based on a suggestion on my other thread i tried
bash-3.2$ netstat -anpt | grep... (8 Replies)
Discussion started by: mohtashims
8 Replies
LEARN ABOUT CENTOS
ipsec_pf_key
IPSEC_PF_KEY(5) [FIXME: manual] IPSEC_PF_KEY(5)
NAME
ipsec_pf_key - lists PF_KEY sockets registered with KLIPS
SYNOPSIS
cat /proc/net/pf_key
STACK
Note that pf_key is only supported on the KLIPS and MAST stacks. It is not supported on any other stack.
DESCRIPTION
/proc/net/pf_key is a read-only file which lists the presently open PF_KEY sockets on the local system and their parameters.
Each line lists one PF_KEY socket. A table entry consists of:
+
sock pointer (sock)
+
PID of the socket owner (pid)
+
flag to indicate if the socket is dead (d)
+
socket wait queue (sleep)
+
socket pointer (socket)
+
next socket in chain (next)
+
previous socket in chain (prev)
+
last socket error (e)
+
pointer to destruct routine (destruct)
+
is this a reused socket (r)
+
has this socket been zapped (z)
+
socket family to which this socket belongs (fa)
+
local port number (n)
+
protocol version number (p)
+
Receive queue bytes committed (r)
+
Transmit queue bytes committed (w)
+
option memory allocations (o)
+
size of send buffer in bytes (sndbf)
+
timestamp in seconds (stamp)
+
socket flags (Flags)
+
socket type (Type)
+
connection state (St)
EXAMPLES
c3b8c140 3553 0 c0599818 c05997fc 0 0 0 0 1 0 15 0 2 0 0 0 65535 0.103232 00000000 00000003 01
shows that there is one pf_key socket set up that starts at c3b8c140, whose owning process has PID 3553, the socket is not dead, its wait
queue is at c0599818, whose owning socket is at c05997fc, with no other sockets in the chain, no errors, no destructor, it is a reused
socket which has not been zapped, from protocol family 15 (PF_KEY), local port number 0, protocol socket version 2, no memory allocated to
transmit, receive or option queues, a send buffer of almost 64kB, a timestamp of 0.103232, no flags set, type 3, in state 1.
FILES
/proc/net/pf_key
SEE ALSO
ipsec(8), ipsec_manual(8), ipsec_eroute(5), ipsec_spi(5), ipsec_spigrp(5), ipsec_klipsdebug(5), ipsec_tncfg(8), ipsec_version(5)
HISTORY
Written for the Linux FreeS/WAN project <http://www.freeswan.org/> by Richard Guy Briggs.
[FIXME: source] 10/06/2010 IPSEC_PF_KEY(5)