If you choose to use the predefined vtView applications, your software communicates with vtView via TCP/IP and outputs messages in the JSON format.

Programming Guide

To communicate with vtView software, open a TCP/IP socket at port 6070; the message is in JSON format. Below is the main format of the message. Most request message follow this convention.

{
“Type”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: <integer, see list of commands>
“IsRequest”: <true/false>  # true is for request, false is for response
“ReturnCode”: <integer, see list of return code>
{

Attribute Type Value
Type String “VT::StorKit::vtView”. This value is fixed.
Revision Integer 1
Command Integer Request code to vtView software. See Section 9.3, vtView Commands.
IsRequest Boolean true: this message is a request, false: this is message is a response
ReturnCode Integer Status code of the response. See list of response codes and their description in section vtView Response Code

Note: Please review each request and response carefully as there may be specific fields in the request and response.

 

vtView Commands

The following table summarizes all vtView commands.

Command Value
Scan for attached drives 1
Get vtView status 2
Setup vtView logging 3
Get current vtView setting 4
Get detail vtView workload 5
Register for notification 6

Response Codes

The following table is a list of vtView response codes.

Response Response Code
No error 0
Invalid command 1
Invalid index 2
Invalid device 3
Invalid report period 4
Invalid log frequency setting 5
Invalid message identifier 6
Invalid sub-command 7
Invalid JSON form 8
Cannot find specified history record 9

vtView Messages

The following table is a list of vtView messages.

Messages Description
Scan for Attached Drives Retrieves information (model string, serial number, port) of a SSD attached to the system.
Get vtView Status Use this message to retrieve vtView status for an attached storage device. To specify a device to retrieve status, use the parameter “port” returned from “Scan for attached drives” message
Setup vtView Logging Setup how often to log vtView data (logging frequency), and the period for the software to analyze the data (analyzing period).
Get Current Setting Retrieving the current settings of the vtView software (logging frequency and analyzing period)
Register for notification Register with vtView application to receive notification when vtView has the data ready.

Scan for Attached Drives

This message is used to retrieve a list of SSDs that are currently attached to the system. The user can choose a device to monitor from this list. Each device is identified by its model name, serial number, and storage logical path. The following table shows how the storage logical path is specified for the various operating systems.

OS Storage Logical Path Example
Windows PhysicalDrive# PhysicalDrive0, PhysicalDrive1
Linux /dev/sd# /dev/sda, /dev/sdb

Request Message
Attributes Types Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 1
IsRequest Boolean true

 

Sample Message

{
“Type”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: 1,
“IsRequest”: true
}

Response Message
Attribute Type Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 1
IsRequest Boolean false
ReturnCode Integer 0: Successful request; information in DeviceList is valid. For other values, see the Return Code Table for details; information in DeviceList is not valid.
DeviceList Array An array of device information represented in JSON format. The next table describes the Device Information fields.

Device Information
Attribute Type Value
Path String OS logical path to the storage.
Example: /dev/sda on Linux or PhysicalDrive0 on Windows
Model String Model string of the device.
Example: StorFly VSF202CC030G-100
Serial String Serial number of the device.
Example: P1T13003845402090012
Firmware String Firmware string retrieved from the device.
Example: 0409-000
Capacity Double Capacity of the device as reported by the OS.
Example: 17.95GB

Example

The DeviceList section lists two (2) devices:

{
“Type”: “StorKit::vtVIew”,
“Revision”: 1,
“Command”: 1,
“isRequest”: false                   # true for request command, false for response
“ReturnCode”: 0,
“DeviceList”:
[
{
“Path”:”PhysicalDrive0″,
“Model”:”ST1000DM003-1SB10C”,
“Serial”:”Z9A16S11″,
“Firmware”:”CC43″,
“Capacity”:931.513
},
{
“Path”:”PhysicalDrive1″,
“Model”:”StorFly VSF202CC030G-100″,
“Serial”:”P1T13003845402090012″,
“Firmware”:”0409-000″,
“Capacity”:27.9552
}
]
}

Get vtView Status

This message is used to retrieve vtView status of a device. The vtView status includes information about the estimated remaining time and workload information. The entire list of returned attributes is listed the table below.

The current remaining time is based on analysis of the workload and how the workload impacts SSD life for the analysis duration (for example 1 week). Assuming the workload remains unchanged, vtView uses the information to do the estimation for remaining time and remaining TBW.

Request Message
Attribute Types Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 2
IsRequest Boolean true
Device String OS logical storage path.
Example: “/dev/sda” or “PhysicalDrive0”

Sample Message

{
“Identifier”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: 1,
“IsRequest”: true,
“Device”: “/dev/sda”
}

Response Message
Attribute Type Value
Identifier String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 2
IsRequest Boolean false
Device String OS logical storage path; the Value should be the same as the request.
ReturnCode Integer 0: Successful request; the information in DeviceList is valid. For other values: see the Return Code Table for details; information in DeviceList is not valid.
Data Array An array of device information represented in JSON format. The next table describes the Device Information fields.

Data Field Descriptions
Attribute Type Value
DataIndex Integer Index of the data entry. Each index holds data for one (1) duration.
RemainingTBW Double Estimated remaining TBW.
RemainingDay Integer Estimated remaining days based on current workload and usage.

Current workload impacts SSD life.

Usage is SSD consumption.

Remaining days are calculated using two factors: how current workload impacts SSD life and usage.

TotalRead_GB Integer Data read for a calculation period.
TotalWrite_GB Integer Data write for a calculation period.
Timestamp Integer Number of seconds from 01-01-1970
LifeAcceleration Integer 0: Gentle workload

1: Moderate workload

2: Aggressive workload

vtView analyzes how workload impacts the SSD life and categorizes the impact using the three (3) levels as described above. The difference between life longevity between “Gentle workload” and “Aggressive workload” is about 10 times.

Example

The following is an example of the Return Message. There are two (2) entries in the Data section. Each entry represents data for a usage period.

“Type”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: 2,
“isRequest”: false                   # true for request command, false for response
“Device”:”/dev/sda”,
“ReturnCode”: 0,
“Data”:
[
{

“DataIndex”:1,
“RemainingTBW”:93.75,
“RemainingDay”:746,
“RemainingLife”:100,
“TotalRead”:0,
“TotalWrite”:0,
“Timestamp”:1560399019,
“LifeAcceleration”:1
},

{
“DataIndex”:2,
“RemainingTBW”:93.75,
“RemainingDay”:746,
“RemainingLife”:100,
“TotalRead_GB”:0,
“TotalWrite_GB”:0,
“Timestamp”:1560398931,
“LifeAcceleration”:1
}
]
}

Configure Log Settings

This message is used to configure how often vtView collects data and the reporting period.

Request Message
Attribute Type Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 3
IsRequest Boolean true
LogFrequency Integer Frequency to log SMART data.

1: Log every 15 minutes

2: Log every 1 hour

3: Log every 6 hours.

The 15-minute setting provides good granularity data about the system and storage. For this collection rate, the total log size will be approximately 89MB for a year per drive.

ReportPeriod Integer Sets the period that vtView calculates data and sends notifications.

1: 1 week; vtView uses one-week of data to analyze the usage and sends a notification every 1 week.

2: 2 weeks; vtView uses two-weeks of data to analyze the usage and sends a notification every 2 weeks.

3: 1 month; vtView uses one month of data to analyze the usage and sends a notification once a month.

Sample Message

{
“Type”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: 3,
“IsRequest”: true,
“LogFrequency”:1,         # log every 15 minutes
“ReportPeriod”:1             # Weekly
}

Response Message
Attribute Type Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 3
IsRequest Boolean false
ReturnCode Integer 0: Successful request. Information in DeviceList is valid. For other values, see the Return Code Table for details; information in the DeviceList is not valid.

Sample Message

{
“Type”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: 3,
“isRequest”: false,
“ReturnCode”: 0,
}

Get Current Log Settings

This message is used to configure how often vtView collects data and the report period.

Request Message
Attribute Type Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 4
IsRequest Boolean true

 

Sample Message

{
“Type”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: 4,
“IsRequest”: true,
}

Response Message
Attribute Type Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 4
IsRequest Boolean False
LogFrequency Integer Frequency to log SMART data.

1: Log every 15 minutes

2: Log every 1 hour

3: Log every 6 hours

ReportPeriod Integer Sets the period that vtView calculates data and sends notifications.

1: 1 week; vtView uses one-week of data to analyze the usage and sends a notification every 1 week.

2: 2 weeks; vtView uses two-weeks of data to analyze the usage and sends a notification every 2 weeks.

3: 1 month; vtView uses one month of data to analyze the usage and sends a notification once a month.

 

Sample Message

{
“Type”: “VT::StorKit::vtView”,
“Revision”: 1,
“Command”: 4,
“isRequest”: false,
“ReturnCode”: 0,
“LogFrequency”:1,
“ReportPeriod”:1
}

Register for Notification

This message is used to register with vtView to get notification when data is available.

Request Message

Attribute Type Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 6
IsRequest Boolean true
NotifyMe Boolean true – to receive notification when data is available

false – stop receive notification from vtView

NotificationTcpPort Integer TCP port that vtView will send notification to
NotificationTcpHost String Host IP address that vtView will send notification to

Sample Message

{
“Type”:”VT::StorKit::vtView”,
“Revision”:1,
“Command”:6,
“IsRequest”:true,                                   # true is for request, false is for response
“NotifyMe”:true,                                       # host application can turn notification on or off
“NotificationTcpPort”: <host port>,          # port to send notification to
“NotificationTcpHost”: <host ip>              # tcp IP to send notification to
}

Response Message
Attribute Type Value
Type String “VT::StorKit::vtView”
Revision Integer 1
Command Integer 6
IsRequest Boolean false
NotifyMe Boolean Will be set to the same value as request message to acknowledge the register for notification request.

Sample Message

{
“Type”:”VT::StorKit::vtView”,
“Revision”:1,
“Command”:6,
“IsRequest”:false,
“NotifyMe”:true,                                       # same setting as host’s request message
}