krn.EnumSessionResources

This job returns the resources currently held (in memory) by a specified work session. It is the detail-rich live view; the compact view persisted in the database is returned by krn.SessionEnumResourcesDB. Both refer to the same named server resources held by a session or service.

1. Input Parameters

Name Type Required Description

Flags

INT

Yes

Currently not supported — pass 0.

SessionGUID

STRING

Yes

ID of the work session

2. Output Parameters

Name Type Dependency Description

Resource[000001..n]

STRING

Optional

One consecutively numbered parameter per held resource (Resource000001, Resource000002, …). The value is a ;-separated set of key=value pairs (see the structure below). If the session holds no resources, no output parameters are returned.

3. Structure of a resource record

Each Resource… parameter contains a ;-separated set of key=value pairs with the following fields:

Field Description

resourcename

Name of the named server resource or lock (e.g. ADI, ASC, DIS, SCC, SCT)

resourcetype

Type of the resource

maxpreserve

Maximum preserve duration

servergroupid

Identifier of the server group

locktime

Time of acquisition (Unix epoch seconds)

flags

Bit mask with resource flags

preserveterm

Preserve term

4. Return Value

(INT): 0 = Job successful, otherwise error code.