Article: KB-039

  Functions Description
Common Common functions that are used at the beginning of every operation
Scan Device

SKStorageDeviceUtils::scanDevices

Scan for storage devices. This is the first function that every application will do. This function returns a list of storages that it can detect and communicate with.
Read device identify

SKCCoreDelegate::identifyDevice

This function is to retrieve device identify information, which provides information about what device this is, serial number, supported features and current settings
vtView Normal sequence to collect log is shown below
Setup “vtView logging” conditions. Set values for this structure SKCLogSetting Setup to collect vtView data:

·       Drive(s) to collect

·       How long to collect

·       Collection frequency

·       Log file name

Start logging vtView data

SKCCoreDelegate::startLogging

Start the logging process. The logging will be started and based on the “vtView logging” conditions
Log SMART attributes on demand.

SKCCoreDelegate::addLogLine

This function is to read current SMART attributes and add to the log immediately.

This is useful when we need to capture current values of SMART attributes due to a specific circumstance in the system.

Stop logging vtView data

SKCCoreDelegate::stopLogging

Stop vtView logging. Stop logging is necessary to start the analysis. The current log file is closed.
vtView Analyze data and get life span information
Load log data

SKCCoreDelegate::loadLogData

Load vtView log data into memory and prepare for analysis
Perform analysis and get vtView result

SKCCoreDelegate::getUsageStatistics

Instruct StorKit to perform analysis on vtView log file and return results.
Retrieve power off data retention estimates

SKCCoreDelegate::getPowerOffDataRetentionEstimate

Retrieve estimates on data retention from the current time. It is particularly useful to print label for SSD regarding data retention during power off.

Power off data retention on SSD is limited and based on NAND erase count information.

Release log data. It is necessary to call this function.

SKCCoreDelegate::releaseLogData

This function is the trigger for StorKit to release all memory allocated when it loaded vtView log into memory for the analysis.
Others More useful functions for software or production tool
Read SMART attributes

SKCCoreDelegate::readSmart

Retrieve SMART attributes from the device. This function reads the raw data, then interprets the data for your application to consume.
Save current state

SKCCoreDelegate::saveCurrentState

Save current state of the device: identify device and current settings, current value of SMART attribute.

This function is to save state of the device before a test and after a test or save the state as part of your production flow.

Is Virtium SSD?

SKCCoreDelegate::isVirtiumDevice

StorKit can only calculate vtView results accurately with Virtium’s SSD. This function help distinguish Virtium device from other vendors.
Export identify device information in binary format.

SKCCoreDelegate::exportIdentifyBinary (file)

Export identify device information of an SSD to a file in binary format.

It is useful when we need to compare features and settings of two firmware versions or two SSD. Use this with function SKCCoreDelegate::compareIdentify