« Back to Product

Documentation

IPS_GetTraceIDList

 array IPS_GetTraceIDList (int $ObjectID) 

Parameters

ObjectID

ID of the object whose trace entries are to be returned

Returns

An array with the IDs (TraceID) of the kept trace entries of the object, oldest first.

Description

In traces the kernel records what caused what: every entry represents one operation – e.g. writing a variable, the event triggered by it, its action or script, a RequestAction, a timer or a request to the WebServer – and refers to the entry that caused it via ParentID and to the entries it caused itself via ChildIDs. For every cause this results in a tree that shows, for example, why a variable has changed.

The function returns the IDs of all kept entries that belong to the object ObjectID – e.g. the write operations of a variable or the executions of an event. These are at most the last 25 entries. For an object without entries or a non-existing ID an empty array is returned. If 1 is passed as ObjectID, the IDs of all kept entries are returned in arbitrary order.

The entries themselves and their cause chain are returned by IPS_GetTraceList.

Traces are only kept in memory and are lost on a restart. The last 25 entries are kept per object, and the last 1000 entries in total for entries without an object (e.g. WebServer). An older entry is kept as long as a kept entry still descends from it, so chains stay complete. When an object is deleted, its entries are removed. Strings in Data are shortened to 100 bytes and marked with "...".

Example

print_r(IPS_GetTraceIDList(10018));

/* e.g. returns:
Array
(
    [0] => 1
    [1] => 2
)
*/
Any questions?