#!/usr/bin/env perl # $Id: checknames.pl,v 1.3 2004/06/02 23:19:58 bernisys Exp $ # include PERL libraries use warnings; use diagnostics; # include HotSaNIC libraries use 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