Home >

LunaCM Command Reference Guide > LunaCM Commands > hsm > hsm monitor

hsm monitor

Query the HSM for performance monitoring statistics, such as HSM up time, command counts, and utilization. You can display the information or save it to a file.

Note:  This command requires HSM firmware version 6.20.0 or newer. If you run the command against a slot with older firmware, expect an error CKR_FUNCTION_NOT_SUPPORTED.  

Syntax

hsm monitor -slot <slot number> [-interval <integer>] [-rounds <integer>] [-noheader] [-file <filename>]

Parameter Shortcut Description
-file -f Save the output to the specified file. The output is also displayed to the terminal window.
-interval -i

Specifies the polling interval, in seconds.

Default: 5
Range: 5 to 999

-noheader -n Omit the header and footer from the output. This option is typically used in conjunction with the -file parameter.
-rounds -r

Specifies the number of samples to collect during the HSM polling. The default is a single round, which includes a first sample at the time the command is launched, followed by the interval (either the default 5 seconds, or the interval that you specified), followed by a second sample which is compared with the first, to complete the round.

The command exits after the specified number of rounds are displayed.

Default: 1
Range: 1 to 65535

-slot -s The target slot.

Example

Without arguments
lunacm:>hsm monitor
-------------------|---------------------------------|---------------------------------
                   |       HSM Command Counts        |        HSM Utilization (%)
 HSM Uptime (Secs) |-----------------|---------------|-----------------|---------------
                   | Since HSM Reset | Last   5 Secs | Since HSM Reset | Last   5 Secs
-------------------|-----------------|---------------|-----------------|---------------
         1,115,399 |      57,468,854 |            30 |            1.27 |          0.21
-------------------|-----------------|---------------|-----------------|---------------

    Average HSM Utilization In This Period  :  0.21%
    HSM Last Reset (+/-5 Secs Error Margin) :  Fri May 31 14:59:47 2013

Command Result : 0 (Success)

 

With arguments
lunacm:>hsm monitor -interval 6 -rounds 6
-------------------|---------------------------------|---------------------------------
                   |       HSM Command Counts        |        HSM Utilization (%)
 HSM Uptime (Secs) |-----------------|---------------|-----------------|---------------
                   | Since HSM Reset | Last   6 Secs | Since HSM Reset | Last   6 Secs
-------------------|-----------------|---------------|-----------------|---------------
         1,116,668 |      57,470,863 |             1 |            1.27 |          0.00
         1,116,674 |      57,470,864 |             1 |            1.27 |          0.00
         1,116,680 |      57,470,894 |            30 |            1.27 |          0.18
         1,116,686 |      57,470,895 |             1 |            1.27 |          0.00
         1,116,692 |      57,470,896 |             1 |            1.27 |          0.00
         1,116,698 |      57,470,926 |            30 |            1.27 |          0.18
-------------------|-----------------|---------------|-----------------|---------------

    Average HSM Utilization In This Period  :  0.06%
    HSM Last Reset (+/-5 Secs Error Margin) :  Fri May 31 14:59:46 2013

Command Result : 0 (Success)