git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@11012 6bcd3966-0018-0410-8128-fd23d134de7e

This commit is contained in:
Julien Mathis 2010-11-02 14:41:15 +00:00
parent 4adbe168e1
commit 005c0728c4
1 changed files with 18 additions and 0 deletions

View File

@ -317,6 +317,24 @@ if ($opt_64bits) {
# Get desctiption table
if ($opt_s) {
if (!-e $cacheFile) {
$result = $session->get_table(Baseoid => $OID_DESC);
if (defined($result)) {
unless (open(FILE,">".$cacheFile)){
print "Check mod for temporary file : ".$cacheFile."...\n";
exit $ERRORS{"UNKNOWN"};
}
my $currentTime = time();
print FILE $currentTime."\n";
foreach my $key (oid_lex_sort(keys %$result)) {
my @oid_list = split (/\./,$key);
my $interfaceIndex = pop (@oid_list);
print FILE $interfaceIndex.";".$result->{$key}."\n";
}
close(FILE);
}
}
if (!-e $cacheFile) {
printf("ERROR: Could not open " . $cacheFile);
exit $ERRORS{'UNKNOWN'};