#!/usr/local/bin/perl use strict; use DBI; require "getopts.pl"; sub main { my (@ps, @ref,$i, $j, $c, $l); my ($owner, $parent, $child, $found, $oramatch, $x, $cmd, $method); my ($dir, $trace_file, $opt_l); $SIG{"INT"} = 'int_handle'; # $ENV{'ORACLE_HOME'} = '/export/home/oracle8'; # $ENV{'ORACLE_SID'} = 'DVP'; $ENV{'TWO_TASK'}='ZEN'; $found = 0; my $username = $ARGV[0]; my $pid = $ARGV[1]; unless ( $pid || $username ) { usage(); } print "Pid ".$pid."\n"; my $dbh = DBI->connect("dbi:Oracle:",q{}); my $ppid = $$; @ps = `ps -ef | grep $ppid`; foreach $l (@ps) { print $l; } $dbh->disconnect; } sub usage { my $usage = "Usage : $0 user/pass pid "; print STDERR $usage."\n"; exit; } &main;