to do this from unix you would:
$ sqlplus u/p
and run a query.
You could look at the parent process id and see what the parent is (assuming dedicated server), the listener would be the parent of the remote connections and the actually progam (sqlplus, toad) would be the parent in a local connection.
but basically, the oracleMYSID processes are your dedicated servers.
[tkyte@dellpe ~]$ ps -auxww | grep $ORACLE_SID
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
ora9ir2 17418 0.0 0.4 304704 8916 ? Ss Sep04 0:01 ora_pmon_ora9ir2
ora9ir2 17420 0.0 1.4 306000 30360 ? Ss Sep04 0:00 ora_dbw0_ora9ir2
ora9ir2 17422 0.0 0.4 309128 8580 ? Ss Sep04 0:03 ora_lgwr_ora9ir2
ora9ir2 17424 0.0 0.4 304956 9348 ? Ss Sep04 0:10 ora_ckpt_ora9ir2
ora9ir2 17426 0.0 1.2 304388 25640 ? Ss Sep04 0:03 ora_smon_ora9ir2
ora9ir2 17428 0.0 0.5 304144 10784 ? Ss Sep04 0:00 ora_reco_ora9ir2
ora9ir2 17430 0.0 0.4 304128 10080 ? Ss Sep04 0:00 ora_cjq0_ora9ir2
ora9ir2 17434 0.0 0.3 304588 7040 ? Ss Sep04 0:00 ora_s000_ora9ir2
ora9ir2 17436 0.0 0.3 304504 7172 ? Ss Sep04 0:00 ora_d000_ora9ir2
ora9ir2 17438 0.0 0.5 308224 11540 ? Ss Sep04 0:00 ora_arc0_ora9ir2
ora9ir2 17440 0.0 0.5 308224 11532 ? Ss Sep04 0:00 ora_arc1_ora9ir2
ora9ir2 17450 0.0 1.7 304724 37216 ? Ss Sep04 1:07 ora_qmn0_ora9ir2
tkyte 26016 0.0 0.0 4712 696 pts/1 S+ 13:56 0:00 grep ora9ir2
[tkyte@dellpe ~]$ plus
SQL*Plus: Release 9.2.0.8.0 - Production on Thu Sep 6 13:57:01 2007
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
ops$tkyte%ORA9IR2> !ps -auxww | grep $ORACLE_SID
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
ora9ir2 17418 0.0 0.4 304704 8916 ? Ss Sep04 0:01 ora_pmon_ora9ir2
ora9ir2 17420 0.0 1.4 306000 30360 ? Ss Sep04 0:00 ora_dbw0_ora9ir2
ora9ir2 17422 0.0 0.4 309128 8580 ? Ss Sep04 0:03 ora_lgwr_ora9ir2
ora9ir2 17424 0.0 0.4 304956 9348 ? Ss Sep04 0:10 ora_ckpt_ora9ir2
ora9ir2 17426 0.0 1.2 304388 25640 ? Ss Sep04 0:03 ora_smon_ora9ir2
ora9ir2 17428 0.0 0.5 304144 10784 ? Ss Sep04 0:00 ora_reco_ora9ir2
ora9ir2 17430 0.0 0.4 304128 10080 ? Ss Sep04 0:00 ora_cjq0_ora9ir2
ora9ir2 17434 0.0 0.3 304588 7040 ? Ss Sep04 0:00 ora_s000_ora9ir2
ora9ir2 17436 0.0 0.3 304504 7172 ? Ss Sep04 0:00 ora_d000_ora9ir2
ora9ir2 17438 0.0 0.5 308224 11540 ? Ss Sep04 0:00 ora_arc0_ora9ir2
ora9ir2 17440 0.0 0.5 308224 11532 ? Ss Sep04 0:00 ora_arc1_ora9ir2
ora9ir2 17450 0.0 1.7 304724 37216 ? Ss Sep04 1:07 ora_qmn0_ora9ir2
tkyte 26017 0.0 0.0 3980 940 pts/1 S+ 13:57 0:00 rlwrap /home/ora9ir2/bin/sqlplus /
tkyte 26018 0.3 0.2 14076 5800 pts/2 Ss+ 13:57 0:00 /home/ora9ir2/bin/sqlplus
<b>ora9ir2 26019 0.3 0.5 304152 11472 ? Ss 13:57 0:00 oracleora9ir2 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
</b>tkyte 26022 0.0 0.0 3652 692 pts/2 S+ 13:57 0:00 grep ora9ir2
In my case, it is LOCAL=YES because I am local, not remote - you are not local, you are connecting over sqlnet - local = NO in this case - the client is remote.
3) v$process.
for example, using my example from above:
ops$tkyte%ORA9IR2> select a.spid dedicated_server,
2 b.process clientpid
3 from v$process a, v$session b
4 where a.addr = b.paddr
5 and b.sid = (select sid from v$mystat where rownum=1)
6 /
DEDICATED_SE CLIENTPID
------------ ------------
26019 26018
26019 is my dedicated server, 26018 is the sqlplus client (that clientpid will be the REMOTE pid of the client in your case)