IBM Support

Rules file functions : gethostaddr

Question & Answer


Question

gethostaddr : Can naming service issues cause slow probe performance?

Cause

When the probe calls an external function like gethostaddr the operating systems performance can restrict the probes ability to process events quickly.

Answer

Yes, any function calls to the operating system should be performed sparingly.

Most of the time the function calls only need to be performed once in the lifetime of the probe process.

Under these circumstances you can use a static %variable to store the functions return value and reference this within the rules file.

Such static %variable values can be refreshed using kill -HUP.

For example:


if ( nmatch(%HOSTNAME,"") )
{
%HOSTNAME = gethostaddr(hostname())
}

[{"Product":{"code":"SSSHTQ","label":"Tivoli Netcool\/OMNIbus"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"7.4.0;8.1.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21695210