sub ckconnStatus {
#; check connection status
open(NETCONFIG,”grep ‘^protocol’ $netconfig |”) || return 0;
@NETCONFIG =
close(NETCONFIG);
foreach $proc (@procs) {
open(CONNSTATUS,”hciconnstatus |grep ‘^$proc ‘ |”)
|| die “Cannot access hciconnstatus”;
$procpath = $rootpath . “/” . $site . “/exec/processes/” . $proc;
while (
chop;
if (/^S+s+(S+)s+ups+S+.*$/) {
foreach (@NETCONFIG) {
$NCline = $_;
chop($NCline);
if ($NCline =~ /^protocol ($connS*).*$/) ($conn) = $1;
printf(“nProcessingn Root: %s, site: %s, proc: %s, thread: %sn”,$rootpath,$site,$proc,$conn);
last;
}
}
&ckSavemsgs;
}
}
close(CONNSTATUS);
}
return 1;
}
Thanks