Tag: id

ksh – Process

-- Get process id of current process $ echo $$ 6113 -- shows process id $ ps PID TTY TIME CMD 2050 pts/2 00:00:00 ps 6113 pts/2 00:00:00 ksh Useful when creating a unique temp file example TEMPFILE=/tmp/tmpfile.$$ -- Get process id of last background id $ sleep 10 & [1] 2078 $ echo $! … Continue reading ksh – Process

How to get client process id and oracle shadow process id in dedicated server?

-- note this will work when not logged in as SYS, as the session id is the same for all background processes SELECT p.spid oracle_dedicated_process, s.process clientpid FROM v$process p, v$session s WHERE p.addr = s.paddr AND s.audsid = userenv('sessionid'); Or for SYS you can use the following SQL> SELECT p.spid oracle_dedicated_process, s.process clientpid FROM … Continue reading How to get client process id and oracle shadow process id in dedicated server?