jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [tools/] [checknames.pl] - Blame information for rev 32

 

Line No. Rev Author Line
11simandl#!/usr/bin/env perl
2 
3# $Id: checknames.pl,v 1.3 2004/06/02 23:19:58 bernisys Exp $
4 
5# include PERL libraries
6use warnings;
7use diagnostics;
8 
9# include HotSaNIC libraries
10use lib "../../lib";
11use HotSaNICparser;
12use lib "./platform";
13use common;
14 
15if (@ARGV) {
16 my $setting=shift @ARGV;
17 
18 my %MODULECONFIG=HotSaNICmod::common::configure();
19 
20 if ( (defined $MODULECONFIG{$setting}) and (ref $MODULECONFIG{$setting} eq "ARRAY") ) {
21 foreach my $entry (@{$MODULECONFIG{$setting}}) {
22 my ($host,$community,$item,$dbname,$name,$file,$description,@other)=HotSaNICmod::common::get_names($entry,@ARGV);
23 print "$entry\n";
24 printf "%12s: %-20s %s\n","HOST",$host,"";
25 printf "%12s: %-20s %s\n","COMMUNITY",$community,"";
26 printf "%12s: %-20s %s\n","ITEM",$item,"raw name";
27 printf "%12s: %-20s %s\n","DBNAME",$dbname,"./rrd/$dbname.rrd";
28 printf "%12s: %-20s %s\n","NAME",$name,"$name - last <time> (Day YYYY-MM-DD hh:mm)";
29 printf "%12s: %-20s %s\n","FILE",$file,"$file-<time>.<ext>";
30 printf "%12s: %-20s %s\n","DESCRIPTION",$description,"";
31 if (@other) { foreach (@other) { printf "%12s: %-20s %s\n","(OTHER)",$_,""; } }
32 print "\n";
33 }
34 }
35 else { print "\"$setting\" does not exist or is not an array-type\n\n"; }
36 }
37 else { print "usage: checknames.pl ENTRY\n\n"; }

Powered by WebSVN 2.2.1