
Attachment uploads are currently disabled. This is a temporary situation and will resume as normal in the coming days.
Solved!
Go to SolutionOld content?
Well, here we have a brand new area, and that's great. I am wondering if old content will be migrated over here, or if there is a way to look through it.
I actually have a question about a script that I downloaded (I believe Karl wrote it). I'll include it below. It worked for a few days, and then all of a sudden it stopped working.
--- The error:
./test.sh: line 1: use: command not found
./test.sh: line 2: syntax error near unexpected token `('
./test.sh: line 2: `$session = eval{InCharge::session->new('
--------- The script
use InCharge::session;
$session = eval{InCharge::session->new(
server=>'CMA-AM-PM',
)};
# use to determine if instrumentation is present and working
#$UTIL{Disk} = 'Status';
#$UTIL{Interface} = 'CurrentUtilization';
#$UTIL{Port} = 'CurrentUtilization';
$UTIL{FileSystem} = 'UtilizationPct';
#$UTIL{Processor} = 'CurrentUtilization';
#$UTIL{Memory} = 'FreeMemoryPct';
@UCS = $session->getInstances('UnitaryComputerSystem');
foreach $ucs (sort @UCS) {
$obj = $session->object($ucs);
$class = $obj->{CreationClassName};
print "\n$class $ucs\n";
foreach $if (sort @{$obj->{ComposedOf}}) {
($vclass, $vname) = split /::/,$if;
$ifobj=$session->object($if);
$util = $ifobj->{$UTIL{$vclass}};
if ($util ne '') {
print "\t$ifobj->{DisplayName}\t$util\n";
}
}
}
Any ideas? Much appreciated!
Don
Responses (0)
Solutions (0)
