package HotSaNICmod::OSdep; my $MODNAME; sub version { ($VERSION = '$Revision: 1.23 $') =~ s/.*(\d+\.\d+).*/$1/; return "default.pm $VERSION"; } sub sample { my %args=@_; my $oid = '.1.3.6.1.2.1.25.4.2.1.2'; # host.hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunName undef my %localapps; # build local process-table first # my $command="/bin/ps axc"; open FILE,"$command|" || HotSaNIClog::error("unable to run '$command': $!"); $_=; #strip header line while () { chomp; s/ *$//; # strip spaces s/^.* //; # only need last word $localapps{$_}++; } close FILE; foreach $entry (@{$args{APP}}) { my ($host,$community,$item,$dbname,$name,$file,$description)=HotSaNICmod::common::get_names($entry); if ($host eq "") { # query local processes # if (! exists $localapps{$item}) { $localapps{$item}=0; } HotSaNICmod::do_rrd($item,"U",time,$localapps{$item}); } } } 1; WebSVN - hotsanic - Blame - Rev 9 - /branches/HotSaNIC-0.5.0-pre6/modules/apps/platform/default.pm
  jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [apps/] [platform/] [default.pm] - Blame information for rev 9

 

Line No. Rev Author Line

Powered by WebSVN 2.2.1