Sponsored Content
Full Discussion: Process PID
Top Forums Shell Programming and Scripting Process PID Post 83335 by nir_s on Wednesday 14th of September 2005 05:01:04 AM
Old 09-14-2005
Hi,

First step - from the OS, issue the following command:

Code:
ps -ef | grep oracle

The second column is the PID.
You can also run "top" and check the column "PID"

second step - run the following query in the database as user SYSTEM:
Code:
set pagesize 100
set linesize 1000
COL USERNAME FOR A8
COL MACHINE FOR A22
COL PROGRAM FOR A30
COL OS_USER FOR A8
COL PROCESS FOR A10
COL SPID FOR A6
COL SID FOR A5
SELECT UPPER(s.USERNAME) USERNAME,
UPPER(s.osuser) OS_USER,
UPPER(s.PROGRAM) PROGRAM,UPPER(s.MACHINE) MACHINE,
UPPER(PROCESS) PROCESS,
UPPER(p.spid) SPID,
UPPER(s.sid) SID,
UPPER(s.serial#) ser
FROM V$SESSION s ,
sys.v_$sess_io si,  sys.v_$process p
WHERE
s.username is not null and
si.sid(+)=s.sid
and p.addr(+)=s.paddr
ORDER BY SPID;

The column SPID in this query is equal to PID in the OS.
From this query you'll detect which program/user belong to the OS PID.

Nir
 

10 More Discussions You Might Find Interesting

1. Programming

Child Process PID

Hi, Can anybody solve this query? A parent process forks 2 child processes. How does the child process know it's PID without the parent process sending it. Apart from the "ps-ef" option, what other options are there if any? (2 Replies)
Discussion started by: skannan
2 Replies

2. Solaris

getting pid of process

hi all, Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have. a) kick start the executable b) get the pid c) bind it to a... (10 Replies)
Discussion started by: Naanu
10 Replies

3. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

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

4. Shell Programming and Scripting

Get an PID of particular process

Hi I have written a shell script to find and kill the particular process. Here in shell script i have written the code like cnt = $(ps -ef | grep Shree) echo $cnt I am getting the output root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp Here I want to... (2 Replies)
Discussion started by: Shreedhar Naik
2 Replies

5. Shell Programming and Scripting

getting pid from a process

Hi all, i was able to redirect pid of process to a file in the following way ps aux|awk '$11 == "/Applications/ProjectX/DServer" >> /Applications/ProjectX/DServer.pid it works fine but if one folder name caontains space its not working like below ps aux|awk '$11 == "/Applications/Project\... (1 Reply)
Discussion started by: kirankumars
1 Replies

6. Programming

[C] Process pid by name

Hi I use linux OS. I've already written a function that allow me to get the process name by pid. (searching in /proc). Now I'd like to perform the inverse task.I mean get the process pid by its name. I could write a function that search in every folder in /proc for the process name, but i... (2 Replies)
Discussion started by: Dedalus
2 Replies

7. AIX

AIX: PID 0 Process

Hi All, I searched other threads and could not find any relevant post about this. I searched for process 0 in SUN OS and could find the sched/swapper process listed. root 0 0 0 Apr 25 ? 0:06 sched but i couldnt not find the swapper process (PID 0) in AIX. Is that... (4 Replies)
Discussion started by: quintet
4 Replies

8. HP-UX

PID Process Resources

Hi all. I need to get detailed information about a PID. I have an app called Reflection X and it shows many things like Total CPU percent, User CPU (Nice) percent, FS Reads, etc. My question is how can I get all that information on console? Is there an archive with the detailed... (9 Replies)
Discussion started by: the0m3n
9 Replies

9. AIX

Swapper Process #PID more than 1

Hi I would like to know more about swapper process.. I knew that swapper is the first process with PID#0, used to perform process swap operations. It used to swap entire processes But sometimes I find swapper process with PID#264 So my doubt is how many swapper process can exist in a system?... (2 Replies)
Discussion started by: Priya Amaresh
2 Replies

10. AIX

How to get process name from PID?

HI, i used ps -ef | grep 3539052 | grep -v grep and i got a output like ths root 3539052 3407918 0 May 07 - 709:31 /usr/sbin/syslogd but what i need is instead of full path /usr/sbin/syslogd i want only the process name that is 'syslogd' here. (3 Replies)
Discussion started by: sumanthupar
3 Replies
NETRESTRICT(5)							AFS File Reference						    NETRESTRICT(5)

NAME
NetRestrict - Defines interfaces not to register with AFS servers DESCRIPTION
There are two NetRestrict files, one for an AFS client and one for an AFS File Server or database server. The AFS client NetRestrict file specifies the IP addresses that the client should not register with the File Servers it connects to. The server NetRestrict file specifies what interfaces should not be registered with AFS Database Servers or used to talk to other database servers. Client NetRestrict The NetRestrict file, if present in a client machine's /etc/openafs directory, defines the IP addresses of the interfaces that the local Cache Manager does not register with a File Server when first establishing a connection to it. For an explanation of how the File Server uses the registered interfaces, see NetInfo(5). As it initializes, the Cache Manager constructs a list of interfaces to register, from the /etc/openafs/NetInfo file if it exists, or from the list of interfaces configured with the operating system otherwise. The Cache Manager then removes from the list any addresses that appear in the NetRestrict file, if it exists. The Cache Manager records the resulting list in kernel memory. The NetRestrict file is in ASCII format. One IP address appears on each line, in dotted decimal format. The order of the addresses is not significant. The value 255 is a wildcard that represents all possible addresses in that field. For example, the value 192.12.105.255 indicates that the Cache Manager does not register any of the addresses in the 192.12.105 subnet. To display the addresses the Cache Manager is currently registering with File Servers, use the fs getclientaddrs command. Server NetRestrict The NetRestrict file, if present in the /var/lib/openafs/local directory, defines the following: o On a file server machine, the local interfaces that the File Server (fileserver process) does not register in the Volume Location Database (VLDB) at initialization time. o On a database server machine, the local interfaces that the Ubik synchronization library does not use when communicating with the database server processes running on other database server machines. As it initializes, the File Server constructs a list of interfaces to register, from the /var/lib/openafs/local/NetInfo file if it exists, or from the list of interfaces configured with the operating system otherwise. The File Server then removes from the list any addresses that appear in the NetRestrict file, if it exists. The File Server records the resulting list in the /var/lib/openafs/local/sysid file and registers the interfaces in the VLDB. The database server processes use a similar procedure when initializing, to determine which interfaces to use for communication with the peer processes on other database machines in the cell. The NetRestrict file is in ASCII format. One IP address appears on each line, in dotted decimal format. The order of the addresses is not significant. To display the File Server interface addresses registered in the VLDB, use the vos listaddrs command. SEE ALSO
NetInfo(5), sysid(5), vldb.DB0(5), fileserver(8), fs_getclientaddrs(1) vos_listaddrs(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 NETRESTRICT(5)
All times are GMT -4. The time now is 10:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy