Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Accessing data directly from BSC

by Tech21 (Initiate)
on May 04, 2012 at 10:11 UTC ( #968903=perlquestion: print w/ replies, xml ) Need Help??
Tech21 has asked for the wisdom of the Perl Monks concerning the following question:

What is the purpose of CLI for accessing a node and how to use it??? Plz help me out in making the Perl script for the purpose... BSC is "BASE STATION CONTROLLER " which has some external fault indications through alarms. In bsc we work on windows platform. so we need to fetch these alarms data from bsc and save it in a folder. The script is based of directly fetching the data from the node with bypassing the oss server(INTELLIGENT SERVER) and accessing the node through router path .
#!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;
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 !

Comment on Accessing data directly from BSC
Download Code
Re: Accessing data directly from BSC
by marto (Chancellor) on May 04, 2012 at 10:17 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://968903]
Approved by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-10-24 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls