Since Solaris doesn’t have a ‘netstat -tunlp’, the below parses the output of ptree and pfiles to get a list: my %apps; open(T, “ptree |”); while() { $apps{$1}->{“cmd”}=$2 if(/(\d+)\s+(.*)/) }; close(T); foreach my $p (sort keys %apps) { my @ports; open(F, “pfiles $p 2>/dev/null |”); while() { push(@ports,$1.”/”.$2) if(/sockname.*?AF_INET[6?]\s+(.*?)\s+port: (\d+)/) } my %h=map { $_, […]