> I have some Motorola pwr modems and the occasionally "hang". They will
> answer and give the connect speed but thats it. They just sit there. I
> need to reset the port in order to make the modem usuable again. Very
> frustrating!!
>
> Here is the script--FYI if i type "pmcom ts1 "reset s3"" I'm able to
> reset s3. So, pmcom is working fine.
Here's a stripped-out copy of my pmwhoall.pl from my site:
http://www.msg.net/utility/PM/
This stripped-down script looks for IDLE ports, and resets them.
To run 'quietly' (such as from cron) comment out the two 'print' commands.
#!/usr/local/bin/perl5
#
# idle-reset for Portmaster-2, By Kevin Kadow
# http://www.msg.net/utility/PM/
#
# Requires bpmtools2.0 for the 'pm.pl' library.
#
require 'pm.pl';
%All = (
"pm1","MySecret",
"pm2","MySecret",
"pm3","MySecret",
);
foreach $Host (keys(%All) ) {
portmaster::Connect($Host,$All{$Host});
for ($Cnt = 0; $Cnt <= 29; $Cnt++) {
&portmaster::Who("$Cnt");
next unless("IDLE" eq $PortValue{$Cnt,STATUS});
$Ports++;
portmaster::Command("reset s$Cnt");
print "Reset port $Host:$Cnt\n";
}
}
close(portmaster'DS);
print "Reset $Ports idle ports.\n";
exit;
###EOF###