Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Thursday, June 13, 2019
 
 

IMA_GetDeviceStatistics (3IMA)

Name

IMA_GetDeviceStatistics - Gets the statistics of the specified target or logical unit exposed to the operating system

Synopsis

cc [ flag... ] file... -lima [ library... ]
#include <ima.h>

IMA_STATUS IMA_GetDeviceStatistics(
  /* in */     IMA_OID oid,
  /* out */    IMA_DEVICE_STATISTICS *pStats
);

Parameters

oid

The object ID of the target or logical unit (LU) whose statistics are retrieved.

pStats

A pointer to an IMA_DEVICE_STATISTICS data structure allocated by the caller. If successfully returned, this argument contains the statistics of the specified target or LU.

Description

The IMA_GetDeviceStatistics() API gets the statistics of the specified target or LU exposed to the operating system.

Return Values

IMA_ERROR_INVALID_PARAMETER

Returned if the pStats argument is NULL, or specifies a memory area to which data cannot be written

IMA_ERROR_INVALID_OBJECT_TYPE

Returned if the oid argument does not specify a valid object type

IMA_ERROR_INCORRECT_OBJECT_TYPE

Returned if the oid argument does not specify an LU object

IMA_ERROR_OBJECT_NOT_FOUND

Returned if the oid argument does not specify an LU known to the system

IMA_ERROR_LU_NOT_EXPOSED
  • Returned if the oid argument specifies a target that does not have any LUs exposed to the operating system

  • Returned if the oid argument specifies an LU not exposed to the operating system

IMA_ERROR_STATS_COLLECTION_NOT_ENABLED

Returned if statistics collection is not enabled for the oid argument

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/library/storage/snia-ima
Interface Stability
Volatile
MT-Level
Safe

See Also

libima(3LIB), attributes(7), IMA_GetLuOidList(3IMA), IMA_SetStatisticsCollection(3IMA)