Hi,
just commented in the issue.
Best regards,
Victor
just commented in the issue.
Best regards,
Victor
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
// Find "Entire Network" object and start enumeration from it
global TOTAL = 0;
EnumerateNodes(FindObject(1));
return TOTAL;
// This function walks object tree recursively starting from given root
sub EnumerateNodes(rootObject)
{
// Walk all child objects
foreach(o : GetObjectChildren(rootObject))
{
if (classof(o) == "Node")
{
// Process node object
for(d : FindAllDCIs(o, "FileSystem.Used(*)"))
{
v = GetDCIValue(o, d->id);
if (v != null)
{
TOTAL += v;
}
}
}
else
{
// For all other objects, go down the tree
EnumerateNodes(o);
}
}
}
snmp = CreateSNMPTransport($node);
if (snmp == null)
return null;
varbinds = SNMPWalk(snmp, ".1.3.6.1.2.1.25.3.3.1.2");
if (varbinds == null)
return null;
count = 0;
total = 0;
for(v : varbinds)
{
count++;
total += v->value;
}
return total / count;