About the info entry point

The info entry point enables agents to obtain information about an online resource. For example, the Mount agent's info entry point could be used to report on space available in the file system. All information the info entry point collects is stored in the "temp" attribute ResourceInfo.

See About the ResourceInfo attribute.

See the Administrator's Guide for information about "temp" attributes.

The (script) entry point can optionally modify a resource's ResourceInfo attribute by adding or updating other name-value pairs using the following commands:

hares -modify res ResourceInfo -add key value

or

hares -modify res ResourceInfo -update key value

Refer to the hares manual page for more information on modifying values of string-association attributes.

See About the ResourceInfo attribute.

See Syntax for C++ entry points.

Return values for info entry point
About the ResourceInfo attribute

The ResourceInfo attribute is a string association that stores name-value pairs. By default, there are three such name-value pairs:

These keys are updated only by the agent framework, not the entry point. The entry point can define and add other keys (name-value pairs) and update them.

The ResourceInfo (string-association) is a temporary attribute, the scope of which is set by the engine to be global for failover groups or local for parallel groups. Because ResourceInfo is a temporary attribute, its values are never dumped to the configuration file.

You can display the value of the ResourceInfo by using the hares command. The output of hares -display shows the first 20 characters of the current value; the output of hares -value resource ResourceInfo shows all name-value pairs in the keylist.

The resource for which the info entry point is invoked must be online.

When a resource goes offline or faults, the State key is marked "Stale" because the information is not current. If the info entry point exits abnormally, the State key is marked "Invalid" because not all of the information is known to be valid. Other key data, including Msg and TS keys, are not touched. You can manually clear values of the ResourceInfo attribute by using the hares -flushinfo command. This command deletes any optional keys for the ResourceInfo attribute and sets the three mandatory keys to their default values.

See the hares manual page.

Invoking the info entry point

You can invoke the info entry point from the command line for a given online resource using the hares -refreshinfo command.

By setting the InfoInterval attribute to some value other than 0, you can configure the agent to invoke the info entry point periodically for an online resource.

See InfoInterval.