[mrtg] perl using telnet

Mike Singleton msingle at davita.com
Fri Aug 10 22:32:02 MEST 2001


How would I accomplish a similar task using  telnet  ?? ( Pardon the formatting by groupwise!)
 
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$URL ='HTTP://172.16.55.62/exec/show/user/cr';
$req = new HTTP::Request GET => $URL;
$req->authorization_basic('username','password');
$foo = $ua->request($req);
$response = $$foo{_content};
$response =~ /(\d+) interface, (\d+) user/; 
$inlet = $1; $outlet = $2;
print "$inlet\n$outlet\n0\n0\n";
 
 
Mike Singleton CNE, CCNA, MCSE
Network Analyst
Davita Inc
800.477.1916 x1259
253.405.1968 cellular
 
DaVita Inc.


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list