![]() ![]() |
hotsanic |
Subversion Repositories: |
Compare with Previous - Blame - Download
#!/usr/bin/env perl# $Id: checknames.pl,v 1.3 2004/06/02 23:19:58 bernisys Exp $# include PERL librariesuse warnings;use diagnostics;# include HotSaNIC librariesuse lib "../../lib";use HotSaNICparser;use lib "./platform";use common;if (@ARGV) {my $setting=shift @ARGV;my %MODULECONFIG=HotSaNICmod::common::configure();if ( (defined $MODULECONFIG{$setting}) and (ref $MODULECONFIG{$setting} eq "ARRAY") ) {foreach my $entry (@{$MODULECONFIG{$setting}}) {my ($host,$community,$item,$dbname,$name,$file,$description,@other)=HotSaNICmod::common::get_names($entry,@ARGV);print "$entry\n";printf "%12s: %-20s %s\n","HOST",$host,"";printf "%12s: %-20s %s\n","COMMUNITY",$community,"";printf "%12s: %-20s %s\n","ITEM",$item,"raw name";printf "%12s: %-20s %s\n","DBNAME",$dbname,"./rrd/$dbname.rrd";printf "%12s: %-20s %s\n","NAME",$name,"$name - last <time> (Day YYYY-MM-DD hh:mm)";printf "%12s: %-20s %s\n","FILE",$file,"$file-<time>.<ext>";printf "%12s: %-20s %s\n","DESCRIPTION",$description,"";if (@other) { foreach (@other) { printf "%12s: %-20s %s\n","(OTHER)",$_,""; } }print "\n";}}else { print "\"$setting\" does not exist or is not an array-type\n\n"; }}else { print "usage: checknames.pl ENTRY\n\n"; }