No, but you can create shell script which will do that and call that script using appropriate action, passing event data as parameters.
Best regards,
Victor
Best regards,
Victor
We really need your input in this questionnaire
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
// Hash map to avoid duplicates
global processedNodes = %{};
// Find "Entire Network" object and start enumeration from it
return CalculateTotal(FindObject(1));
// This function walks object tree recursively starting from given root
sub CalculateTotal(rootObject)
{
sum = 0.0;
// Walk all child objects
foreach(o : GetObjectChildren(rootObject))
{
if (classof(o) == "Node")
{
if (processedNodes[o->id] == null)
{
v = GetDCIValueByName(o, "System.CPU.Usage");
if (v != null)
sum += real(v);
processedNodes[o->id] = 1; // actual value is irrelevant, it's just a flag
}
}
else if (classof(o) == "NetObj")
{
// For all other objects, go down the tree
// There can be additional checks for object class, like
// if (o->type == 5)
sum += CalculateTotal(o);
}
}
return sum;
}