Tech21 has asked for the wisdom of the Perl Monks concerning the following question:
THE problem i am facing is that it is not logging to the node . the second problem is that it is making the .txt file in the log folder but .txt file is empty without any alarms. plz help me out in this .thanks !#!perl use strict; use warnings; use Time::Local; use Net::CLI; # Create the object instance for Telnet $cli = new Net::CLI('TELNET'); $NAME = "BSC14"; # Connect to host $cli->connect('HOSTNAME'); # Perform login $cli->login( Username => $USERNAME, Password => $PASSWORD, ); $cli->SearchAndExec('Windows NT Domain:'); $cli->print('\n'); $cli->system('C:\WINNT\Profiles\PATHNAME OF BSC>'); # Send a command and read the resulting output $output = $cli->cmd("mml"); print $output; $cli->print('\n'); $cli->cmd("allip;"); open ALLIP,">c:\\mm1\\log\\$NAME.txt"; @output = $cli->system('/<$/i'); $cli->cmd("exit"); $cli->system('C:\WINNT\Profiles\PATHNAME OF BSC>'); $cli->cmd("exit"); print ALLIP "$NAME\t"; print ALLIP @output; close(ALLIP); $cli->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing data directly from BSC
by marto (Cardinal) on May 04, 2012 at 10:17 UTC |