sync_watch Gateway Admin Utility

The sync_watch script, reads the dsipsvd.log syslog file and determines the time between gateway synchronizations. If the time is greater than the threshold set in the program, 900 seconds, it prints out a warning along with the dates of the last sync.


  1. Install Date::Parse Perl Module
    [root@soara bgroode]# perl -MCPAN -e shell
    
    /usr/lib/perl5/5.8.8/CPAN/Config.pm initialized.
    
    
    CPAN is the world-wide archive of perl resources. It consists of about
    100 sites that all replicate the same contents all around the globe.
    Many countries have at least one CPAN site already. The resources
    found on CPAN are easily accessible with the CPAN.pm module. If you
    want to use CPAN.pm, you have to configure it properly.
    
    If you do not want to enter a dialog now, you can answer 'no' to this
    question and I'll try to autoconfigure. (Note: you can revisit this
    dialog anytime later by typing 'o conf init' at the cpan prompt.)
    
    Are you ready for manual configuration? [yes] no
    
    
    The following questions are intended to help you with the
    configuration. The CPAN module needs a directory of its own to cache
    important index files and maybe keep a temporary mirror of CPAN files.
    This may be a site-wide directory or a personal directory.
    
    
    
    First of all, I'd like to create this directory. Where?
    
    CPAN build and cache directory? [/root/.cpan]
    
    
    
    If you want, I can keep the source files after a build in the cpan
    home directory. If you choose so then future builds will take the
    files from there. If you don't want to keep them, answer 0 to the
    next question.
    
    
    
    How big should the disk cache be for keeping the build directories
    with all the intermediate files?
    
    Cache size for build directory (in MB)? [10]
    
    
    
    By default, each time the CPAN module is started, cache scanning
    is performed to keep the cache size in sync. To prevent from this,
    disable the cache scanning with 'never'.
    
    Perform cache scanning (atstart or never)? [atstart]
    
    
    
    To considerably speed up the initial CPAN shell startup, it is
    possible to use Storable to create a cache of metadata. If Storable
    is not available, the normal index mechanism will be used.
    
    Cache metadata (yes/no)? [yes]
    
    
    
    The next option deals with the charset your terminal supports. In
    general CPAN is English speaking territory, thus the charset does not
    matter much, but some of the aliens out there who upload their
    software to CPAN bear names that are outside the ASCII range. If your
    terminal supports UTF-8, you say no to the next question, if it
    supports ISO-8859-1 (also known as LATIN1) then you say yes, and if it
    supports neither nor, your answer does not matter, you will not be
    able to read the names of some authors anyway. If you answer no, names
    will be output in UTF-8.
    
    Your terminal expects ISO-8859-1 (yes/no)? [yes]
    
    
    
    If you have one of the readline packages (Term::ReadLine::Perl,
    Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
    shell will have history support. The next two questions deal with the
    filename of the history file and with its size. If you do not want to
    set this variable, please hit SPACE RETURN to the following question.
    
    File to save your history? [/root/.cpan/histfile]
    
    Number of lines to save? [100]
    
    
    
    The CPAN module can detect when a module that which you are trying to
    build depends on prerequisites. If this happens, it can build the
    prerequisites for you automatically ('follow'), ask you for
    confirmation ('ask'), or just ignore them ('ignore'). Please set your
    policy to one of the three values.
    
    Policy on building prerequisites (follow, ask or ignore)? [ask]
    
    
    
    The CPAN module will need a few external programs to work properly.
    Please correct me, if I guess the wrong path for a program. Don't
    panic if you do not have some of them, just press ENTER for those. To
    disable the use of a download program, you can type a space followed
    by ENTER.
    
    Where is your gzip program? [/bin/gzip]
    
    Where is your tar program? [/bin/tar]
    
    Where is your unzip program? [/usr/bin/unzip]
    
    Where is your make program? [/usr/bin/make]
    
    Where is your links program? [/usr/bin/links]
    
    Where is your wget program? [/usr/bin/wget]
    
    Warning: ncftpget not found in PATH
    Where is your ncftpget program? []
    
    Warning: ncftp not found in PATH
    Where is your ncftp program? []
    
    Where is your ftp program? [/usr/kerberos/bin/ftp]
    
    Where is your gpg program? [/usr/bin/gpg]
    
    What is your favorite pager program? [/usr/bin/less]
    
    What is your favorite shell? [/bin/bash]
    
    
    
    Every Makefile.PL is run by perl in a separate process. Likewise we
    run 'make' and 'make install' in processes. If you have any
    parameters (e.g. PREFIX, LIB, UNINST or the like) you want to pass
    to the calls, please specify them here.
    
    If you don't understand this question, just press ENTER.
    
    Parameters for the 'perl Makefile.PL' command?
    Typical frequently used settings:
    
        PREFIX=~/perl       non-root users (please see manual for more hints)
    
    Your choice:  []
    
    Parameters for the 'make' command?
    Typical frequently used setting:
    
        -j3              dual processor system
    
    Your choice:  []
    
    Parameters for the 'make install' command?
    Typical frequently used setting:
    
        UNINST=1         to always uninstall potentially conflicting files
    
    Your choice:  []
    
    
    
    Sometimes you may wish to leave the processes run by CPAN alone
    without caring about them. As sometimes the Makefile.PL contains
    question you're expected to answer, you can set a timer that will
    kill a 'perl Makefile.PL' process after the specified time in seconds.
    
    If you set this value to 0, these processes will wait forever. This is
    the default and recommended setting.
    
    Timeout for inactivity during Makefile.PL? [0]
    
    
    
    If you're accessing the net via proxies, you can specify them in the
    CPAN configuration or via environment variables. The variable in
    the $CPAN::Config takes precedence.
    
    Your ftp_proxy? []
    
    Your http_proxy? []
    
    Your no_proxy? []
    
    
    
    commit: wrote /usr/lib/perl5/5.8.8/CPAN/Config.pm
    Terminal does not support AddHistory.
    
    cpan shell -- CPAN exploration and modules installation (v1.7602)
    ReadLine support available (try 'install Bundle::CPAN')
    
    cpan> install Date::Parse
    CPAN: Storable loaded ok
    CPAN: LWP::UserAgent loaded ok
    Fetching with LWP:
      ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
    Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
    CPAN: Compress::Zlib loaded ok
    Fetching with LWP:
      ftp://ftp.perl.org/pub/CPAN/modules/02packages.details.txt.gz
    Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
      Database was generated on Fri, 13 Jun 2008 15:06:47 GMT
    
      There's a new CPAN.pm version (v1.9205) available!
      [Current version is v1.7602]
      You might want to try
        install Bundle::CPAN
        reload cpan
      without quitting the current session. It should be a seamless upgrade
      while we are running...
    
    Fetching with LWP:
      ftp://ftp.perl.org/pub/CPAN/modules/03modlist.data.gz
    Going to read /root/.cpan/sources/modules/03modlist.data.gz
    Going to write /root/.cpan/Metadata
    Running install for module Date::Parse
    Running make for G/GB/GBARR/TimeDate-1.16.tar.gz
    Fetching with LWP:
      ftp://ftp.perl.org/pub/CPAN/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz
    CPAN: Digest::MD5 loaded ok
    Fetching with LWP:
      ftp://ftp.perl.org/pub/CPAN/authors/id/G/GB/GBARR/CHECKSUMS
    Checksum for /root/.cpan/sources/authors/id/G/GB/GBARR/TimeDate-1.16.tar.gz ok
    Scanning cache /root/.cpan/build for sizes
    TimeDate-1.16/
    TimeDate-1.16/lib/
    TimeDate-1.16/lib/Date/
    TimeDate-1.16/lib/Date/Language/
    TimeDate-1.16/lib/Date/Language/Sidama.pm
    TimeDate-1.16/lib/Date/Language/Finnish.pm
    TimeDate-1.16/lib/Date/Language/Amharic.pm
    TimeDate-1.16/lib/Date/Language/Swedish.pm
    TimeDate-1.16/lib/Date/Language/Dutch.pm
    TimeDate-1.16/lib/Date/Language/Afar.pm
    TimeDate-1.16/lib/Date/Language/Brazilian.pm
    TimeDate-1.16/lib/Date/Language/Somali.pm
    TimeDate-1.16/lib/Date/Language/Tigrinya.pm
    TimeDate-1.16/lib/Date/Language/Austrian.pm
    TimeDate-1.16/lib/Date/Language/Greek.pm
    TimeDate-1.16/lib/Date/Language/French.pm
    TimeDate-1.16/lib/Date/Language/Danish.pm
    TimeDate-1.16/lib/Date/Language/German.pm
    TimeDate-1.16/lib/Date/Language/TigrinyaEritrean.pm
    TimeDate-1.16/lib/Date/Language/Italian.pm
    TimeDate-1.16/lib/Date/Language/Gedeo.pm
    TimeDate-1.16/lib/Date/Language/Chinese_GB.pm
    TimeDate-1.16/lib/Date/Language/TigrinyaEthiopian.pm
    TimeDate-1.16/lib/Date/Language/English.pm
    TimeDate-1.16/lib/Date/Language/Norwegian.pm
    TimeDate-1.16/lib/Date/Language/Oromo.pm
    TimeDate-1age/r/lib/perl5/site_perl/5.8.8/Time/Zone.pm
    Installing /usr/lib/perl5/site_perl/5.8.8/Date/Language.pm
    Installing /usr/lib/perl5/site_perl/5.8.8/Date/Format.pm
    Installing /usr/lib/perl5/site_perl/5.8.8/Date/Parse.pm
    Installing /usr/lib/perl5/site_perl/5.8.8/Date/Language/Greek.pm
    Installing /usr/lib/perl5/site_perl/5.8.8/Date/Language/Danish.pe_GB.pm
    Installing /usr/lib/perl5/site_perl/5.8.8/Date/Language/English.pm
    Installing /usr/lib/perl5/site_perl/5.8.8/Date/Language/Braziliai386-linux-thread-multi/perllocal.pod
      /usr/bin/make install  -- OK
    
    cpan> {CTRL-D}
    Lockfile removed.
    
  2. Install sync_watch script
  3. Run script:
  4. Alternately, to run constantly: