jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [sensors/] [platform/] [common.pm] - Blame information for rev 3

 

Line No. Rev Author Line
11simandlpackage HotSaNICmod::common;
2 
3sub version {
4 ($VERSION = '$Revision: 1.4 $') =~ s/.*(\d+\.\d+).*/$1/;
5 return "common.pm $VERSION";
6 }
7 
8sub configure {
9 return HotSaNICparser::get_moduleconfig(".",(SENSOR=>"array"));
10 }
11 
12sub get_names {
13 my $entry=shift || ",";
14 my $host="";
15 my $community="";
16 
17 my ($item,$dbname,$description,$num,$scalefactor,$add,$unit,$min,$max)=split /,/,$entry;
18 if (! defined $method) { $method=""; }
19 if( index($item, "SNMP:") >= 0) { (undef,$host,$community,$item) = split /:/, $item; }
20 if ($host ne "") { $name="$host:$dbname"; }
21 else { $name="$dbname"; }
22 $file=$dbname;
23 
24 return ($host,$community,$item,$dbname,$name,$file,$description,$num,$scalefactor,$add,$unit,$min,$max);
25 }
261;
27 

Powered by WebSVN 2.2.1