Creating views for a connection

smc_create_view creates a view on a particular Monitor connection. A connection must have at least one view.

For details on valid combinations of data items and information about how data items are summarized, see Chapter 2, “Data Items and Statistical Types”.

You can think of a view as a table. The data items in a view are represented by the columns in that table. The number of rows returned for a particular view depend upon the particular data items in the view. For example, a view with server-wide data returns a single row, whereas a view with per-device data returns one row for each device.

For example:

A view consisting of two data items:

SMC_NAME_LOCK_TYPE, SMC_STAT_VALUE_SAMPLE
SMC_NAME_LOCK_COUNT, SMC_STAT_RATE_SAMPLE

returns the rate of requested locks for each lock type during the sample interval.

A view consisting of one data item:

SMC_NAME_LOCK_COUNT, SMC_STAT_RATE_SAMPLE

returns the rate of requested locks summarized for all lock types during the sample interval.

For complete details on valid combinations of data items and understanding of how data items are summarized, refer to Chapter 2, “Data Items and Statistical Types”

See the code sample on page 22.