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 !

In reply to Accessing data directly from BSC by Tech21

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.