#!/bin/perl # # Kevin P. Inscoe (kevin@inscoe.org) December 26, 2002 # # use Proc::ProcessTable; $ref = new Proc::ProcessTable; foreach $proc (@{$ref->table}) { next unless ( $proc->{pid} gt 0 ); print "\n------------ pid=$proc->{pid} cmd=$proc->{cmndline} -----\n"; @output=`lsof -p $proc->{pid}`; print "\t@output\n"; }