H3C Servers hREST User Guide-6W101

HomeSupportConfigure & DeployUser ManualsH3C Servers hREST User Guide-6W101
H3C Servers hREST User Guide-6W101
Title Size Downloads
H3C Servers hREST User Guide-6W101-book.pdf 1015.23 KB
Table of Contents
Related Documents
book
Title Size Download
book 1015.23 KB

H3C Servers

hREST User Guide

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

New H3C Technologies Co., Ltd.

http://www.h3c.com

 

 


Copyright © 2023, New H3C Technologies Co., Ltd. and its licensors

 

All rights reserved

No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.

Trademarks

Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.

Notice

The information in this document is subject to change without notice. All contents in this document, including statements, information, and recommendations, are believed to be accurate, but they are presented without warranty of any kind, express or implied. H3C shall not be liable for technical or editorial errors or omissions contained herein.


Contents

Introduction· 1

Command format 1

Applicable products· 2

Software compatibility· 3

HDM compatibility· 3

OS compatibility· 3

Use the hREST command tool 3

Manage the server with the hREST command tool 5

Obtain command help information· 5

Obtain CPU information· 7

Obtain memory information· 9

Obtain physical drive information· 10

Disable or enable a physical drive· 12

Obtain logical drive information· 12

Create a logical drive· 14

Delete a logical drive· 16

Configure a logical drive· 16

Obtain storage controller information· 17

Obtain storage information· 18

Obtain event log messages· 20

Delete event log messages· 22

Obtain network port information· 22

Configure IPv4 address settings for a network port 25

Configure IPv6 address settings for a network port 25

Obtain network port VLAN information· 26

Configure VLAN settings for a network port 27

Obtain the network port mode· 27

Set the network port mode· 28

Obtain network adapter information· 28

Obtain IP-based login rule information· 30

Configure an IP-based login rule· 31

Obtain NVMe SSD information· 32

Obtain power capping information· 32

Configure power capping· 33

Obtain power supply information· 34

Set the active/standby state of a power supply· 35

Power on or power off the server 35

Obtain device information· 36

Set the asset tag· 38

Set a host name· 38

Obtain user role information· 39

Assign role group privileges· 40

Obtain boot settings· 40

Configure system boot settings· 41

Obtain health status· 42

Obtain HDM operation logs· 43

Obtain system time· 44

Set the time zone· 44

Obtain temperature information· 45

Obtain user information· 46

Add a user 48

Edit a user 49

Delete a user 50

Obtain BIOS settings· 51

Configure BIOS settings· 51

Obtain pending BIOS settings· 52

Restore the BIOS settings· 52

Restore the BMC settings· 53

Obtain fan information· 53

Set the fan speed· 55

Disable inband management of HDM users· 56

Export configuration· 56

Import configuration· 57

Obtain firmware information· 57

Obtain NTP information· 58

Configure NTP settings· 59

Obtain SNMP information· 60

Configure SNMP settings· 62

Obtain service information· 63

Configure service settings· 64

Download SDS logs· 65

Obtain virtual media information· 66

Mount or unmount virtual media· 67

Upgrade the firmware· 68

Obtain PCIe device list 69

Take a screenshot of KVM·· 70

Configure advanced LDAP settings· 71

Obtain LDAP information· 72

Add or edit an LDAP user 73

Delete an LDAP user 75

Configure AD settings· 75

Obtain AD information· 76

Add or edit an AD user 77

Delete an AD user 79

Obtain GPU information· 79

Obtain VNC session information· 80

Obtain the firewall status· 81

Set the firewall status· 81

Obtain components using a serial port 82

Configure the components to use a serial port 83

Locate a physical drive· 83

Obtain storage media alarm thresholds· 84

Set a storage media alarm threshold· 85

Obtain event subscription information· 85

Upload an SSH secret key· 86

Delete an SSH secret key· 87

Obtain two-factor authentication settings· 87

Configure two-factor authentication settings· 88

Obtain LLDP information· 88

Configure LLDP settings· 89

Obtain DNS information· 90

Configure the DNS service· 91

Obtain system performance information· 92

Configure system performance alarm thresholds· 93

Obtain video recording configuration· 93

Configure video recording· 94

Configure the power mode· 95

Scan the servers for memory module failures· 96

Disable the HDM shared network port 97

Obtain NCSI status for the shared network port 98

Configure NCSI status for the shared network port 98

Set the VNC password· 99

Obtain SMTP information· 99

Configure SMTP settings· 100

Export operation log· 102

 


Introduction

hREST, developed by using Python, is a server management command tool based on HTTPs, Redfish, RESTful, and IPMI. It allows users to use commands to obtain server information and configure servers.

Command format

An hREST command format varies by management mode:

·     In out-of-band management mode, an hREST command uses the hREST -H host -p port–q ipmi_port -U username -P password <command> format, where:

¡     -H host—Specifies the HDM IP address of the managed device.

¡     -p port—Specifies the HTTPS port number. By default, the port number is 443. This option is optional.

¡     –q ipmi_port—Specifies the IPMI port number. By default, the port number is 623. This option is optional.

¡     -U username -P password—Specifies the HDM username and password of the managed device. Unless otherwise specified, use an administrator account as a best practice to avoid operation failures caused by insufficient privileges.

¡     <command>—Specifies which action to take on which instance.

 

 

NOTE:

·     The hREST command arguments are case-sensitive.

·     Avoid using special character combinations that are related to the operating system. To use such special characters, use quotation marks (") or single quotation marks (') to quote them as a best practice.

 

·     In in-band management mode, an hREST command use the hREST -p port <command> format, where:

¡     -p port—Specifies the HTTPS port number. By default, the port number is 443. This option is optional.

¡     –q ipmi_port—Specifies the IPMI port number. By default, the port number is 623. This option is optional.

¡     <command>—Specifies which action to take on which instance.

 

 

NOTE:

·     The hREST command arguments are case-sensitive.

·     Only some features support in-band management. For more information, see the specific command. Before using the in-band management mode, install the hdmdrv driver and use in-band management command ipmitool raw 0x36 0x09 0xa2 0x63 0x00 0x1a 0x11 0x00 to enable the USB channel.

·     To install the hdmdrv driver, execute the insmod hdmdrv.ko command.

·     As a best practice, use ipmitool raw 0x36 0x09 0xa2 0x63 0x00 0x1a 0x11 0x01 to disable the USB channel after completing tasks in in-band management mode. If you do not do so, hdmdrv-related devices will be displayed in the system.

 

The in-band management mode cannot be used concurrently.

If you have used KVM to access the system and KVM is idle for a long time or is manually closed, the USB channel might be disconnected. In this case, re-enable the USB channel.

As a best practice, use the root user to install the in-band driver and use the in-band management mode to avoid operation failure due to lack of permissions.

Applicable products

This document is applicable to the following products:

·     AE100

·     H3C UniServer B5700 G6

·     H3C UniServer R4700 G6

·     H3C UniServer R4700LE G6

·     H3C UniServer R4900 G6

·     H3C UniServer R4900 G6 Ultra

·     H3C UniServer R4900LE G6

·     H3C UniServer R4950 G6

·     H3C UniServer R5300 G6

·     H3C UniServer R5350 G6

·     H3C UniServer R5500 G6

·     H3C UniServer R6700 G6

·     H3C UniServer R6900 G6

·     H3C UniServer B5700 G5

·     H3C UniServer R4300 G5

·     H3C UniServer R4330 G5

·     H3C UniServer R4330 G5 H3

·     H3C UniServer R4700 G5

·     H3C UniServer R4700LC G5

·     H3C UniServer R4900 G5

·     H3C UniServer R4900LC G5

·     H3C UniServer R4930 G5

·     H3C UniServer R4930 G5 H3

·     H3C UniServer R4930LC G5 H3

·     H3C UniServer R4950 G5

·     H3C UniServer R5300 G5

·     H3C UniServer R5500 G5

·     H3C UniServer R5500LC G5

·     H3C UniServer R6900 G5

·     H3C UniServer B5700 G3

·     H3C UniServer B5800 G3

·     H3C UniServer B7800 G3

·     H3C UniServer E3200 G3

·     H3C UniServer R2700 G3

·     H3C UniServer R2900 G3

·     H3C UniServer R4100 G3

·     H3C UniServer R4300 G3

·     H3C UniServer R4500 G3

·     H3C UniServer R4700 G3

·     H3C UniServer R4900 G3

·     H3C UniServer R4950 G3

·     H3C UniServer R5300 G3

·     H3C UniServer R6700 G3

·     H3C UniServer R6900 G3

·     H3C UniServer R8900 G3

·     H3C UniStor X10000 G3

Software compatibility

HDM compatibility

Item

Compatible versions

HDM

Recommended: HDM-1.30.15 or later

Some commands might require specific HDM versions. For more information, see the specific command. hREST only supports universal HDM versions. For custom requirements, see the exclusively released versions.

 

OS compatibility

Item

Compatible versions

Windows OSs (64-bit)

Windows Server 2012 R2

Windows 7

Windows 10

Linux OSs (64-bit)

CentOS 6.2

CentOS 7.3

Redhat

Redhat 9.0

 

 

NOTE:

hREST might not be available in other OSs or OS versions. In-band management is supported only in Linux OSs in the current software version.

 

Use the hREST command tool

The hREST command tool does not require installation.

To use the hREST command tool:

1.     Copy the tool project file to the operating system. The file name is hREST_Linux_Vx.xx.tar.gz for Linux OSs and hREST_Windows_Vx.xx.zip for Windows OSs.

The project file contains the basic Python running package, Redfish source codes, and external packages on which the tool depends.

2.     Decompress the file and access the hREST_Linux_Vx.xx or hREST_Windows_Vx.xx directory.

3.     Access the bin folder.

4.     Enter the corresponding command and then press Enter to execute the command.

¡     For Linux, enter ./hREST -H host -p port -U username -P password <command>.

¡     For Windows, enter hREST -H host -p port -U username -P password <command>.

For driver installation in in-band management mode, perform the following steps:

1.     Copy the compatible in-band driver package (hdmdrv.ko) to the system;

2.     Use insmod hdmdrv.ko to install the driver.

3.     After installation, verify that the driver is installed successfully with lsmod | grep hdmdrv;

4.     To uninstall the driver, use rmmod hdmdrv.ko.


Manage the server with the hREST command tool

Obtain command help information

Perform this task to obtain command help information.

Syntax

hREST –h

hREST --help

Examples

# Obtain command help information.

-> hREST –h

usage: hREST [-h] [-V] [-H HOST] [-p PORT] [-q IPMI_PORT] [-U USERNAME]

             [-P PASSWORD]

             sub command ...

optional arguments:

  -h, --help        show this help message and exit

  -V, --version     show program's version number and exit

  -H HOST           domain name, IPv4 address,or [IPv6 address]

  -p PORT           port

  -q IPMI_PORT      ipmi_port

  -U USERNAME       local or LDAP username

  -P PASSWORD       password

sub commands:

  sub command       sub-command help

    addaduser       add ad user.

    addldapuser     add ldap user.

    addldisk        create logical disk.

    adduser         add user.

    delelog         delete event log.

    closeinner      close inner user setting.

    getsdslog       get sds log.

    deladuser       delete ad user.

    delldapuser     delete ldap user.

    delldisk        delete logical disk.

    deluser         delete user by username.

    downloadconfig  download configuration.

    fwupdate        fwupdate command.

    getbios         get BIOS information.

    getbiossetting  set pending bios setting.

    getcpu          get CPUs information.

    getgpu          get GPUs information.

    getelog         get event log.

    getfan          get fan information.

    getfirewall     get firewall status.

    setfirewall     set firewall status.

    getfwv          get firmware version.

    gethdmlog       get hdm log.

    getsyshealth    get system health state.

    getip           get ip information.

    getvlan         get vlan information.

    getvncsession   get vnc session info.

    getldisk        get logical drive information.

    getloginruleip  get ip login rule.

    getmemory       get memory information.

    getnetmode      get net mode.

    getnic          get nic information.

    getntp          get ntp information.

    getnvmessd      get nvme ssd information.

    getpcie         get pcie information.

    getpdisk        get physical disk information.

    getpowerlimit   get power limit.

    getproductinfo  get product information.

    getpsu          get power information.

    getraid         get raid information.

    getrole         get role information.

    setrole         set role rivileges.

    getscreencapture

                    get virtual media information.

    getsensor       get sensors information.

    geteventsub     get event subscription information.

    getservice      get service information.

    getsnmp         get snmp information.

    getsmtp         get smtp information.

    setsmtp         set smtp information.

    getstorage      get storage information.

    getsysboot      get system boot information.

    setsysboot      set system boot.

    gettemp         get temperature information.

    getthreshold    get predictive failure threshold.

    setthreshold    set predictive failure threshold.

    gettime         get system time.

    getuser         get user information.

    getvmm          get virtual media information.

    mountvmm        mount or unmount virtual media.

    setbiosdefault  set bios default.

    setbmcdefault   set bmc default.

    syspowerctrl    system power control options.

    setad           set ad(Active Directory).

    setbios         set bios parameter.

    setfan          set fan speed.

    setshareport    set the BMC shareport.

    setipv4         set IPv4 information of the BMC network port.

    setipv6         set IPv6 information of the BMC network port.

    locatedisk      locate the physical disk by LED lights.

    setvlan         set VLAN information.

    setldap         set ldap.

    setloginruleip  add ip login rule.

    setnetmode      set net mode.

    getncsi         get ncsi status.

    setncsi         set ncsi status.

    setntp          set ntp information.

    setpdisk        set physical disk information.

    setpowerlimit   set power limit.

    setpmb          set power main/backup.

    setassettag     set product information.

    sethostname     set hostname information.

    getserialport   get serial port information.

    setserialport   set serial port.

    setservice      set service configuration.

    setsnmp         set snmp information.

    settimezone     time zone. for example, UTC+9 and UTC-3.

    setuser         set user.

    uploadconfig    download configuration.

    importsshkey    import SSH key.

    delsshkey       delete SSH key.

    getldap         get ldap configuration information.

    getad           get ad configuration information.

    get2factorauth  get two-factor authentication configuration information.

    set2factorauth  configure two-factor authentication attributes.

    getdns          get dns configuration information.

    setdns          DNS configuration.

    getlldp         get lldp information.

    setlldp         set LLDP service properties.

    getsysperf      get system performance information.

    setsysperf      set the host monitoring alarm threshold.

    getvideocfg     get video recording function configuration.

    setvideocfg     set video recording function.

    setldisk        set logical disk properties.

    setpsu          power configuration.

    memoryinspect   memory inspect.

    setvnc          set vnc.

    exportlog       export operator log.

    gethardware     get hardware information.

    sendipmirawcmd  send ipmi raw command.

Obtain CPU information

Perform this task to obtain CPU information.

Syntax

hREST -H host -p port -U username -P password getcpu -CI cpu_id

Parameters

Table 1 Parameter description

Parameter

Description

Value

cpu_id

CPU ID.

Optional.

If you do not specify this argument, the command displays information about all CPUs.

 

Examples

# Obtain information about CPU 2.

-> hREST –H 192.168.10.6 –U ****** -P ****** getcpu –CI 2

--------------------------------------------------

Id                                      : 2

Name                                    : CPU2

FrequencyMHz                            : 3200

L1CacheKiB                              : 768

L2CacheKiB                              : 12288

L3CacheKiB                              : 12288

Temperature                             : 62

ProcessorType                           : CPU

ProcessorArchitecture                   : x86

InstructionSet                          : x86-64

Manufacturer                            : Intel(R) Corporation

Model                                   : Intel(R) Xeon(R) Gold 6146 CPU @ 3.20GHz

MaxSpeedMHz                             : 255

TotalCores                              : 12

TotalThreads                            : 24

Socket                                  : 2

 

[Status]

Health                                  : OK

State                                   : Enabled

 

[ProcessorId]

IdentificationRegisters                 : BF-EB-FB-FF-00-05-06-54

--------------------------------------------------

Table 2 Command output

Field

Description

Id

CPU ID.

Name

CPU name.

FrequencyMHz

CPU frequency.

L1CacheKiB

CPU L1 cache size.

L2CacheKiB

CPU L2 cache size.

L3CacheKiB

CPU L3 cache size.

ProcessorType

CPU type.

ProcessorArchitecture

CPU architecture.

InstructionSet

CPU instruction set.

Manufacturer

CPU manufacturer.

Model

CPU model.

MaxSpeedMHz

CPU maximum speed.

TotalCores 

CPU cores.

TotalThreads

CPU total threads.

Socket

CPU socket ID.

State

CPU enabling status.

Health

CPU health status.

IdentificationRegisters

CPU ProcessID.

 

Obtain memory information

Perform this task to obtain memory information.

Syntax

hREST -H host -p port -U username -P password getmemory -MI memory_id

Parameters

Table 3 Parameter description

Parameter

Description

Value

memory_id

Memory module name.

Optional.

If you do not specify this argument, the command displays information about all memory modules.

 

Usage guidelines

The command is available in in-band management mode.

Examples

# Obtain information about memory module CPU1channel 3 in slot D0.

-> hREST –H 192.168.10.6 –U ****** -P ****** getmemory –MI CPU1CH3D0

--------------------------------------------------

CommonName                              : CPU1CH3D0

CapacityMiB                             : 32768

Manufacturer                            : Micron

Model                                   : 18ASF4G72PDZ-2G9E1

SerialNumber                            : S802C0F20212847D95C

OperatingSpeedMhz                       : 2933

MemoryDeviceType                        : DDR4

DataWidthBits                           : 64

RankCount                               : 2

PartNumber                              : 18ASF4G72PDZ-2G9E1

[MemoryLocation]

Position                                : CPU1

Channel                                 : 3

Slot                                    : D0

[Status]

State                                   : Enabled

Health                                  : OK

--------------------------------------------------

Table 4 Command output

Field

Description

CommonName

CPU ID and memory module slot.

CapacityMiB

Memory module capacity.

Manufacturer

Memory module manufacturer.

Model

Memory module model.

SerialNumber

Memory module serial number.

OperatingSpeedMhz

Memory module operating speed.

MemoryDeviceType

Memory module device type.

DataWidthBits

Memory data width.

RankCount

Memory module ranks.

PartNumber

Memory module part number.

MemoryLocation

Memory module location.

Position

ID of the CPU that manages the memory module.

Channel

Memory module channel.

Slot

Memory module slot number.

State

Memory module enabling status.

Health

Memory module health status.

 

Obtain physical drive information

Perform this task to obtain physical drive information.

Syntax

hREST -H host -p port -U username -P password getpdisk -PI physical_id

Parameters

Table 5 Parameter description

Parameter

Description

Value

physical_id

Physical drive ID (physical drive number in the BIOS).

Optional.

If you do not specify this argument, the command displays information about all physical drives.

 

Usage guidelines

The command is available in in-band management mode.

Examples

# Obtain information about physical drive 0.

-> hREST –H 192.168.10.6 –U ****** -P ****** getpdisk –PI 0

--------------------------------------------------

Panel                                   : Front

Slot_phys_no                            : 11

Slot                                    : Front 11

Connection id                           : 0

Drive number in BIOS                    : 3

Drive number in OS                      : 3

Status                                  : Ready

Model                                   : ATA INTEL SSDSC2BB12

Firmware version                        : 0140

Serial number                           : PHWA606300D5120CGN 

Property                                : 6 Gbps SATA SSD

Capacity                                : 0.11TiB

ControllerID                            : 0

 

[Status]

Health                                  : OK

State                                   : Enabled

--------------------------------------------------

Table 6 Command output

Field

Description

Panel

Panel location.

Slot_phys_no

Physical drive slot number.

Slot

Physical drive slot location and slot number.

Connection id

Physical drive connection ID, used for logical drive creation.

Drive number in BIOS

Physical drive number in the BIOS.

Drive number in OS

Physical drive number in the OS.

Status

Physical drive status.

Model

Physical drive model.

Firmware version

Physical drive firmware version.

Serial number

Physical drive serial number.

Property

Physical drive properties.

Capacity

Physical drive storage capacity.

PredictedMediaLifeLeftPercent

Remaining life of the physical drive in percentage. This field displays None when the feature is not supported.

ControllerID

ID of the storage controller to which the physical drive is connected.

State

Physical drive enabling status.

Health

Physical drive health status.

 

Disable or enable a physical drive

Perform this task to disable or enable a physical drive.

Syntax

hREST -H host -p port -U username -P password setpdisk -CI controller_id –PI physical_id -S status -B BIOSId -I SlotId LI logical_id

Parameters

Table 7 Parameter description

Parameter

Description

Value

controller_id

Storage controller ID.

Optional.

physical_id

Physical drive ID (connection ID of the drive).

Optional.

logical_id

Logical drive ID.

Optional.

This ID can be obtained from the logical drive set.

status

Physical drive status.

Optional. Supported options:

·     Enable.

·     Disable.

·     JBOD.

BIOSId

Physical drive ID in the BIOS.

Optional.

If you do not specify this argument, the BIOS ID is displayed as 0 in logs for the physical drive.

SlotId

Slot ID.

Optional.

If you do not specify this argument, the BIOS ID is displayed as 0 in logs for the physical drive.

 

Usage guidelines

You can use this command to configure a correctly connected physical drive that is not used by any logical drives.

Examples

# Disable logical drive 22 of controller 0.

-> hREST –H 192.168.10.6 –U ****** -P ****** setpdisk -CI 0 -PI 22 -S Disable

Success: set physical drive successfully

Obtain logical drive information

Perform this task to obtain information about a logical drive.

Syntax

hREST -H host -p port -U username -P password getldisk -CI controller_id –LI logical_id

Parameters

Table 8 Parameter description

Parameter

Description

Value

controller_id

Storage controller ID.

Optional.

If you do not specify this argument, the command displays information on all controllers.

logical_id

Logical drive ID.

Optional.

If you do not specify this argument, the command displays information about all logical drives. Make sure the specified drive ID exists.

 

Examples

# Obtain information about logical drive 3 managed by controller 0.

-> hREST –H 192.168.10.6 –U ****** -P ****** getldisk –CI 0 –LI 3

--------------------------------------------------

RaidControllerID                        : 0

Logical Drive Id                        : 3

LogicDiskName                           :

CapacityGiB                             : 400

RaidLevel                               : RAID 0

OptimumIOSizeBytes                      : 65536

DriveCache                              : Unchanged

CurrentReadPolicy                       : No Read Ahead

CurrentWritePolicy                      : Write Through

CurrentIOPolicy                         : Direct

CurrentCachePolicy                      : Direct

BootEnable                              : True

Drives                                  : 1, 2

Health                                  : OK

--------------------------------------------------

Table 9 Command output

Field

Description

RaidControllerID

Storage controller ID.

Logical Drive Id

Logical drive ID.

LogicDiskName

Logical drive name.

CapacityGiB

Logical drive capacity.

RaidLevel

Logical drive RAID level.

OptimumIOSizeBytes

Logical drive stripe size. Supported options:

·     16384—16 KB.

·     32768—32 KB.

·     65536—64 KB.

·     131072—128 KB.

·     262144—256 KB.

·     524288—512 KB.

·     1048576—1 MB.

DriveCache

Logical drive cache policy.

CurrentReadPolicy

Logical drive read policy.

CurrentWritePolicy

Logical drive write policy.

CurrentIOPolicy

Logical drive I/O policy.

CurrentCachePolicy

Logical drive cache policy.

BootEnable

Whether the drive is a boot drive.

Drives

IDs of member physical drives.

The physical drive IDs in the OS are displayed.

Health

Logical drive health status.

 

Create a logical drive

Perform this task to create a logical drive.

Syntax

hREST -H host -p port -U username -P password addldisk -CI controlerid -N volumename –OV optsizebytes –M initmode –VL volumeraidlevel –CNI drivesid –SN spannumber –RP readpolicy –WP writepolicy –IP iopolicy –DCP cachepolicy –AP accesspolicy –V capacity –SU sizeunit –AM acceleration_method

User role

admin

Parameters

Table 10 Parameter description

Parameter

Description

Value

controllerid

Storage controller ID.

Required.

volumename

Logical drive name.

Optional.

optsizebytes

Stripe size.

Optional. Supported options:

·     64.

·     128.

·     256.

·     512.

·     1024.

initmode

Initialization type.

Optional. Supported options:

·     No.

·     Fast.

·     Full.

volumeraidlevel

RAID level.

Optional. Supported options:

·     RAID0.

·     RAID1.

·     RAID5.

·     RAID6.

·     RAID00.

·     RAID10.

·     RAID50.

·     RAID60.

drivesid

Member physical drives.

Required.

Specify the physical drive connection ID and span ID in the [connectionID:spanID] format.

To specify multiple member drives, use an underscore (_) to separate the drive information, for example, [26:0_23:0].

spannumber

Span quantity.

Optional.

readpolicy

Read policy.

Optional. Supported options:

·     NoReadAhead.

·     ReadAhead.

writepolicy

Write policy.

Optional. Supported options:

·     WriteThrough.

·     WriteBack.

·     AlwaysWriteBack.

iopolicy

I/O policy.

Optional. Supported options:

·     Direct.

·     CachedWrite.

cachepolicy

Cache policy.

Optional. Supported options:

·     Unchanged.

·     Enabled.

·     Disabled.

accesspolicy

Access policy.

Optional. Supported options:

·     ReadWrite.

·     ReadOnly.

·     Blocked.

capacity

Logical drive capacity.

Optional.

sizeunit

Capacity unit.

Optional. Supported options:

·     MB.

·     GB.

·     TB.

acceleration_method

Acceleration method.

Available only for PMC controllers. Supported options:

·     1—None.

·     2—Controller Cache.

·     3—IO Bypass (available only on SSDs).

 

Usage guidelines

This command is available only for storage controllers supported by HDM out-of-band management.

Examples

# Create a logical drive. The logical drive properties are as follows:

·     Controller ID 0.

·     Logical drive name dragon.

·     Stripe size 64.

·     Initialization type No.

·     RAID level 1.

·     Two member physical drives with connection IDs 26 and 23 in span 0.

·     Two member drives per span.

·     Write policy WriteThrough, I/O policy Cached, cache policy Enabled, and access policy ReadOnly.

·     Capacity 600 GB.

·     Acceleration method None.

-> hREST –H 192.168.10.6 –U ****** -P ****** addldisk -CI 0 -N dragon -OV 64 -M No  -VL RAID1 -CNI [26:0_23:0] -SN 1 -RP NoReadAhead -WP WriteThrough -IP Cached -DCP Enabled -AP ReadOnly -V 600 -SU GB -AM 1

Success: add logical drive successfully

Delete a logical drive

Perform this task to delete a logical drive.

Syntax

hREST -H host -p port -U username -P password delldisk -CI controlerid -LI logicalid

Parameters

Table 11 Parameter description

Parameter

Description

Value

controllerid

Storage controller ID.

Required.

logicalid

Logical drive ID.

Required.

 

Examples

# Delete logical drive 3 managed by storage controller 0.

-> hREST –H 192.168.10.6 –U ****** -P ****** delldisk -CI 0 -LI 3

Success: delete logical driver successfully

Configure a logical drive

Perform this task to configure a logical drive.

Syntax

hREST -H host -p port -U username -P password setldisk -CI raidID –LI logicalID –WP writePolicy –RP readPolicy -AP AccessPolicy -CP DriveCache

Parameters

Table 12 Parameter description

Parameter

Description

Value

raidID

RAID controller ID.

Optional.

logicalID

Logical drive ID.

Optional.

writePolicy

Write policy.

Optional. Supported options:

·     WriteBack.

·     WriteThrough.

·     AlwaysWriteBack.

readPolicy

Read policy.

Optional. Supported options:

·     NoReadAhead.

·     ReadAhead.

AccessPolicy

Access policy.

Optional. Supported options:

·     Read/Write.

·     ReadOnly.

·     Blocked.

This field is not available for PMC storage controllers.

DriveCache

Drive cache policy.

Optional. Supported options:

·     Optional.

·     Enable.

·     Disable.

This field is not available for PMC storage controllers.

 

Usage guidelines

This command is supported by HDM-2.33 and later versions.

You cannot use this command to configure logical drives managed by PMC storage controllers.

G3 and G5 servers added support for configuring access policies and cache policies in HDM-6.05. The read policy and write policy of G6 servers are the default read policy and the default write policy.

Examples

# Configure write policy WriteThrough and read policy NoReadAhead for logical drive 0 managed by storage controller 0.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setldisk -CI 0 -LO 0 -WP WriteThrough -RP NoReadAhead

Success: set logical disk properties successfully

Obtain storage controller information

Perform this task to obtain information about a storage controller.

Syntax

hREST -H host -p port -U username -P password getraid

Examples

# Obtain information about storage controller 0.

-> hREST –H 192.168.10.6 –U ****** -P ****** getraid

--------------------------------------------------

CommonName                              : RAIDStorage0

SerialNumber                            : SP73513465

State                                   : Enabled

Health                                  : OK

Controller

    Id                                  : 0

    Manufacturer                        : LSI

    Model                               : HBA-LSI-9440-8i

    SupportedDeviceProtocols            : ['SAS']

    SASAddress                          : null

    FirmwareVersion                     : 5.010.01-0671

    PackageVersion                      : None

    JBODState                           : Disabled

    MemorySizeMiB                       : null

    SupportedRAIDLevels                 : RAID0, RAID1, RAID5, RAID10, RAID50

    [CapacitanceStatus]

        State                           : Absent

        Health                          : None

    ----------------------------------------------

--------------------------------------------------

Table 13 Command output

Field

Description

CommonName

Storage controller name.

SerialNumber

Storage controller serial number.

State

Storage controller enabling status.

Health

Storage controller health status.

Id

Storage controller ID.

Manufacturer

Manufacturer.

Model

Storage controller model.

SupportedDeviceProtocols

Protocols supported by the storage controller.

SASAddress

Storage controller address.

FirmwareVersion

Storage controller firmware version.

PackageVersion

Package version of LSI storage controllers.

JBODState

JBOD state.

MemorySizeMiB

Memory size.

SupportedRAIDLevels

Supported RAID levels.

CapacitanceStatus.State

Enabling status of the supercapacitor.

CapacitanceStatus.Health

Health status of the supercapacitor.

 

Obtain storage information

Perform this task to obtain storage information.

Syntax

hREST -H host -p port -U username -P password getstorage -CI controlerid

Parameters

Table 14 Parameter description

Parameter

Description

Value

controllerid

Storage controller ID.

Optional.

If you do not specify this argument, the command displays information for all storage controllers.

 

Examples

# Obtain storage information for storage controller 0.

-> hREST –H 192.168.10.6 –U ****** -P ****** getstorage –CI 0

--------------------------------------------------

Ctrl_id                                 : 0

Raid card model                         : HBA-LSI-9440-8i

Firmware version                        : 5.010.01-0671

Serial number                           : SP73513465

DDR size                                :

Flash                                   :

Supercapacitor                          :

Charging status                         :

Support RAID Level                      : 0/1/5/10/50

 

Volumes

    Id                                  : 3

    Status                              : Optimal

    Level                               : RAID 0

    Capacity                            : 400GiB

    Element                             : 2

    Drives                              : 1,2

    ----------------------------------------------

    Id                                  : 1

    Status                              : Optimal

    Level                               : RAID 0

    Capacity                            : 223.060GiB

    Element                             : 1

    Drives                              : 0

    ----------------------------------------------

    Id                                  : 2

    Status                              : Optimal

    Level                               : RAID 0

    Capacity                            : 500GiB

    Element                             : 1

    Drives                              : 4

    ----------------------------------------------

    Id                                  : 0

    Status                              : Optimal

    Level                               : RAID 1

    Capacity                            : 600GiB

    Element                             : 2

    Drives                              : 5,7

    ----------------------------------------------

Drives                                  : 0, 1, 2, 3, 4, 5, 6, 7

--------------------------------------------------

Table 15 Command output

Field

Description

Ctrl_id

Storage controller ID.

Raid card model

Storage controller model.

Firmware version

Storage controller firmware version.

Serial number

Storage controller serial number.

DDR size

Storage controller DDR size.

Flash

Flash card state.

Supercapacitor

Supercapacitor state.

Charging status

Supercapacitor charging status.

Support RAID Level

Supported RAID levels.

Id

Logical drive ID.

Status

Logical drive status.

Level

RAID level.

Capacity

Logical drive capacity.

Element

Member physical drivers of the logical drive.

Volumes.Drives

IDs of member physical drives.

Drives

IDs of all physical drives managed by the storage controller.

 

Obtain event log messages

Perform this task to obtain event log messages.

Syntax

hREST -H host -p port -U username -P password getelog -C count -T time -F file_path

Parameters

Table 16 Parameter description

Parameter

Description

Value

count

Number of event log messages to obtain.

Optional.

If you do not specify this argument, the command displays all event log messages. The maximum number depends on the window limit.

time

Time range of log messages to obtain.

Optional.

The time format is YYYY-MM-DDTHH:MM:SS+HH:MM. for example, 2019-03-13T03:24:45+08:00.

file_path

Path of a log file.

Optional.

 

Examples

# Obtain one event log message.

-> hREST –H 192.168.10.6 –U ****** -P ****** getelog –C 1

--------------------------------------------------

Id                                      : 1

Record type                             : system_event_record

Time                                    : 2020-07-04 02:37:27

System software type                    : system_management_software

Generator type                          : ipmb_slave_address

Channel number                          : 0

Ipmb lun                                : 0

Event format ipmi version               : 4

Sensor type                             : Microcontroller / Coprocessor

Type number                             : 22

Sensor number                           : 255

Sensor name                             : Microcontroller

Event direction                         : asserted

Event reading class                     : discrete

Sensor reading value                    : 0

Triggered value                         : 0

Sensor reading value type               : unspecified

Triggered type                          : unspecified

Event description                       : BMC reset

Level                                   : 1

--------------------------------------------------

Table 17 Command output

Field

Description

Id

Log message ID.

The ID used by the HDM backstage is displayed, instead of the ID on the Web interface.

Record type

Event type. Supported options:

·     system_event_record.

·     oem_record.

Time

Message generation time.

System software type

Event source. Supported options:

·     bios.

·     smi_handler.

·     system_management_software.

·     system_software_oem.

·     remote_console_software.

·     oem.

·     terminal_mode_remote_console_software.

Generator type

Generator type. Supported options:

·     system_software_id.

·     ipmb_slave_address.

Channel number

Channel number.

Ipmb lun

LUN number.

Event format ipmi version

IPMI protocol version.

Sensor type

Sensor type.

Type number

Log type number.

Sensor number

Sensor number.

Sensor name

Sensor name.

Event direction

Alert status. Supported options:

·     assertedThe event alarm is to be solved.

·     deassertedThe event alarm has been cleared.

Event reading class

Event reading class. Supported options:

·     threshold.

·     discrete.

·     oem.

Sensor reading value

Sensor reading.

Triggered value

Sensor reading threshold.

Sensor reading value type

Sensor reading type. Supported options:

·     trigger_based.

·     oem_based.

·     sensor_specific.

·     unspecified.

Triggered type

Sensor type.

Event description

Event description.

Level

Event level. Supported options:

·     0Reserved for future use.

·     1Normal.

·     2Minor.

·     3Major.

·     4Critical.

 

Delete event log messages

Perform this task to delete event log messages.

Syntax

hREST -H host -p port -U username -P password delelog

Examples

# Delete event log messages.

-> hREST –H 192.168.10.6 –U ****** -P ****** delelog

Success: clear system event log successfully

Obtain network port information

Perform this task to obtain network port information.

Syntax

hREST -H host -p port -U username -P password getip –NI ethernetid

User role

admin

Parameters

Table 18 Parameter description

Parameter

Description

Value

ethernetid

Network port name.

Optional.

If you do not specify this argument, the command displays information about the network port specified by the host address.

Make sure the specified port name is valid, for example, eth0, eth1, or eth1.401.

 

Usage guidelines

The command cannot obtain temporary IP settings configured through a serial port. If such IP settings are configured, the command returns Failure: Failed to get ip information.

Examples

# Obtain network port information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getip –NI eth0

--------------------------------------------------

Id                                      : eth0

Name                                    : eth0

Description                             : Ethernet Interface eth0

AutoNeg                                 : True

FQDN                                    : HDM210200A00QH17C000002.

FullDuplex                              : True

HostName                                : HDM210200A00QH17C000002

MACAddress                              : 30:7B:AC:DE:64:B2

IPv6DefaultGateway                      : ::

InterfaceEnabled                        : True

MTUSize                                 : 1500

MaxIPv6StaticAddresses                  : 16

NameServers                             : ::

PermanentMACAddress                     : 30:7B:AC:DE:64:B2

SpeedMbps                               : 1000

 

[Status]

Health                                  : OK

Status                                  : Enabled

IPv4Status                              : True

IPv6Status                              : True

VLANEnable                              : False

 

[IPv4Addresses]

--------------------------------------------------

SubnetMask                              : 255.255.0.0

AddressOrigin                           : DHCP

Address                                 : 192.168.0.13

 

[IPv6Addresses]

--------------------------------------------------

Address                                 : fe80::327b:acff:fede:64b2

AddressOrigin                           : LinkLocal

PrefixLength                            : 64

--------------------------------------------------

Table 19 Command output

Field

Description

Id

Network port ID.

Name

Network port name.

Description

Network port description.

FQDN

Fully qualified domain name (FQDN).

FullDuplex

Full duplex enabling status.

HostName

Host name.

MACAddress

MAC address.

IPv6DefaultGateway

IPv6 default gateway.

InterfaceEnabled

Network port enabling status.

MTUSize

MTU size.

MaxIPv6StaticAddresses

Maximum length of IPv6 static addresses.

NameServers

Primary and secondary DNS server addresses. The primary server address comes first.

This field is available only when the network port is configured to obtain IP addresses through DHCP.

PermanentMACAddress

Permanent MAC address.

SpeedMbps

Transmission speed in Mbps.

Health

Health status.

Status

Enabling status.

IPv4Status

IPv4 enabling status.

IPv6Status

IPv6 enabling status.

VLANEnable

VLAN enabling status.

IPv4Addresses.SubnetMask

IPv4 subnet mask.

IPv4Addresses.AddressOrigin

IPv4 protocol type.

IPv4Addresses.Address

IPv4 address.

IPv6Addresses.Address

IPv6 address.

IPv6Addresses.AddressOrigin

IPv6 protocol type.

IPv6Addresses.PrefixLength

IPv6 prefix length.

 

Configure IPv4 address settings for a network port

Perform this task to configure IPv4 address settings for a network port.

Syntax

hREST -H host -p port -U username -P password setipv4 –N ethernetid –S ipv4enable –IP address –T dhcpenable –G gateway –M subnetmask

Parameters

Table 20 Parameter description

Parameter

Description

Value

ethernetid

Network port name.

Required.

Make sure the specified port name is valid, for example, eth0, eth1, or eth1.401.

ipv4enable

Enable or disable IPv4.

Optional. Supported options:

·     Enabled.

·     Disabled.

address

IP address.

Optional.

dhcpenable

Address obtaining method.

Optional. Supported options:

·     DHCP.

·     Static.

gateway

Gateway address.

Optional.

subnetmask

Subnet mask.

Optional.

 

Usage guidelines

This operation enables the shared network port if the port is disabled.

For the network to operate correctly, make sure IPv6 settings are enabled when you disable IPv4 address settings for the network port.

Examples

# Configure IPv4 address settings for network port eth0.

-> hREST –H 192.168.10.6 –U ****** -P ****** setipv4 -N eth0 -IP 172.16.10.162 -T Static -G 0.0.0.0 -M 255.255.255.0

Success: set network successfully

Configure IPv6 address settings for a network port

Perform this task to configure IPv4 address settings for a network port.

Syntax

hREST -H host -p port -U username -P password setipv6 –N ethernetid –S ipv6enable –IP address –T dhcpenable –G gateway –L prefixlength

Parameters

Table 21 Parameter description

Parameter

Description

Value

ethernetid

Network port name.

Required.

Make sure the specified port name is valid.

ipv6enable

Enable or disable IPv6.

Optional. Supported options:

·     Enabled.

·     Disabled.

address

IP address.

Optional.

dhcpenable

Address obtaining method.

Optional. Supported options:

·     DHCP.

·     Static.

gateway

Gateway address.

Optional.

prefixlength

Prefix length.

Optional.

 

Usage guidelines

This operation enables the shared network port if the port is disabled.

For the network to operate correctly, make sure IPv4 settings are enabled when you disable IPv6 address settings for the network port.

Examples

# Configure IPv6 address settings for network port eth0.

-> hREST –H 192.168.10.6 –U ****** -P ****** setipv6 -N eth0 -IP 2022::10 –T Static –G 2022::1 –L 64

Success: set network successfully

Obtain network port VLAN information

Perform this task to obtain VLAN information on a network port.

Syntax

hREST -H host -p port -U username -P password getvlan -NI ethernetid

Parameters

Table 22 Parameter description

Parameter

Description

Value

ethernetid

Network port name.

Required.

Make sure the specified port name is valid, for example, eth0, eth1, or eth1.401.

 

Examples

# Obtain VLAN information on network port eth0.

-> hREST –H 192.168.10.6 –U ****** -P ****** getvlan –N eth0

--------------------------------------------------

VLANEnable                    : False

VLANId                        : 0

VLANPriority                  : 0

--------------------------------------------------

Table 23 Command output

Field

Description

VLANEnable

VLAN enabling status. Supported options:

·     TrueEnabled.

·     FalseDisabled.

VLANId

VLAN ID.

VLANPriority

VLAN priority. Value 0 indicates that no priority is specified.

 

Configure VLAN settings for a network port

Perform this task to configure VLAN settings for a network port.

Syntax

hREST -H host -p port -U username -P password setvlan –N ethernetid -S vlanenable -I vlanid –P priority

Parameters

Table 24 Parameter description

Parameter

Description

Value

ethernetid

Network port name.

Required.

Make sure the specified port name is valid.

vlanenable

Enable or disable VLAN.

Optional. Supported options:

·     Enabled.

·     Disabled.

vlanid

VLAN ID.

Optional.

Integer in the range of 2 to 4094.

priority

VLAN priority.

Optional.

Integer in the range of 0 to 7.

A larger value represents a higher priority.

 

Usage guidelines

This operation enables the shared network port if the port is disabled.

Examples

# Configure VLAN settings for network port eth0.

-> hREST –H 192.168.10.6 –U ****** -P ****** setvlan -N eth0 -S Enabled -I 5 -P 0

Success: set network successfully

Obtain the network port mode

Perform this task to obtain the network port mode.

Syntax

hREST -H host -p port -U username -P password getnetmode

Examples

# Obtain the network port mode.

-> hREST –H 192.168.10.6 –U ****** -P ****** getnetmode

--------------------------------------------------

PortModes                               : Normal mode

--------------------------------------------------

Table 25 Command output

Field

Description

PortModes

Network port mode. Supported options:

·     Normal mode.

·     Bonding mode.

·     Active/standby mode.

 

Set the network port mode

Perform this task to set the network port mode.

Syntax

hREST -H host -p port -U username -P password setnetmode –M status

Parameters

Table 26 Parameter description

Parameter

Description

Value

status

Network port mode.

Required. Supported options:

·     NormalNormal mode.

·     BondBonding mode.

·     Adaptive—Active/standby mode.

 

Examples

# Set the network port mode to bonding.

-> hREST –H 192.168.10.6 –U ****** -P ****** setnetmode –M Bond

Success: set network port mode succeed

Obtain network adapter information

Perform this task to obtain network adapter information.

Syntax

hREST -H host -p port -U username -P password getnic

hREST getnic

Usage guidelines

The command is available in in-band management mode.

Examples   

# Obtain network adapter information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getnic

--------------------------------------------------

CommonName                              : mLOM

Location                                : mLOM

CardManufacturer                        : H3C

SlotNumber                              : 9

CardModel                               : 2*10GE

SerialNumber                            : 02A3GLH175000029

State                                   : Enabled

Health                                  : OK

Controller

    Id                                  : None

    Manufacturer                        : Intel

    Model                               : NIC-10GE-2P-560T-L2

    FirmwareVersion                     : 1.2585.0

    PortCount                           : 2

    ----------------------------------------------

    Port

        Id                              : 1

        MACAddress                      : ['30:7B:AC:C1:24:54']

        LinkStatus                      : Up

        MediaType                       : ElectricalPort

        ------------------------------------------

        Id                              : 2

        MACAddress                      : ['30:7B:AC:C1:24:55']

        LinkStatus                      : Down

        MediaType                       : ElectricalPort

        ------------------------------------------

--------------------------------------------------

Table 27 Command output

Field

Description

CommonName

Resource name of the network adapter.

Location

Mark of the network adapter.

CardManufacturer

Manufacturer of the network adapter.

SlotNumber

Slot number of the network adapter.

Model

Interface type of the network adapter.

SerialNumber

Serial number of the network adapter.

Controller.Id

Resource ID of the network adapter.

Controller.Manufacturer

Chip manufacturer of the network adapter.

Controller.Model

Model of the network adapter.

Controller.FirmwareVersion

Firmware version of the network adapter.

Controller.PortCount

Number of related network ports for the network adapter.

Controller.Port.Id

Related network port ID for the network adapter.

Controller.Port.MACAddress

Related network port MAC address for the network adapter.

Controller.Port.LinkStatus

Related network port status for the network adapter.

Controller.Port.MediaType

Related network port type for the network adapter.

 

Obtain IP-based login rule information

Perform this task to obtain IP-based login rule information.

Syntax

hREST -H host -p port -U username -P password getloginruleip

Examples

# Obtain IP-based login rule information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getloginruleip

--------------------------------------------------

MemberId                                : 1

IpFrom                                  : 192.168.253.1

IpTo                                    : 192.168.253.2

MacAddress                              : aa:bb:cc:dd:ee:ff

Rule                                    : Blacklist

TimeRange                               : Enabled

TimeFrom                                : 2023-11-17T00:00:00+08:00

TimeTo                                  : 2023-11-18T00:00:00+08:00

Protocol                                : ['TCP', 'UDP']

PortFrom                                : 10096

PortTo                                  : 10100

--------------------------------------------------

Table 28 Command output

Field

Description

MemberId

Rule ID.

IpFrom

Login rule start IP address.

IpTo

Login rule end IP address.

MacAddress

MAC address entries.

Rule

Rule type. Supported options:

·     Whitelist.

·     Blacklist.

TimeRange

Time range enabling status. Supported options:

·     Enabled.

·     Disabled.

TimeFrom

Login rule start time.

TimeTo

Login rule end time.

Protocol

Supported protocols.

PortFrom

Start port number of the login rule.

PortTo

End port number of the login rule.

 

Configure an IP-based login rule

Perform this task to add or delete an IP-based login rule.

Syntax

hREST -H host -p port -U username -P password addloginruleip –O operator –E rule –M macaddress –P starttime –Q endtime -IS ipstart –IE ipend -PS port_start -PE port_end -I member_id -T protocol type

Parameters

Table 29 Parameter description

Parameter

Description

Value

operator

Operation type.

Optional. Supported options:

·     Add—Add a rule.

·     Del—Delete a rule.

rule

Rule type.

Optional. Supported options:

·     Allow—Whitelist rule that allows login.

·     Block—Blacklist rule that blocks login.

macaddress

MAC address.

Optional.

You must specify either the rule or ipstart argument.

starttime

Rule start time.

Optional.

Format: yyyy-mm-ddThh:mm

For example, 2020-06-03T13:10

endtime

Rule end time.

Optional.

Format: yyyy-mm-ddThh:mm

For example, 2020-06-06T13:15

ipstart

Rule start IP address.

Optional.

You must specify either the rule or ipstart argument.

ipend

Rule end IP address.

Optional.

port_start

Rule start port number.

Optional.

The port range is 1 to 65535.

port_end

Rule start port number.

Optional.

The port range is 1 to 65535.

member_id

Member ID.

N/A

protocol type

Protocol type.

Supported options:

·     UDP.

·     TCP.

·     TCP+UDP.

 

Examples

# Create a blacklist rule to block access from IP range 172.16.10.11-172.16.10.13 and set the time range to 2020-05-20T12:22-2020-06-03T13:10.

-> hREST –H 192.168.10.6 –U ****** -P ****** setloginruleip -O Add -E Block -IS 172.16.10.11 -IE 172.16.10.13 -M aa:aa:aa:aa:aa:aa -P 2020-05-20T12:22 -Q 2020-06-03T13:10

Success: set ip login rule succeed

# Delete a blacklist rule.

-> hREST –H 192.168.10.6 –U ****** -P ****** setloginruleip -O Del -E Block -IS 172.16.10.11 -IE 172.16.10.13 -M aa:aa:aa:aa:aa:aa -P 2020-05-20T12:22 -Q 2020-06-03T13:10

Success: set ip login rule succeed

Obtain NVMe SSD information

Perform this task to obtain NVMe SSD information.

Syntax

hREST -H host -p port -U username -P password getnvmessd

Examples

# Obtain NVMe SSD information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getnvmessd

--------------------------------------------------

SlotID                        : N1 Slot 164

VendorName                    : INTEL

ProductName                   : P3520

PDStatus                      : Normal

PercentLife                   : 0

SerialNumber                  : CVPF733500CL450RGN

ModelNumber                   : SSDPE2MX450G7

Capacity                      : 450.0GB

FirmwareVersion               : MDV10271

PortType                      : PCIe

--------------------------------------------------

Table 30 Command output

Field

Description

SlotID

PCIe slot.

VendorName

SSD manufacturer.

ProductName

SSD product name.

PDStatus

NVMe SSD status.

PercentLife

Percentage of NVMe SSD life used.

SerialNumber

SSD serial number.

ModelNumber

SSD model number.

Capacity

SSD capacity.

FirmwareVersion

SSD firmware version.

PortType

SSD port type.

 

Obtain power capping information

Perform this task to obtain power capping information.

Syntax

hREST -H host -p port -U username -P password getpowerlimit

Usage guidelines

This command is unavailable for blade servers.

Examples

# Obtain power capping information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getpowerlimit

--------------------------------------------------

PowerLimitEnable                        : False

LimitInWatts                            : 500

LimitException                          : HardPowerOff

--------------------------------------------------

Table 31 Command output

Field

Description

PowerLimitEnable

Power capping enabling status. Supported options:

·     TrueEnabled.

·     FalseDisabled.

LimitInWatts

Power cap value.

LimitException

Action to take upon a power capping failure. Supported options:

·     HardPowerOff.

·     NoAction.

 

Configure power capping

Perform this task to configure power capping.

Syntax

hREST -H host -p port -U username -P password setpowerlimit -S status -V limitvalue –E exception

Parameters

Table 32 Parameter description

Parameter

Description

Value

status

Enable or disable power capping.

Optional. Supported options:

·     Enable.

·     Disable.

limitvalue

Power cap value.

Optional.

The value range is 150 to 10000.

exception

Action to take upon a power capping failure.

Optional. Supported options:

·     Shutdown.

·     NoAction.

 

Usage guidelines

Blade servers do not support power capping.

Examples

# Enable power capping, set the power cap value to 600, and configure the system not to perform any action upon a power capping failure.

-> hREST –H 192.168.10.6 –U ****** -P ****** setpowerlimit -S Enable -V 600 -E NoAction

Success: set power limit succeed

Obtain power supply information

Perform this task to obtain power supply information.

Syntax

hREST -H host -p port -U username -P password getpsu

hREST getpsu

Usage guidelines

The command is available in in-band management mode.

Examples

# Obtain power supply information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getpsu

--------------------------------------------------

Name                                    : PSU1

Model                                   : PSR550-12A

SerialNumber                            : N/A

PowerSupplyType                         : No-input

PowerCapacityWatts                      : 550

PowerOutputWatts                        : 108

LineInputVoltageType                    : ACMidLine

LineInputCurrent                        : 0.667

FirmwareVersion                         : 1M.0009.0021.001

PowerID                                 : 1

SlotNumber                              : 0

ActiveStandby                           : Active

 

[Status]

Health                                  : Critical

State                                   : Enabled

--------------------------------------------------

Table 33 Command output

Field

Description

Name

Power supply name.

Model

Power supply model.

SerialNumber

Power supply serial number.

PowerSupplyType

Power supply type.

PowerCapacityWatts

Total power.

PowerOutputWatts

Output power of the power supply.

LineInputVoltageType

Input voltage type.

LineInputCurrent

Input current of the power supply.

FirmwareVersion

Power supply firmware version.

PowerID

Power supply ID.

SlotNumber

Power supply slot number.

ActiveStandby

Power supply active/standby state.

State

Power supply enabling status.

Health

Power supply health status.

 

Set the active/standby state of a power supply

Perform this task to set the active/standby state of a power supply.

Syntax

hREST -H host -p port -U username -P password setpmb -I powerid -S status

Parameters

Table 34 Parameter description

Parameter

Description

Value

powerid

Power supply ID.

Required.

status

Power supply state.

Optional. Supported options:

·     Active.

·     Standby.

 

Examples

# Specify power supply 2 as a standby power supply.

-> hREST –H 192.168.10.6 –U ****** -P ****** setpmb –I 2 –S Standby

 Success: set power redundancy succeed

Power on or power off the server

Perform this task to power on or power off the server.

Syntax

hREST -H host -p port -U username -P password syspowerctrl -T type

Parameters

Table 35 Parameter description

Parameter

Description

Value

type

Power action.

Required. Supported options:

·     On.

·     GracefulShutdown.

·     ForceOff.

·     ForceReset.

·     ForcePowerCycle.

 

Examples

# Power off the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** syspowerctrl -T ForceOff

Success: set power state succeed

Obtain device information

Perform this task to obtain device information.

Syntax

hREST -H host -p port -U username -P password getproductinfo

Examples

# Obtain device information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getproductinfo

--------------------------------------------------

Id                                      : 1

Name                                    : Computer System

AssetTag                                : N/A2

Manufacturer                            : Unis Huashan Technologies Co., Ltd.

Model                                   : UniServer R4900 G3

HostName                                : HDM123456

IndicatorLED                            : Off

SerialNumber                            : 12345678901234567890

PartNumber                              : 0200A00Q

ChassisPartNumber                       : 0235AQ7

PowerState                              : On

SystemType                              : Physical

BiosVersion                             : 2.00.41 V100R001B02D041

 

[Status]

Health                                  : OK

HealthRollup                            : None

State                                   : Enabled

 

[Healthstate]

OverallHealth                           : OK

board                                   : OK

current                                 : OK

disk                                    : OK

fans                                    : OK

memory                                  : OK

pcie                                    : OK

power                                   : OK

processor                               : OK

storage                                 : OK

raid                                    : OK

temperature                             : OK

volatge                                 : OK

--------------------------------------------------

Table 36 Command output

Field

Description

Id

Device ID.

Name

Device name.

AssetTag

Device asset tag.

Manufacturer

Device manufacturer.

Model

Device model.

HostName

Host name.

IndicatorLED

LED status:

·     On.

·     Off.

·     Blink.

SerialNumber

Serial number of the device.

PartNumber

Part number of the device.

ChassisPartNumber

Chassis part number.

PowerState

Current power state.

SystemType

System type.

BiosVersion

BIOS version.

Status

Device status:

·     Health—System resource health status.

·     HealthRollup.

·     State—System resource enabling status.

OverallHealth

Overall health status.

board

System board health status.

current

Electrical current health status.

disk

Drive health status.

fans

Fan health status.

memory

Memory health status.

pcie

PCIe module health status.

power

Power supply health status.

processor

Processor health status.

storage

Storage health status.

raid

Logical drive health status.

temperature

Temperature sensor health status.

volatge

Voltage sensor health status.

 

Set the asset tag

Perform this task to set the device asset tag.

Syntax

hREST -H host -p port -U username -P password setassettag -T assettag

Parameters

Table 37 Parameter description

Parameter

Description

Value

assettag

Device asset tag.

Required.

 

Examples

# Set the asset tag.

-> hREST –H 192.168.10.6 –U ****** -P ****** setassettag –T test_123

Success: set asset tag succeed

Set a host name

Perform this task to set a host name.

Syntax

hREST -H Host -p Port -U UserName -P PassWord sethostname -M NameMathod -N NewName

User role

Admin

Parameters

Table 38 Parameter description

Parameter

Description

Value

NameMathod

Method for obtaining the name.

Optional. Supported options:

·     Manual.

·     Auto.

NewName

Host name.

Optional.

The name is a string of 1 to 63 characters.

 

Usage guidelines

If the manual method is specified, you must specify a new name. If the auto method is specified, you cannot specify a host name.

The host name is a string of 1 to 63 characters. The string cannot end or start with a hyphen (-).

Examples

# Set the host name manually to HDM210235A2CSH17C000001.

-> ./hREST –H 192.168.10.6 –U ****** -P ****** sethosname -M Manual -N HDM210235A2CSH17C000001

Success: host name configuration is successful

Obtain user role information

Perform this task to obtain user role information.

Syntax

hREST -H host -p port -U username -P password getrole –R role

Parameters

Table 39 Parameter description

Parameter

Description

Value

role

User role.

Optional.

If you do not specify this argument, the command displays information about all user roles.

 

Examples

# Obtain information about the administrator user role.

-> hREST –H 192.168.10.6 –U ****** -P ****** getrole –R Administrator

--------------------------------------------------

Role                                    : Administrator

IsPredefined                            : True

AssignedPrivileges                      : Login, ConfigureManager, ConfigureUsers, ConfigureSelf, ConfigureComponents

OemPrivileges                           : OemKvm, OemVemdia, OemWeb, OemIPMI

--------------------------------------------------

Table 40 Command output

Field

Description

Role

User role that represents a set of privileges.

IsPredefined

Whether the role is predefined.

AssignedPrivileges

Role privileges. Supported options:

·     ConfigureManager.

·     ConfigureUsers.

·     ConfigureComponents.

·     Login.

·     ConfigureSelf.

OemPrivileges

Csutom privileges. Supported options:

·     OemWebWeb access.

·     OemIPMIIPMI access.

·     OemKvmRemote control.

·     OemVmmRemote media.

·     OemSecurityMgmtSecurity management.

·     OemPowerControlPower control.

·     OemDiagnosisMaintenance and diagnosis.

·     OemSystemAuditSystem audit.

 

Assign role group privileges

Perform this task to assign privileges to a role group.

Syntax

hREST -H host -p port -U username -P password setrole –R Role –P Privileges

Parameters

Table 41 Parameter description

Parameter

Description

Value

Role

Role group ID.

Required.

Privileges

Privileges of a role group.

Optional. Supported options:

·     Kvm.

·     Vmm.

·     SecurityMgmt.

·     ConfigureComponents.

·     PowerControl.

·     Diagnosis.

·     ConfigureSelf.

·     OemSystemAudit.

You can specify multiple privileges as needed. If you do not specify this argument, the role group does not have any privileges.

 

Examples

# Assign privileges Kvm and Vmm to role group CustomRole1.

-> hREST –H 192.168.10.6 –U ****** -P ****** setrole -R CustomRole1 -P Kvm,Vmm

Success: set user role information successfully

Change history

Version

Change description

HDM-2.08 and hREST V1.08

Moved privilege assignment from the Security module to the Users Accounts module.

 

Obtain boot settings

Perform this task to obtain boot settings.

Syntax

hREST -H host -p port -U username -P password getsysboot

Usage guidelines

This command obtains boot settings for the next startup.

Examples

# Obtain boot settings.

-> hREST –H 192.168.10.6 –U ****** -P ****** getsysboot

--------------------------------------------------

BootSourceOverrideTarget                : Pxe

BootSourceOverrideEnabled               : Continuous

BootSourceOverrideMode                  : Legacy

--------------------------------------------------

Table 42 Command output

Field

Description

BootSourceOverrideTarget

Current boot device to be used at next boot. Supported options:

·     None.

·     Hdd.

·     Pxe.

·     BiosSetup.

·     Cd.

BootSourceOverrideEnabled

Current enabling status of the boot settings. Supported options:

·     Once—Effective only for the next startup.

·     Continuous—Always effective.

BootSourceOverrideMode

Current boot mode. Supported options:

·     None.

·     Legacy—Legacy mode.

·     UEFI—UEFI mode.

 

Configure system boot settings

Perform this task to configure system boot settings.

Syntax

hREST -H Host -p Port -U UserName -P PassWord setsysboot -D BootDevice –E Effective -M BootMode

User role

admin

Parameters

Table 43 Parameter description

Parameter

Description

Value

BootDevice

Boot device.

Optional. Supported options:

·     CD.

·     HDD.

·     PXE.

·     BIOSSETUP.

·     none.

Effective

Effective period for the boot settings.

Optional. Supported options:

·     OnceEffective only at the next startup.

·     ContinuousEffectively permanently.

BootMode

Boot mode.

Optional. Supported options:

·     Legacy.

·     UEFI.

 

Usage guidelines

HDM B01 supports only the once effective period.

Examples

# Set the boot device to PXE, the boot mode to UEFI, and the effective period to Continuous.

-> ./hREST –H 192.168.10.6 –U ****** -P ****** setsysboot -D PXE -E Continuous -M UEFI

Success: set system startup item successfully

Obtain health status

Perform this task to obtain the health status from the server.

Syntax

hREST -H host -p port -U username -P password getsyshealth

Examples

# Obtain the health status of the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getsyshealth

--------------------------------------------------

System health                           : OK

Temperature                             : OK

Voltage                                 : OK

Current                                 : OK

Memory                                  : OK

Fans                                    : OK

Processor                               : OK

Disk                                    : OK

Power                                   : OK

--------------------------------------------------

Table 44 Command output

Field

Description

System health

Overall health status. Supported options:

·     OK.

·     Caution.

·     Warning.

·     Critical.

Supported health status levels vary by HDM version.

Temperature

Temperature health status.

Voltage

Voltage health status.

Current

Electric current health status.

Memory

Memory health status.

Fans

Fan health status.

Processor

Processor health status.

Disk

Disk health status.

Power

Power supply health status.

 

Obtain HDM operation logs

Perform this task to obtain HDM operation logs.

Syntax

hREST -H host -p port -U username -P password gethdmlog -C count

Parameters

Table 45 Parameter description

Field

Description

Value

count

Number of HDM operation logs.

Optional.

If you do not specify this argument, the command displays all HDM operation logs.

 

Examples

# Obtain HDM operation logs.

-> hREST –H 192.168.10.6 –U ****** -P ****** gethdmlog -C 2

--------------------------------------------------

Id                                      : 999

UserName                                : N/A

Interface                               : KCS

LogIpAdd                                : HOST

LogType                                 : 3

LogContent                              : Failed to set virtual keyboard mouse status.

Timestamp                               : 2020-07-03 23:41:07.178

HostName                                : HDM210200A00QH175000046

LogLevel                                : WARN

--------------------------------------------------

Id                                      : 1000

UserName                                : admin

Interface                               : LAN

LogIpAdd                                : 192.168.0.177

LogType                                 : 1

LogContent                              : HTTPS login from IP:192.168.0.177 user:admin

Timestamp                               : 2020-07-03 23:42:05.133

HostName                                : HDM210200A00QH175000046

LogLevel                                : INFO

--------------------------------------------------

Table 46 Command output

Field

Description

ID

HDM log ID.

Username

Username of the administrator.

Interface

Interface type.

LogIpAdd

IP address.

LogType

Log type. Supported options:

·     1Audit log.

·     2Firmware update log.

·     3Operation log.

·     4Event log.

·     5Hardware update log.

LogContent

Log content.

Timestamp

Timestamp of the log.

HostName

Host name.

LogLevel

Severity level of the log. Supported options:

·     INFOInformation.

·     WARNWarning.

 

Obtain system time

Perform this task to obtain the system time from the server.

Syntax

hREST -H host -p port -U username -P password gettime

Usage guidelines

For HDM of some HDM-1.10.xx versions, the tool returns time in GMT format, and the time on the Web service displays in UTC format. The time displayed depends on the API, and the tool does not add the time display compatibility.

Examples

# Obtain the system time from the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** gettime

--------------------------------------------------

 

Time                       : 2023-11-15 13:28:25

Timezone                   : UTC+08:00

--------------------------------------------------

 

Table 47 Command output

Field

Description

Time

Current system time of the server.

Timezone

Current time zone of the server.

 

Set the time zone

Perform this task to set the time zone of the server.

Syntax

hREST -H host -p port -U username -P password settimezone –Z timezone

Parameters

Table 48 Parameter description

Parameter

Description

Value

timezone

Time zone.

Required.

 

Examples

# Set the time zone of the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** settimezone -Z UTC-9

Success: set system timezone successfully: UTC-9

Obtain temperature information

Perform this task to obtain temperature information of the server.

Syntax

hREST -H host -p port -U username -P password gettemp

Examples

# Obtain the temperature information of the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** gettemp

--------------------------------------------------

Name                          : N1 FrontBP R

SensorNumber                  : 185

ReadingCelsius                : 27

PhysicalContext               : Room

LowerThresholdCritical        : 0

UpperThresholdCritical        : 100

LowerThresholdFatal           : 0

UpperThresholdFatal           : 0

LowerThresholdNonCritical     : 0

UpperThresholdNonCritical     : 95

 

[Status]

Health                        : OK

State                         : Enabled

--------------------------------------------------

Name                          : N2 FrontBP L

SensorNumber                  : 186

ReadingCelsius                : 0

PhysicalContext               : Room

LowerThresholdCritical        : 0

UpperThresholdCritical        : 100

LowerThresholdFatal           : 0

UpperThresholdFatal           : 0

LowerThresholdNonCritical     : 0

UpperThresholdNonCritical     : 95

 

[Status]

Health                        : Critical

State                         : Disabled

--------------------------------------------------

Name                          : N2 FrontBP R

SensorNumber                  : 187

ReadingCelsius                : 29

PhysicalContext               : Room

LowerThresholdCritical        : 0

UpperThresholdCritical        : 100

LowerThresholdFatal           : 0

UpperThresholdFatal           : 0

LowerThresholdNonCritical     : 0

UpperThresholdNonCritical     : 95

 

[Status]

Health                        : OK

State                         : Enabled

--------------------------------------------------

Table 49 Command output

Field

Description

Name

Name of a temperature sensor.

SensorNumber

Number of the temperature sensor, which uniquely identifies a temperature sensor.

ReadingCelsius

Current reading of the temperature sensor.

PhysicalContext

Physical environment.

LowerThresholdCritical

Lower major threshold of the temperature sensor.

UpperThresholdCritical

Upper major threshold of the temperature sensor.

LowerThresholdFatal

Lower critical threshold of the temperature sensor.

UpperThresholdFatal

Upper critical threshold of the temperature sensor.

LowerThresholdNonCritical

Lower minor threshold of the temperature sensor.

UpperThresholdNonCritical

Upper minor threshold of the temperature sensor.

Status

Status of the temperature sensor. Supported options:

·     Health—Health state.

·     State—Enabling state. Supported options include Enabled and Disabled.

 

Obtain user information

Perform this task to obtain information about a user.

Syntax

hREST -H host -p port -U username -P password getuser –N name

Parameters

Table 50 Parameter description

Parameter

Description

Value

name

Username.

Optional.

If you do not specify this argument, the command displays information about all users.

 

Examples

# Obtain information about user test.

-> hREST –H 192.168.10.6 –U ****** -P ****** getuser –N test

--------------------------------------------------

Id                                      : 3

UserName                                : test

RoleId                                  : Operator

Enabled                                 : True

Privilege                               : ['IPMI', 'WEB']

IPMIEnable                              : True

KvmEnable                               : True

SnmpV3AccessPermission                  : read_only

SnmpV3AuthProtocol                      : sha

SnmpV3Enable                            : True

SnmpV3PrivProtocol                      : des

VmediaEnable                            : True

WebEnable                               : True

--------------------------------------------------

Table 51 Command output

Field

Description

Id

User ID.

UserName

Username.

RoleId

User role.

Enabled

Enabling status of access privileges. Supported options:

·     True—Enabled.

·     FalseDisabled.

Privilege

Privileges of the user.

IPMIEnable

Enabling status of IPMI access privilege.

KvmEnable

Enabling status of KVM access privilege.

VmediaEnable

Enabling status of virtual media access privilege.

WebEnable

Enabling status of Web interface access privilege.

SnmpV3Enable

Enabling status of SNMPv3 access privilege.

SnmpV3AccessPermission

SNMPv3 access privilege. Supported options:

·     read_only.

·     read_write.

SnmpV3AuthProtocol

SNMPv3 authentication algorithm. Supported options:

·     sha.

·     md5.

SnmpV3PrivProtocol

SNMPv3 encryption algorithm. Supported options:

·     des.

·     aes.

 

Add a user

Perform this task to add a user.

Syntax

hREST -H host -p port -U username -P password adduser -N name –P userpwd –R role -EN enabled –KVM kvmenable –VME vmeenable -IPMI Enable -WEB Enable -V3 SnmpV3Enable -V3APE SnmpV3AccessPermission -V3APR SnmpV3AuthProtocol -V3PP SnmpV3PrivProtocol -I user_id - V3PWD SnmpV3Password

Parameters

Table 52 Parameter description

Parameter

Description

Value

name

Username of a user.

Required.

userpwd

Password of the user.

Required.

role

Role of the user.

Required.

enabled

Enable or disable the access privileges.

Optional. Supported options:

·     Enable.

·     Disable.

kvmenable

Enable or disable the KVM access privilege.

Optional. Supported options:

·     Enable.

·     Disable.

vmeenable

Enable or disable the VMedia access privilege.

Optional. Supported options:

·     Enable.

·     Disable.

IPMIEnable

Enable or disable the IPMI access privilege.

Optional.

Boolean.

WebEnable

Enable or disable the Web extended privilege.

Optional.

Boolean.

SnmpV3Enable

Enable or disable SNMPv3.

Optional.

Boolean.

SnmpV3AccessPermission

SNMPv3 access privilege.

String. Supported options:

·     read_only.

·     read_write.

SnmpV3AuthProtocol

SNMPv3 authentication algorithm.

String. Supported options:

·     sha.

·     md5.

SnmpV3PrivProtocol

SNMPv3 encryption algorithm.

String. Supported options:

·     des.

·     aes.

user_id

User ID.

Optional.

String.

SnmpV3Password

SNMPv3 independent password.

Optional.

String.

The maximum length of the independent password is 40 characters.

 

Usage guidelines

In a version earlier than HDM-2.0.04, role groups CustomRole1 to CustomRole5 are not configurable. From HDM-2.0.04 to HDM-2.0.06, role groups Custom 1 to Custom 5, instead of CustomRole1 to CustomRole5, take effect.

Examples

# Add a user named test.

-> hREST –H 192.168.10.6 –U ****** -P ****** adduser -N test -P test@test123 -R Operator -EN Enable -KVM Enable -VME Enable -IPMI Enable -WEB Enable -V3 Enable -V3APE read_only -V3APR sha -V3PP des

Success: add user successfully

Change history

Version

Change description

hREST V1.08

Added supported options CustomRole1, CustomRole2, CustomRole3, CustomRole4, and CustomRole5 for role groups.

 

Edit a user

Perform this task to edit a user, including changing the password or role of the user.

Syntax

hREST -H host -p port -U username -P password setuser –N name –P newpwd –R newrole -EN enabled –KVM kvmenable –VME vmeenable -IPMI Enable -WEB Enable -V3 SnmpV3Enable -V3APE SnmpV3AccessPermission -V3APR SnmpV3AuthProtocol -V3PP SnmpV3PrivProtocol -U newname - V3PWD SnmpV3Password

Parameters

Table 53 Parameter description

Parameter

Description

Value

name

Username of a user to be edited.

Required.

newpwd

New password of the user.

Optional.

newrole

New role of the user.

Optional.

enabled

Enable or disable the access privileges.

Optional. Supported options:

·     Enable.

·     Disable.

kvmenable

Enable or disable the KVM access privilege.

Optional. Supported options:

·     Enable.

·     Disable.

vmeenable

Enable or disable the VMedia access privilege.

Optional. Supported options:

·     Enable.

·     Disable.

IPMIEnable

Enable or disable the IPMI access privilege.

Optional.

Boolean.

WebEnable

Enable or disable the Web extended privilege.

Optional.

Boolean.

SnmpV3Enable

Enable or disable SNMPv3.

Optional.

Boolean.

SnmpV3AccessPermission

SNMPv3 access privilege.

String. Supported options:

·     read_only.

·     read_write.

SnmpV3AuthProtocol

SNMPv3 authentication algorithm.

String. Supported options:

·     sha.

·     md5.

SnmpV3PrivProtocol

SNMPv3 encryption algorithm.

String. Supported options:

·     des.

·     aes.

newname

Username.

Optional.

SnmpV3Password

SNMPv3 independent password.

Optional.

The maximum length of the independent password is 40 characters.

 

Examples

# Edit user test.

-> hREST –H 192.168.10.6 –U ****** -P ****** setuser -N test -P test@test123 -R Operator -EN Enable -KVM Enable -VME Enable -IPMI Enable -WEB Enable -V3 Enable -V3APE read_only -V3APR sha -V3PP aes

Success: set user successfully

Delete a user

Perform this task to delete a user.

Syntax

hREST -H host -p port -U username -P password deluser –N name

Parameters

Table 54 Parameter description

Parameter

Description

Value

name

Name of the user to be deleted.

Required.

 

Examples

# Delete user named user.

-> hREST –H 192.168.10.6 –U ****** -P ****** deluser –N user

Success: delete user successfully

Obtain BIOS settings

Perform this task to obtain BIOS settings of the server.

Syntax

hREST -H host -p port -U username -P password getbios –A value

Parameters

Table 55 Parameter description

Parameter

Description

Value

value

BIOS option.

This argument is required when HDM or the BIOS firmware version is B01.

This argument is optional when HDM or the BIOS firmware version is B02 or later.

 

Usage guidelines

If BIOS version BIOS-1.00.XX or HDM version HDM-1.10.XX is used, hREST uses the HDM IPMI interface to obtain BIOS settings, and only the setting of a single BIOS option can be obtained at a time.

Examples

# Obtain the settings of the BIOS CPUC6Report option.

-> hREST –H 192.168.10.6 –U ****** -P ****** getbios -A CPUC6Report

--------------------------------------------------

CPUC6Report                               : Auto

--------------------------------------------------

Configure BIOS settings

Perform this task to configure BIOS settings.

hREST uses the HDM IPMI or Redfish interface to configure BIOS settings. The interface to use depends on the HDM version:

·     If the HDM version is HDM-1.10.XX, the HDM IPMI interface is used.

·     If the HDM version is HDM-1.11.00 or later, the HDM Redfish interface is used.

For more information about the configurable options, refer to the configuration options that can be obtained by using the getbios command.

Syntax

hREST -H host -p port -U username -P password setbios –A attribute –V value

Parameters

Table 56 Parameter description

Parameter

Description

Value

attribute

BIOS option.

Required.

value

Value of the BIOS option.

Required.

 

Usage guidelines

For this configuration to take effect, reboot the BIOS.

Examples

# Disable the BIOS CPUC6Report option.

-> hREST –H 192.168.10.6 –U ****** -P ****** setbios -A CPUC6Report -V Disable

Success: BIOS setup is successfully

# Specify BootOption#1 as Network.

-> hREST –H 192.168.10.6 –U ****** -P ****** setbios -a BootOption#1 -v Network

Success: BIOS setup is successfully

Obtain pending BIOS settings

Perform this task to obtain configured BIOS settings that have not taken effect.

Syntax

hREST -H host -p port -U username -P password getbiossetting

Usage guidelines

This command is not supported if the BIOS version is BIOS-1.00.XX or the HDM version is HDM-1.10.XX.

Examples

# Obtain configured BIOS settings that have not taken effect.

-> hREST –H 192.168.10.6 –U ****** -P ****** getbiossetting

--------------------------------------------------

CPUC6Report                               : Auto

--------------------------------------------------

Restore the BIOS settings

Perform this task to restore the BIOS settings.

Syntax

hREST -H host -p port -U username -P password setbiosdefault –T Type

Parameters

Table 57 Parameter description

Parameter

Description

Value

Type

Restoring type of BIOS settings.

Optional. Supported options:

·     defaultRestores the BIOS to the default settings.

·     factoryRestores the BIOS to the factory defaults.

 

Usage guidelines

For this configuration to take effect, reboot the BIOS.

HDM B01 does not support this command. Support for this command is added in HDM B03-1.30.15SP12 and synchronized with HDM B05-2.19.

If the factory defaults cannot be restored, the command restores the default settings.

Examples

# Restore the BIOS to the factory defaults.

-> hREST –H 192.168.10.6 –U ****** -P ****** setbiosdefault –T factory

Success: restore BIOS factory settings successfully

Restore the BMC settings

Perform this task to restore the BMC settings.

Syntax

hREST -H host -p port -U username -P password setbmcdefault –T Type

Parameters

Table 58 Parameter description

Parameter

Description

Value

Type

Restoring type of BMC settings.

Optional. Supported options:

·     defaultRestore BMC to the default settings.

·     factoryRestore BMC to the factory defaults.

 

Usage guidelines

HDM B01 does not support this command. Support for this command is added in HDM B03-1.30.15SP12 and synchronized with HDM B05-2.19.

Examples

# Restore BMC to the factory defaults.

-> hREST H 192.168.10.6 –U ****** -P ****** setbmcdefault –T factory

Success: restore BMC factory settings successfully

Obtain fan information

Perform this task to obtain fan information of the server.

Syntax

hREST -H host -p port -U username -P password getfan

hREST getfan

Usage guidelines

The command is available in in-band management mode.

Examples

# Obtain information about fans of the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getfan

--------------------------------------------------

FanCount                                : 6

FanSpeedAdjustmentMode                  : Automatic

--------------------------------------------------

Id                                      : 0

FanName                                 : N/A

Slot                                    : 1

Location                                : chassis

Model                                   : 3203A01V

RatedSpeedRPM                           : 19

SpeedRPM                                : 3500

LowerThresholdRPM                       : N/A

[Status]

State                                   : Enabled

Health                                  : N/A

--------------------------------------------------

Id                                      : 1

FanName                                 : N/A

Location                                : chassis

Model                                   : 3203A01V

RatedSpeedRPM                           : 42

SpeedRPM                                : 7200

LowerThresholdRPM                       : N/A

[Status]

State                                   : Enabled

Health                                  : N/A

--------------------------------------------------

Id                                      : 2

FanName                                 : N/A

Location                                : chassis

Model                                   : 3203A01V

RatedSpeedRPM                           : 19

SpeedRPM                                : 3300

LowerThresholdRPM                       : N/A

[Status]

State                                   : Enabled

Health                                  : N/A

--------------------------------------------------

Id                                      : 3

FanName                                 : N/A

Location                                : chassis

Model                                   : 3203A01V

RatedSpeedRPM                           : 25

SpeedRPM                                : 4300

LowerThresholdRPM                       : N/A

[Status]

State                                   : Enabled

Health                                  : N/A

--------------------------------------------------

Id                                      : 4

FanName                                 : N/A

Location                                : chassis

Model                                   : 3203A01V

RatedSpeedRPM                           : 42

SpeedRPM                                : 7300

LowerThresholdRPM                       : N/A

[Status]

State                                   : Enabled

Health                                  : N/A

--------------------------------------------------

Id                                      : 5

FanName                                 : N/A

Location                                : chassis

Model                                   : 3203A01V

RatedSpeedRPM                           : 42

SpeedRPM                                : 7300

LowerThresholdRPM                       : N/A

[Status]

State                                   : Enabled

Health                                  : N/A

--------------------------------------------------

Table 59 Command output

Field

Description

FanCount

Maximum number of fan sensors.

FanSpeedAdjustmentMode

Fan speed mode.

Id

Fan ID.

FanName

Fan name.

Slot

Slot number.

Location

Fan position.

Model

Fan model.

RatedSpeedRPM

Fan rotation ratio.

SpeedRPM

Fan speed.

LowerThresholdRPM

Lower fan speed alarm threshold.

State

Enabling status of the fan.

Health

Health status of the fan.

 

Set the fan speed

Perform this task to set the fan speed.

Syntax

hREST -H host -p port -U username -P password setfan –M mode –S fanspeed

Parameters

Table 60 Parameter description

Parameter

Description

Value

mode

Fan speed mode.

Required. Supported options:

·     Optimal.

·     Increased.

·     Maximum.

·     Custom.

fanspeed

Fan speed level.

Required.

Value range: 1 to 20.

This field is available only when the FanSpeedAdjustmentMode field is set to Custom.

 

Examples

# Set the fan speed.

-> hREST –H 192.168.10.6 –U ****** -P ****** setfan -M Custom -S 10

Success: fan speed control successfully

Disable inband management of HDM users

Perform this task to disable inband management of HDM users.

Syntax

hREST -H host -p port -U username -P password closeinner –S status

Parameters

Table 61 Parameter description

Parameter

Description

Value

status

Enable or disable the disabling inband management feature.

Supported options:

·     Enable.

·     Disable.

 

Examples

# Disable inband management of HDM users.

-> hREST –H 192.168.10.6 –U ****** -P ****** closeinner –S Enable

Success: set close inner set user status successfully

Export configuration

Perform this task to export configuration.

Syntax

hREST -H host -p port -U username -P password downloadconf -T type –F filepath

Parameters

Table 62 Parameter description

Parameter

Description

Value

type

Type of the configuration to be exported.

Required. Supported options:

·     RAID.

·     BMC.

·     BIOS.

filepath

Name of the configuration file and the path for saving the file.

Required.

If you do not specify this argument, the command saves the configuration to the config file folder under the hRest directory.

 

Examples

# Export BIOS configuration.

-> hREST –H 192.168.10.6 –U ****** -P ****** downloadconfig -T BIOS -F ../update/bios.json

Success: export BIOS configuration is successful

Import configuration

Perform this task to import configuration.

Syntax

hREST -H host -p port -U username -P password uploadconf -T type –F filepath

Parameters

Table 63 Parameter description

Parameter

Description

Value

type

Type of the configuration to be imported.

Required. Supported options:

·     RAID.

·     BMC.

·     BIOS.

filepath

Path of the configuration file.

Required.

 

Examples

# Import BIOS configuration.

-> hREST –H 192.168.10.6 –U ****** -P ****** uploadconfig -T BIOS -F ../update/bios.json

Success: import BIOS configuration successfully

Obtain firmware information

Perform this task to obtain firmware information.

Syntax

hREST -H host -p port -U username -P password getfwv

Examples

# Obtain information about the firmware of the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getfwv

--------------------------------------------------

Name                                    : HDM

Version                                 : 1.30.15 HDM V100R001B03D015

--------------------------------------------------

Name                                    : CPLD

Version                                 : V007

--------------------------------------------------

Name                                    : BIOS

Version                                 : 2.00.37P06 V100R001B02D037SP06

--------------------------------------------------

Name                                    : ME

Version                                 : 4.1.4.339

--------------------------------------------------

Name                                    : NIC-GE-4P-360T-L3

Version                                 : 1.1767.0

--------------------------------------------------

Name                                    : HBA-LSI-9440-8i

Version                                 : 5.010.01-0671

--------------------------------------------------

Table 64 Command output

Field

Description

Name

Firmware name.

Version

Firmware version.

 

Obtain NTP information

Perform this task to obtain NTP information from the server.

Syntax

hREST -H host -p port -U username -P password getntp

Examples

# Obtain NTP information from the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getntp

--------------------------------------------------

ServiceEnabled                          : False

RefreshInterval                         : 3600

TimeZone                                : UTC-9

PreferredNtpServer                      : 1.cn.pool.ntp.org

AlternateNtpServer                      : 2.cn.pool.ntp.org

TertiaryNtpServer                       :

NtpAddressOrigin                        : Static

--------------------------------------------------

Table 65 Command output

Field

Description

ServiceEnabled

Enabling status of the NTP service.

RefreshInterval

Refresh interval.

TimeZone

Time zone.

PreferredNtpServer

Primary NTP server.

AlternateNtpServer

Secondary NTP server.

TertiaryNtpServer

Tertiary NTP server.

NtpAddressOrigin

NTP mode. The current software version supports only the static mode.

 

Configure NTP settings

Perform this task to configure NTP settings.

Syntax

hREST -H host -p port -U username -P password setntp -S status -PRE prentpserver -ALT altntpserver -TN TertiaryNtpServer

hREST -H host -p port -U username -P password setntp -Z timezone

hREST -H host -p port -U username -P password setntp -F timeinterval

Parameters

Table 66 Parameter description

Parameter

Description

Value

status

Enable or disable the NTP service.

Required. Supported options:

·     Enable.

·     Disable.

prentpserver

Primary NTP server.

Optional.

altntpserver

Secondary NTP server.

Optional.

TertiaryNtpServer

Tertiary NTP server.

Optional.

timezone

Time zone.

Optional.

timeinterval

Time synchronization interval, in ms.

Value range: 600 to 2592000. The value must be a multiple of 100.

 

Usage guidelines

Before you perform this task, make sure the NTP service is disabled.

If the value you set for a parameter is the same as the original value, the system returns configuration failure.

For HDM-2.xx, to avoid NTP server configuration errors, make sure you configure both the primary NTP server and the secondary NTP server. This issue has been resolved in HDM-3.10 and later versions.

Examples

# Enable the NTP service.

-> hREST –H 192.168.10.6 –U ****** -P ****** setntp -S Enable -PRE 192.168.170.66 -ALT 192.168.170.67 -TN 192.168.170.68

Success: set ntp server information successful

# Set the NTP time zone.

-> hREST –H 192.168.10.6 –U ****** -P ****** setntp –Z UTC+9

Success: set ntp server information successful

# Set the NTP time synchronization interval.

-> hREST –H 192.168.10.6 –U ****** -P ****** setntp –F 800

Success: set ntp time synchronization interval successful

Obtain SNMP information

Perform this task to obtain SNMP information from the server.

Syntax

hREST -H host -p port -U username -P password getsnmp

Examples

# Obtain SNMP information from the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getsnmp

--------------------------------------------------

Description                             : SnmpService Gettings

Id                                      : SnmpService

LongPasswordEnabled                     : False

Name                                    : SNMP

ReadOnlyCommunity                       : rocommstr

ReadWriteCommunity                      :

 

SnmpTrapNotification

    AlarmSeverity                       : Minor+Major+Critical

    CommunityName                       : public

    ServiceEnabled                      : True

    TrapMode                            : NodeMode

 

    TrapServer

        Enabled                         : True

        MemberId                        : 1

        TrapServerAddress               :

        TrapServerPort                  : 162

        ------------------------------------------

        Enabled                         : True

        MemberId                        : 2

        TrapServerAddress               :

        TrapServerPort                  : 162

        ------------------------------------------

        Enabled                         : True

        MemberId                        : 3

        TrapServerAddress               :

        TrapServerPort                  : 162

        ------------------------------------------

        Enabled                         : True

        MemberId                        : 4

        TrapServerAddress               :

        TrapServerPort                  : 162

        ------------------------------------------

    TrapServerIdentity                  : HDM210200A00QH17C000002

    TrapV3User                          :

    TrapVersion                         : v1

SnmpV1Enabled                           : False

SnmpV2CEnabled                          : True

SnmpV3AuthProtocol                      :

SnmpV3Enabled                           : True

SnmpV3PrivProtocol                      :

--------------------------------------------------

Table 67 Command output

Field

Description

Description

Description of the SNMP service resource.

Id

ID of the SNMP service.

LongPasswordEnabled

Enabling status of the long community string feature.

Name

Name of the SNMP service.

ReadOnlyCommunity

Read-only community name.

ReadWriteCommunity

Read/write community name.

AlarmSeverity

Alarm severity level. Supported options:

·     Critical.

·     Minor+Major+Critical.

·     All.

The supported options vary by HDM version.

CommunityName

Trap community name.

ServiceEnabled

Enabling status of the SNMP trap service.

TrapMode

Trap mode. Supported options:

·     NodeMode.

·     EventMode.

TrapServer

SNMP trap server settings.

Enabled

Enabling status of the SNMP trap servers.

MemberId

Trap server ID.

TrapServerAddress

Trap server address.

TrapServerPort

Trap server port.

TrapServerIdentity

Trap server identifier.

TrapV3User

SNMPv3 user.

TrapVersion

SNMP trap version.

SnmpV1Enabled

Enabling status of SNMPv1.

SnmpV2CEnabled

Enabling status of SNMPv2.

SnmpV3AuthProtocol

SNMPv3 authentication algorithm. Supported options:

·     sha.

·     md5.

SnmpV3Enabled

Enabling status of SNMPv3.

SnmpV3PrivProtocol

SNMPv3 encryption algorithm. Supported options:

·     des.

·     aes.

 

Configure SNMP settings

Perform this task to configure SNMP settings.

Syntax

hREST -H host -p port -U username -P password setsnmp -V1E SnmpV1Enabled -V2CE SnmpV2CEnabled -LPE LongPasswordEnabled -ROC ReadOnlyCommunity -RWC ReadWriteCommunity -CN CommunityName -SE ServiceEnabled -TV TrapVersion -T3U TrapV3User -AS AlarmSeverity -TM TrapMode -TS TrapServer -V3E SnmpV3Enabled

Parameters

Table 68 Parameter description

Parameter

Description

Value

SnmpV1Enabled

Enable or disable SNMPv1.

Optional. Supported options:

·     Enable.

·     Disable.

SnmpV2CEnabled

Enable or disable SNMPv2.

Optional. Supported options:

·     Enable.

·     Disable.

SnmpV3Enabled

Enable or disable SNMPv3.

Optional. Supported options:

·     Enable.

·     Disable.

LongPasswordEnabled

Enable or disable the long community password feature.

Optional. Supported options:

·     Enable.

·     Disable.

ReadOnlyCommunity

Read-only community name.

Optional.

ReadWriteCommunity

Read/write community name.

Optional.

CommunityName

Trap community name.

Optional.

To delete the community name, leave this field empty.

ServiceEnabled

Enable or disable the SNMP trap service.

Optional. Supported options:

·     Enable.

·     Disable.

TrapVersion

SNMP trap version.

String. Supported options:

·     v1.

·     v2c.

·     v3.

TrapV3User

SNMPv3 user.

Optional.

AlarmSeverity

Severity level.

Optional.

The supported options vary by HDM version, including:

·     In a version earlier than HDM-1.12.05:

¡     Critical.

¡     WarningAndCritical.

¡     All.

·     In HDM-1.30.11P01:

¡     Critical.

¡     Minor+Major+Critical.

¡     All.

·     In HDM-2.10.00:

¡     Major+Critical. This value is changed from Critical.

TrapMode

Trap mode.

Optional. Supported options:

·     NodeMode.

·     EventMode.

TrapServer

Trap server properties.

Optional.

You can specify four trap servers. Each server is in the format of MemberID-Enabled-TrapServerPort-STrapSrverAddress.

TrapServer.MemberId

Trap server ID.

Optional.

TrapServer.Enabled

Enable or disable the SNMP trap server.

Optional.

TrapServer.TrapServerPort

Trap server port number.

Optional.

TrapServer.TrapServerAddress

Trap server address.

Optional. Both IP addresses and domain names are supported.

 

Examples

# Configure SNMP settings.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setsnmp -V1E Disable -V2CE Enable -LPE Disable -ROC rocommstr_r -RWC rocommstr_w -CN public -SE Enable -TV v1 -T3U admin -AS Critical -TM NodeMode -TS [1-1-163-192.168.10.121_2-1-163-192.168.10.122]

Success: set snmp successfully

Obtain service information

Perform this task to obtain information about services of the server.

Syntax

hREST -H host -p port -U username -P password getservice –T servicttype

Parameters

Table 69 Parameter description

Parameter

Description

Value

servicetype

Service type.

Optional. Supported options:

·     Web.

·     KVM.

·     CD-Media.

·     FD-Media.

·     HD-Media.

·     SSH.

·     Telnet.

·     IPMI.

·     SNMP.

·     VNC.

·     Remote_XDP.

If you do not specify this argument, the command displays information about all services.

 

Examples

# Obtain information about the Web service.

-> hREST –H 192.168.10.6 –U ****** -P ****** getservice –T Web

--------------------------------------------------

Name                                    : Web

Status                                  : Enable

Insecure service port                   : 80

Secure service port                     : 443

Idle timeout                            : 1800

Maximum sessions                        : 20

--------------------------------------------------

Table 70 Command output

Field

Description

Name

Service name.

Status

Enabling status of the service. Supported options:

·     Enable.

·     Disable.

Insecure service port

Insecure service port number of the service.

Secure service port

Secure port number of the service.

Idle timeout

Idle timeout time.

Maximum sessions

Maximum number of sessions for the service.

 

Configure service settings

Perform this task to configure settings for a service.

Syntax

hREST -H host -p port -U username -P password setservice -T type -S status –M timeout –SP secure_port –NSP non_secure_port

Parameters

Table 71 Parameter description

Parameter

Description

Value

type

Type of the service to be configured.

Optional. Supported options:

·     Web.

·     KVM.

·     CD-Media.

·     FD-Media.

·     HD-Media.

·     SSH.

·     Telnet.

·     IPMI.

·     SNMP.

·     VNC.

·     Remote_XDP.

status

Enable or disable the service.

Optional. Supported options:

·     Enabled.

·     Disabled.

timeout

Timeout time, in minutes.

This parameter is unavailable for the following services:

·     CD-Media.

·     FD-Media.

·     HD-Media.

·     Remote_XDP.

·     SNMP.

·     IPMI.

secure_port

Secure port number of the service.

Optional.

non_secure_port

Insecure port number of the service.

Optional.

 

Examples

# Configure settings for the VNC service.

-> hREST –H 192.168.10.6 –U ****** -P ****** setservice -T VNC -S Enabled -NSP 4901

Success: set BMC network protocol services successfully

Download SDS logs

Perform this task to download SDS logs from the server.

Syntax

hREST -H host -p port -U username -P password getsdslog –F filepath -P startdate –Q enddate

Parameters

Table 72 Parameter description

Parameter

Description

Value

filepath

Path of the file to save SDS logs.

Required.

By default, the file name is in the SN_Date.sds format. For example, HDM12345678912345678907_20191223_20191230.sds.

To avoid character decoding error, do not include Chinese characters in the file path.

startdate

Start date for exporting, in YY-MM-DD.

Optional.

enddate

End date for exporting, in YY-MM-DD.

Optional.

 

Usage guidelines

If you do not specify the start date or end date, the system downloads all SDS logs.

This command is not available in in-band management mode.

Examples

# Download SDS logs from 2019-01-21 to 2019-01-28 to directory :\sdslog.

-> hREST –H 192.168.10.6 –U ****** -P ****** getsdslog –F F:\sdslog -P 2019-01-21 -Q 2019-01-28

Success: one-click collection of log requests succeeded

Obtain virtual media information

Perform this task to obtain virtual media information.

Syntax

hREST -H host -p port -U username -P password getvmm –T mediatype

Parameters

Table 73 Parameter description

Parameter

Description

Value

mediatype

Type of a virtual media.

Required Supported options:

·     HD.

·     CD.

 

Examples

# Obtain information about virtual media CD.

-> hREST –H 192.168.10.6 –U ****** -P ****** getvmm –T CD

--------------------------------------------------

[Connected]

    ----------------------------------------------

    MediaIndex                : 0

    ImageName                 : bnx2x-1.714.18-dd-xs6.5-3.10.0+2-x86_64.iso

    MediaTypes                : CD/DVD

    ----------------------------------------------

    MediaIndex                : 1

    ImageName                 : netxtreme2-7.14.46-dd-sles11sp3-3.0.76_0.11-x86_64.iso

    MediaTypes                : CD/DVD

    ----------------------------------------------

[NotConnected]

    ----------------------------------------------

    ID                        : 1

    ImageName                 : netxtreme2-7.14.46-dd-sles12sp2-4.4.21_69-x86_64.iso

    MediaTypes                : CD/DVD

    ----------------------------------------------

    ID                        : 2

    ImageName                 : ONEStor-Ubuntu_14.04.3.18.iso

    MediaTypes                : CD/DVD

    ----------------------------------------------

    ID                        : 3

    ImageName                 : REPO-1.11.02.iso

    MediaTypes                : CD/DVD

    ----------------------------------------------

--------------------------------------------------

# Obtain information about virtual media HD.

-> hREST –H 192.168.10.6 –U ****** -P ****** getvmm –T HD

--------------------------------------------------

[Connected]

    ----------------------------------------------

    MediaIndex                : 0

    ImageName                 : BOOT95.IMG

    MediaTypes                : Hard disk

    ----------------------------------------------

[NotConnected]

    ----------------------------------------------

    ID                        : 4

    ImageName                 : BOOT98.IMG

    MediaTypes                : Hard disk

    ----------------------------------------------

    ID                        : 5

    ImageName                 : BOOTDOS.IMG

    MediaTypes                : Hard disk

    ----------------------------------------------

--------------------------------------------------

Table 74 Command output

Field

Description

MediaIndex

ID of a mounted virtual media.

ID

ID of an unmounted virtual media.

ImageName

Name of the virtual media.

MediaTypes

Type of the virtual media.

 

Mount or unmount virtual media

Perform this task to mount or unmount virtual media.

Synta

hREST-H Host -p Port -U UserName -P PassWord mountvmm -O Type -I Image –T MediaType

User role

admin

Parameters

Table 75 Parameter description

Parameter

Description

Value

Type

Action to take on the virtual media.

Required. Supported options:

·     Mount.

·     Unmount.

Image

Virtual media image.

This parameter is required for a mounting operation.

MediaType

Type of virtual media.

Supported options:

·     HD.

·     CD.

 

Examples

# Mount the virtual media and specify the media type as CD.

-> ./hREST –H 192.168.10.6 –U ****** -P ****** mountvmm -O Mount -I nfs://192.168.190.51/Share/image.so

Success: successfully mount virtual media

Upgrade the firmware

Perform this task to upgrade the firmware (such as BIOS, BMC, and CPLD) of the server.

Syntax

hREST -H host -p port -U username -P password fwupdate –E Mode –O Override -T Type -U Firmware –F IsForce

Parameters

Table 76 Parameter description

Parameter

Description

Value

Mode

Upgrade mode.

Required. Supported options:

·     ManualYou need to manually start the server after upgrade.

·     AutoThe server automatically starts up after upgrade.

Override

Select whether to override the current settings.

Optional. Supported options:

·     0Not override the current settings.

·     1Override the current settings.

Type

Type of the firmware to be upgraded.

Required.

Firmware

Name and path of the firmware file.

Required.

IsForce

Select whether the update is forced or not.

Available only for REPO update.

Supported options:

·     0Perform an update only when the file version is higher than the current version. This is the default value.

·     1Update to the file version in despite of the current version.

 

Usage guidelines

Overriding the settings indicates restoring HDM to the factory defaults for HDM firmware upgrade, and indicates overriding the current BIOS settings for BIOS firmware upgrade.

The in-band management mode supports only the update of the BIOS and BMC.

Examples

# Upgrade the BMC.

-> hREST –H 192.168.10.6 –U ****** -P ****** fwupdate -E Auto -T BMC -U ../config/HDM-1.30.18_signed.bin

2020-07-03 17:21:54 Get product serial number : 210200A00QH17C000002

2020-07-03 17:21:54 Check environment is ok

2020-07-03 17:21:54 Set fw type success

2020-07-03 17:21:55 Upload file start

2020-07-03 17:22:02 Upload file inprogress...

2020-07-03 17:22:41 Upload file successfully

2020-07-03 17:22:45 File verify successfully

2020-07-03 17:22:45 Apply(Flash) start

2020-07-03 17:23:56 Apply(Flash) ingrogress, process: 100% done       

2020-07-03 17:24:01 Apply(Flash) successfully

2020-07-03 17:24:01 Auto model BMC restart, please waiting...

2020-07-03 17:29:13 BMC reboot complete

2020-07-03 17:29:13 Version verify ok

HDM upgrade successfully, Version: image change from 1.30.15 to 1.30.18

Obtain PCIe device list

Perform this task to obtain the list of PCIe devices.

Syntax

hREST -H host -p port -U username -P password getpcie

Examples

# Obtain the list of PCIe devices.

-> hREST –H 192.168.10.6 –U ****** -P ****** getpcie

--------------------------------------------------

Location                                : PCIe slot 3

ProductName                             : HBA-LSI-9440-8i

VendorID                                : 0x1000

VendorName                              : None

SerialNumber                            : SP73513465

ProductID                               : 0x0017

NegotiatedSpeed                         : 8.0GT/s

NegotiatedProtocol                      : Gen 3

NegotiatedLinkWidth                     : x8

MaxSpeed                                : None

MaxProtocol                             : Gen 3

PartNumber                              : N/A

MaxLinkWidth                            : x8

[Status]

Status                                  : Enabled

Health                                  : OK

--------------------------------------------------

Table 77 Command output

Field

Description

Location

Location of a PCIe module.

ProductName

Product name.

VendorID

Manufacturer ID.

VendorName

Manufacturer name.

SerialNumber

Serial number of the PCIe device.

ProductID

Product ID of the PCIe device.

NegotiatedSpeed

Negotiated speed.

NegotiatedProtocol

Protocol used for negotiation.

NegotiatedLinkWidth

Negotiated bandwidth.

MaxSpeed

Maximum speed.

MaxProtocol

Highest version of the protocol.

PartNumber

Part number of the PCIe device.

Status

Enabling status of the PCIe device.

Health

Health status of the PCIe device.

 

Take a screenshot of KVM

Perform this task to take a screenshot of KVM.

Syntax

hREST -H host -p port -U username -P password getscreencapture -F path

Usage guidelines

G6 models do not support this command.

Parameters

Table 78 Parameter description

Parameter

Description

Value

path

Path for saving the screenshot.

Required.

 

Examples

# Take a screenshot of KVM.

-> hREST -H 192.168.10.11 -U admin -P Password@_ getscreencapture -F ../update

Success: get screen capture successfully

The following is an example of KVM screenshot.

 

Change history

Version

Change description

HDM-1.30.12

Added this command.

 

Configure advanced LDAP settings

Perform this task to configure advanced LDAP settings.

Syntax

hREST -H host -p port -U username -P password setldap -BD bind_dn -CNT common_name_type -E enable -ET encryption_type -PW ldap_password –P port -SB search_base -SA server_address -ULA user_login_attribute

Parameters

Table 79 Parameter description

Parameter

Description

Value

bind_dn

Administrator bind DN.

Optional.

The maximum length is 255 bytes.

common_name_type

Address type of the LDAP server.

Optional. Supported options:

·     ipIP address.

·     fqdnFQDN address.

enable

Enable or disable LDAP authentication.

Optional. Supported options:

·     0Disable.

·     1Enable.

encryption_type

Encryption type.

Optional. Supported options:

·     0No encryption.

·     1SSL.

ldap_password

LDAP password.

Optional.

port

LDAP port number.

Optional.

search_base

LDAP search DN.

Optional.

server_address

LDAP server address.

Optional.

IPv4 address, IPv6 address, or domain name are supported.

user_login_attribute

User identification method.

Optional. Supported options:

·     uidUID.

·     cnCN.

 

Examples

# Configure advanced LDAP settings.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setldap -E 1 -PW 123456 -BD cn=admin,dc=example,dc=com -ULA uid -ET 1 -P 100 -CNT ip -SB dc=example,dc=com -SA 192.168.1.2

Success: set ldap successfully

Obtain LDAP information

Perform this task to obtain LDAP information.

Syntax

hREST -H host -p port -U username -P password getldap

Examples

# Obtain LDAP information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getldap

--------------------------------------------------

CertificateVerificationState            : Enable

EncryptionType                          : SSL

CommonNameType                          : IP

ServerAddress                           : 192.168.1.2

PortNumber                              : 100

BindDN                                  : cn=admin,dc=example,dc=com

Password                                :

SearchBase                              : dc=example,dc=com

UserIdentification                      : uid

[LdapGroups]

    ----------------------------------------------

    MemberId                            : 1

    GroupName                           : test

    GroupDomain                         : dc=example,dc=com

    GroupRole                           : Administrator

    ----------------------------------------------

    MemberId                            : 2

    GroupName                           : test1

    GroupDomain                         : dc=example,dc=com

    GroupRole                           : User

    ----------------------------------------------

    MemberId                            : 3

    GroupName                           : test2

    GroupDomain                         : dc=example,dc=com

    GroupRole                           : Operator

--------------------------------------------------

Table 80 Command output

Field

Description

CertificateVerificationState

Enabling status of LDAP authentication. Supported options:

·     Enable.

·     Disable.

EncryptionType

Encryption type. Supported options:

·     No encryption.

·     SSL.

CommonNameType

Common name type. Supported options:

·     IP.

·     FQDN.

ServerAddress

Server address.

PortNumber

Port number.

BindDN

Bind DN.

Password

Password. The password value is not displayed.

SearchBase

User search base.

UserIdentification

User ID.

MemberId

Role group ID.

GroupName

Role group name.

GroupDomain

Role group search base.

GroupRole

Role group privilege.

 

Add or edit an LDAP user

Perform this task to add or edit an LDAP user.

Syntax

hREST -H host -p port -U username -P password addldapuser -RI role_id -RGN role_group_name -RGD role_group_domain -RGP role_group_privilege -RGKP role_group_kvm_privilege -RGVP role_group_vmedia_privilege -RGNP role_group_network_privilege -RGUP role_group_user_privilege -RGBP role_group_basic_privilege -RGPP role_group_power_privilege -RGFP role_group_firmware_privilege -RGHP role_group_health_privilege -RGRP role_group_remotectrl_privilege

Parameters

Table 81 Parameter description

Parameter

Description

Value

role_id

Role group ID.

Required. Supported options:

·     1.

·     2.

·     3.

·     4.

·     5.

role_group_name

Name of a role group.

Required.

role_group_domain

Search base of the role group.

Required.

role_group_privilege

Level of privileges assigned to the role group.

Required.

role_group_kvm_privilege

KVM privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_vmedia_privilege

Image mounting privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_network_privilege

Network configuration privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_user_privilege

User configuration privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_basic_privilege

Basic setting configuration privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_power_privilege

Power management privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_firmware_privilege

Firmware update privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_health_privilege

Health diagnosis privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

role_group_remotectrl_privilege

Remote control privilege.

Optional. Supported options:

·     1Enabled.

·     0Disabled.

 

Usage guidelines

In a version earlier than HDM-2.0.04, role groups CustomRole1 to CustomRole5 are not configurable. From HDM-2.0.04 to HDM-2.0.06, role groups Custom 1 to Custom 5, instead of CustomRole1 to CustomRole5, take effect.

Examples

# Add an LDAP user.

-> hREST -H 192.168.10.11 -U admin -P Password@_ addldapuser -RI 1 -RGN test -RGD dc=example,dc=com -RGP 3 Operator -RGKP 1 -RGVP 1 -RGNP 1 -RGUP 1 -RGBP 1 -RGPP 1 -RGFP 1 -RGHP 1 -RGRP 1

Success: add ldap user successfully

Change history

Version

Change description

hREST V1.08

Added supported options CustomRole1, CustomRole2, CustomRole3, CustomRole4, and CustomRole5 for role groups.

 

Delete an LDAP user

Perform this task to delete an LDAP user.

Syntax

hREST -H host -p port -U username -P password delldapuser -RI role_id

Parameters

Table 82 Parameter description

Parameter

Description

Value

role_id

Role group ID.

Required. Supported options:

·     1.

·     2.

·     3.

·     4.

·     5.

 

Usage guidelines

If the LDAP user to be deleted does not exist, the system still prompts operation success.

Examples

# Delete an LDAP user.

-> hREST -H 192.168.10.11 -U admin -P Password@_ delldapuser -RI 1

Success: delete ldap user successfully

Configure AD settings

Perform this task to configure AD settings.

Syntax

hREST -H host -p port -U username -P password setad -E ad_enable -UDN ad_user_domain_name -SU ad_secret_username -SP ad_secret_password -DC1 ad_domain_controller1 -DC2 ad_domain_controller2 -DC3 ad_domain_controller3

Parameters

Table 83 Parameter description

Parameter

Description

Value

ad_enable

Enable or disable AD authentication.

Required. Supported options:

·     Disable.

·     Enable.

ad_user_domain_name

Name of an AD user domain.

Optional.

ad_secret_username

Username of a secrete AD user.

Optional.

ad_secret_password

Password of the secrete AD user.

Optional. Ths password must contain a minimum of six characters.

ad_domain_controller1

Address of AD server 1.

Optional.

ad_domain_controller2

Address of AD server 2.

Optional.

ad_domain_controller3

Address of AD server 3.

Optional.

 

Examples

# Configure AD settings.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setad -E 1 -UDN sit.com -SU group1 -SP 123456 -DC1 192.168.1.78 -DC2 192.168.1.79 -DC3 192.168.1.80

uccess: set ad successfully

Obtain AD information

Perform this task to obtain AD information.

Syntax

hREST -H host -p port -U username -P password getad

Usage guidelines

This command is supported in HDM-1.30.12 and later versions.

Examples

# Obtain AD information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getad

--------------------------------------------------

CertificateVerificationState            : Enable

SecretUsername                          : group

SecretPassword                          :

UserDomainName                          : sit.com

DomainControllerAddress1                : 192.168.1.78

DomainControllerAddress2                : 192.168.1.79

DomainControllerAddress3                : 192.168.1.80

[ADUsers]

    ----------------------------------------------

    MemberId                            : 1

    GroupName                           : test

    GroupDomain                         : sit.com

    GroupRole                           : Administrator

    ----------------------------------------------

    MemberId                            : 2

    GroupName                           : test1

    GroupDomain                         : sit.com

    GroupRole                           : CustomRole1

--------------------------------------------------

Table 84 Command output

Field

Description

CertificateVerificationState

Enabling status of AD authentication. Supported options:

·     Enable.

·     Disable.

SecretUsername

Secret username.

SecretPassword

Secret password. The password value is not displayed.

UserDomainName

User domain name.

DomainControllerAddress1

Domain controller server address 1.

DomainControllerAddress2

Domain controller server address 2.

DomainControllerAddress3

Domain controller server address 3.

MemberId

Role group ID.

GroupName

Role group name.

GroupDomain

Role group search based.

GroupRole

Role group privilege.

 

Add or edit an AD user

Perform this task to add or edit an AD user.

Syntax

hREST -H host -p port -U username -P password addaduser -RI role_id -RGN role_group_name -RGD role_group_domain -RGP role_group_privilege -RGOP role_group_withoem_privilege -RGKP role_group_kvm_privilege -RGVP role_group_vmedia_privilege -RGNP role_group_network_privilege -RGUP role_group_user_privilege -RGBP role_group_basic_privilege -RGPP role_group_power_privilege -RGFP role_group_firmware_privilege -RGHP role_group_health_privilege -RGRP role_group_remotectrl_privilege

Parameters

Table 85 Parameter description

Parameter

Description

Value

role_id

Role group ID.

Required. Supported options:

·     1.

·     2.

·     3.

·     4.

·     5.

role_group_name

Name of a role group.

Required.

role_group_domain

Domain name of the role group.

Required.

role_group_privilege

Level of privileges assigned to the role group.

Required.

role_group_kvm_privilege

KVM access privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_vmedia_privilege

Image mounting privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_network_privilege

Network configuration privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_user_privilege

User management privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_basic_privilege

Basic setting configuration privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_power_privilege

Power management privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_firmware_privilege

Hardware upgrade privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_health_privilege

Health diagnostic privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

role_group_remotectrl_privilege

Remote access privilege.

Optional. Supported options:

·     0Disable.

·     1Enable.

 

Usage guidelines

In a version earlier than HDM-2.0.04, role groups CustomRole1 to CustomRole5 are not configurable. From HDM-2.0.04 to HDM-2.0.06, role groups Custom 1 to Custom 5, instead of CustomRole1 to CustomRole5, take effect.

Examples

# Add an AD user.

-> hREST -H 192.168.10.11 -U admin -P Password@_ addaduser -RI 1 -RGN test -RGD sit.com -RGP administrator -RGKP 1 -RGVP 1 -RGNP 1 -RGUP 1 -RGBP 1 -RGPP 1 -RGFP 1 -RGHP 1 -RGRP 1

Success: add ad user successfully

Change history

Version

Change description

hREST V1.08

Added supported options CustomRole1, CustomRole2, CustomRole3, CustomRole4, and CustomRole5 for role groups.

 

Delete an AD user

Perform this task to delete an AD user.

Syntax

hREST -H host -p port -U username -P password deladuser -RI role_id

Parameters

Table 86 Parameter description

Parameter

Description

Value

role_id

ID of a role group.

Required. Supported options:

·     1.

·     2.

·     3.

·     4.

·     5.

 

Examples

# Delete an AD user.

-> hREST -H 192.168.10.11 -U admin -P Password@_ deladuser -RI 1

Success: delete ad user successfully

Obtain GPU information

Perform this task to obtain GPU information.

Syntax

hREST -H host -p port -U username -P password getgpu

Examples

# Obtain GPU information of the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getgpu

--------------------------------------------------

ID                                      : 0x1

Name                                    : Tesla K80

SlotNum                                 : 2

Manufacturer                            : NVIDIA

Model                                   : Tesla K80

SerialNumber                            : 0324816063163

PartNumber                              : 102D-885-A1

FirmwareVersion                         : 80.21.1F.00.01

PowerConsumedWatts                      : 0

TemperatureCelsius                      : 67

DriverVersion                           : null

ECCEnable                               : null

GCUVoltage                              : null

HBMVoltage                              : null

 

[Status]

Health                                  : OK

State                                   : Enable

--------------------------------------------------

Table 87 Command output

Field

Description

ID

GPU ID.

Name

GPU name.

SlotNum

GPU slot number.

Manufacturer

Vendor name.

Model

GPU model.

SerialNumber

GPU serial number.

PartNumber

GPU part number.

FirmwareVersion

GPU firmware version.

PowerConsumedWatts

Power of the GPU. If the power is 0, install the GPU driver in the OS.

TemperatureCelsius

Temperature in °C.

DriverVersion

Driver version.

ECCEnable

ECC status.

GCUVoltage

GCU voltage.

HBMVoltage

HBM voltage.

Health

GPU health status.

State

GPU presence status.

 

Obtain VNC session information

Perform this task to obtain VNC session information.

Syntax

hREST -H host -p port -U username -P password getvncsession

Examples

# Obtain VNC session information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getvncsession

--------------------------------------------------

Id                                      : 28

SessionID                               : 28

SessionType                             : VNC

ClientIP                                : 192.168.184.44

UserID                                  : N/A

UserName                                : N/A

UserPrivilege                           : Administrator

--------------------------------------------------

Table 88 Command output

Field

Description

Id

ID.

SessionID

Session ID.

SessionType

Session type.

ClientIP

IP address

UserID

User ID.

UserName

Username.

UserPrivilege

User privilege.

 

Obtain the firewall status

Perform this task to obtain the firewall status of the server.

Syntax

hREST -H host -p port -U username -P password getfirewall

Examples

# Obtain the firewall status of the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getfirewall

--------------------------------------------------

Status                                  : Stop

--------------------------------------------------

Table 89 Command output

Field

Description

Status

Firewall status. Supported options:

·     StopThe firewall is disabled.

·     WhiteListThe firewall operates in whitelist mode.

·     BlackListThe firewall operates in blacklist mode.

 

Set the firewall status

Perform this task to set the firewall status of the server.

Syntax

hREST -H host -p port -U username -P password setfirewall –S status

Parameters

Table 90 Parameter description

Parameter

Description

Value

status

Firewall status.

Required. Supported options:

·     StopThe firewall is disabled.

·     WhiteListThe firewall operates in whitelist mode.

·     BlackListThe firewall operates in blacklist mode.

 

Examples

# Set the firewall status of the server to Whitelist.

-> hREST –H 192.168.10.6 –U ****** -P ****** setfirewall -S WhiteList

Success: set the firewall status successfully

Obtain components using a serial port

Perform this task to obtain the components that use a serial port.

Syntax

hREST -H host -p port -U username -P password getserialport

Examples

# Obtain the components that use a serial port.

-> hREST –H 192.168.10.6 –U ****** -P ****** getserialport

--------------------------------------------------

PanelComSources                         : Host

SOLSource                               : Host

--------------------------------------------------

Table 91 Command output

Field

Description

PanelComSources

Components that are using the serial port on the front panel. Supported options:

·     BMC.

·     Host.

·     PCIeNIC.

·     MEZZNIC.

·     MEZZRAID.

SOLSource

Components that are using the serial port on the panel. Supported options:

·     BMC.

·     Host.

·     PCIeNIC.

·     MEZZNIC.

·     MEZZRAID.

 

Configure the components to use a serial port

Perform this task to configure the components of the server to use a serial port.

Syntax

hREST -H host -p port -U username -P password setserialport –D type –S source

Parameters

Table 92 Parameter description

Parameter

Description

Value

type

Serial port type.

Required. Supported options:

·     panel.

·     sol.

source

Components that use a serial port.

Required. Supported options:

·     host.

·     bmc.

·     mezzraid.

·     mezznic.

·     PCIeNIC.

 

Examples

# Configure BMC to use the serial port on the front server panel.

-> hREST –H 192.168.10.6 –U ****** -P ****** setserialport -D panel -S bmc

Success: the serial port is set successfully

Locate a physical drive

Perform this task to set the UID LED status to locate a physical drive.

Syntax

hREST -H host -p port -U username -P password locatedisk -I diskId –L diskType –S status

User role

admin

Parameters

Table 93 Parameter description

Parameter

Description

Value

diskId

Physical drive ID.

Required.

diskType

Physical drive type.

Optional.

status

UID LED status.

Required. Supported options:

·     on.

·     off.

 

Usage guidelines

In a version earlier than HDM-2.12, a physical drive ID is the ID of the corresponding sensor, and the diskType field is reserved and does not take effect.

In HDM-2.12 or later, a physical drive ID is the physical drive slot number. You can obtain the physical drive ID from the Slot_phys_no field in the output of the getpdsik command. The options for the DiskType field include 0 (default) and 1. 0 represents an HDD or SSD drive, and 1 represents an NVMe drive.

Examples

# Turn on the UID LED for the physical drive with sensor ID 160.

-> hREST –H 192.168.10.6 –U ****** -P ****** locatedisk -I 160 -S on

Success: set the physical disk led light successfully

Obtain storage media alarm thresholds

Perform this task to obtain the alarm thresholds for storage media in the server.

Syntax

hREST -H host -p port -U username -P password getthreshold

Examples

# Obtain the alarm thresholds for storage media in the server.

-> hREST –H 192.168.10.6 –U ****** -P ****** getthreshold

--------------------------------------------------

ReservedBlock                           : 10

ReservedBlockStatus                     : Disabled

RemainLifePercents                      : 90

RemainLifePercentsStatus                : Disabled

PrefailCount                            : 0

PrefailCountStatus                      : Enabled

MediaError                              : 60000

MediaErrorStatus                        : Disabled

--------------------------------------------------

Table 94 Command output

Field

Description

ReservedBlock

Number of reserved blocks that can trigger an alarm.

ReservedBlockStatus

Status of reserved blocks.

RemainLifePercents

Remaining drive life in percentage.

RemainLifePercentsStatus

Status of remaining drive life in percentage.

PrefailCount

Number of predictive failures that can trigger an alarm. This field is available only for HDDs and SSDs.

PrefailCountStatus

Status of predictive failures.

MediaError

Number of media errors that can trigger an alarm. This field is available only for HDDs and SSDs.

MediaErrorStatus

Status of media errors.

 

Change history

Version

Change description

HDM-1.30.09

Added the interface.

 

Set a storage media alarm threshold

Perform this task to set an alarm threshold for storage media in the server.

Syntax

hREST -H host -p port -U username -P password setthreshold –F type –T threshold –S status

Parameters

Table 95 Parameter description

Parameter

Description

Value

type

Alarm type.

Required. Supported options:

·     reservedblock.

·     remainlife.

·     prefailcount.

·     mediaerror.

threshold

Value range of an alarm threshold.

Required. Supported options:

·     reservedblock0 to100.

·     remainlife0 to 100.

·     prefailcount0 to 255.

·     mediaerror0 to 65535.

status

Enablement status of storage media alarming.

Optional. Supported options:

·     Enable. This option is the default.

·     Disable.

 

Examples

# Set the alarm threshold of remaining drive life to 90, and enable remaining life alarming.

-> hREST –H 192.168.10.6 –U ****** -P ****** setthreshold -F remainlife -T 90 -S Enable

Success: successfully set the remainlife threshold

Change history

Version

Change description

HDM-1.30.09

Added the interface.

 

Obtain event subscription information

Perform this task to obtain event subscription information from the server.

Syntax

hREST -H host -p port -U username -P password geteventsubs

Examples

# Obtain event subscription information.

-> hREST –H 192.168.10.6 –U ****** -P ****** geteventsub

--------------------------------------------------

Id                                      : 1

Destination                             : https://172.16.11.96

EventTypes                              : ResourceUpdated, StatusChange, ResourceRemoved, ResourceAdded, Alert

HttpHeaders                             : null

Protocol                                : Redfish

Context                                 : event subscription context string

MessageIds                              : []

OriginResources                         : []

--------------------------------------------------

Table 96 Command output

Field

Description

Id

Event service resource ID.

Destination

URI of the event recipient.

EventTypes

Event type. Supported options:

·     ResourceRemoved.

·     ResourceAdded.

·     StatusChange.

·     ResourceUpdated.

·     Alert.

HttpHeaders

HTTP header of event subscription and is fixed at null for event subscription query.

Protocol

Event subscription protocol. Supported options include Redfish.

Context

Event subscription context information in strings.

MessageIds

Event subscription message ID matching list.

OriginResources

Event subscription event source matching list.

 

Upload an SSH secret key

Perform this task to upload an SSH secret key.

Syntax

hREST -H host -p port -U username -P password importsshkey –N name –F sshfFile -O Status

Parameters

Table 97 Parameter description

Parameter

Description

Value

name

Name of the user for editing.

Optional.

If you do not specify this argument, the command configures the current user.

sshfFile

SSH secret key file.

Optional.

Status

Whether to only bind users without uploading files.

Optional. Supported options:

·     Enable.

·     Disable.

 

Examples

# Upload an SSH secret key for user test.

-> hREST –H 192.168.10.6 –U ****** -P ****** importsshkey -N test -F ../config/key.pub

Success: import SSH key successfully

Delete an SSH secret key

Perform this task to delete an SSH secret key.

Syntax

hREST -H host -p port -U username -P password delsshkey –N name -F SSH_key_name

Parameters

This command is not available in in-band management mode.

Parameters

Table 98 Parameter description

Parameter

Description

Value

name

Name of the user for deletion.

Optional.

If you do not specify this argument, the command deletes the SSH password for the current user.

SSH_key_name

Name of the SSH secret key file.

Optional.

Examples

# Delete the SSH secret key for user test.

-> hREST –H 192.168.10.6 –U ****** -P ****** importsshkey -N test

Success: successfully delete the ssh public key

Obtain two-factor authentication settings

Perform this task to obtain two-factor authentication settings.

Syntax

hREST -H host -p port -U username -P password get2factorauth

Examples

# Obtain two-factor authentication settings.

-> hREST –H 192.168.10.6 –U ****** -P ****** get2factorauth

--------------------------------------------------

TwoFactorAuthenticationState            : False

OTPServerAddress                        : sit.com

OTPServerPort                           : 1812

OTPServerSharedKey                      : 123

--------------------------------------------------

Table 99 Command output

Field

Description

TwoFactorAuthenticationState

Enabling status of two-factor authentication. Supported options:

·     True—Enabled.

·     False—Disabled.

OTPServerAddress

OTP server address.

OTPServerPort

OTP service port number.

OTPServerSharedKey

Shared key.

 

Configure two-factor authentication settings

Perform this task to configure two-factor authentication settings.

Syntax

hREST -H host -p port -U username -P password set2factorauth –E authEnable –D serverAddr –P portNum –K shareKey

Parameters

Table 100 Parameter description

Parameter

Description

Value

authEnable

Enable or disable two-factor authentication.

Optional. Supported options:

·     Enable.

·     Disable.

serverAddr

OTP server address.

Optional.

portNum

Service port number.

Optional.

shareKey

Shared key.

Optional.

The shared key is a string of 1 to 64 characters.

Examples

# Configure two-factor authentication settings.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ set2factorauth -E Disable -P 999 -D sit.com –K 1234

Success: two-factor authentication configuration is successful

Obtain LLDP information

Perform this task to obtain LLDP information.

Syntax

hREST -H host -p port -U username -P password getlldp

Usage guidelines

This command is supported in HDM-1.30.10 and later versions.

Examples

# Obtain LLDP information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getlldp

--------------------------------------------------

Name                                    : LldpService

LldpEnabled                             : Disable

WorkMode                                : Tx

[LLDP]

    ----------------------------------------------

    ChassisMac                          : 58:6a:b1:0b:31:af

    ChassisName                         : 21

    EthIndex                            : eth0

    PortDesc                            : GigabitEthernet1/0/4 Interface

    PortIfName                          : GigabitEthernet1/0/4

    VlanId                              : 1

    ----------------------------------------------

    ChassisMac                          : 58:6a:b1:0b:31:af

    ChassisName                         : 21

    EthIndex                            : eth1

    PortDesc                            : GigabitEthernet1/0/25 Interface

    PortIfName                          : GigabitEthernet1/0/25

    VlanId                              : 1

--------------------------------------------------

Table 101 Command output

Field

Description

Name

Service name.

CertificateVerificationState

Enabling status of LLDP frame sending. Supported options:

·     Enable.

·     Disable.

WorkMode

LLDP operation mode. Supported options:

·     Tx—Frame sending mode.

ChassisMac

MAC address of the connected switch.

ChassisName

System name of the connected switch.

EthIndex

Network port.

PortDesc

Information about the connected switch port.

PortIfName

Number of the connected switch port.

VlanId

VLAN ID

 

Configure LLDP settings

Perform this task to configure LLDP settings.

Syntax

hREST -H host -p port -U username -P password setlldp –S serviceEnable

Parameters

Table 102 Parameter description

Parameter

Description

Value

serviceEnable

Enable or disable LLDP service.

Required. Supported options:

·     Enable.

·     Disable.

 

Usage guidelines

This command is supported in HDM-1.30.10 and later versions.

This command is not available in HDM-3.30, HDM-3.31, or HDM-3.32.

Examples

# Enable LLDP frame sending.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setlldp –S Enable

Success: successfully set LLDP service attributes

Obtain DNS information

Perform this task to obtain DNS information.

Syntax

hREST -H host -p port -U username -P password getdns -N network_port_id -IP internet_protocol

Parameters

Table 103 Parameter description

Parameter

Description

Value

network_port_id

Network port ID.

Optional.

internet_protocol

Network protocol.

Supported options:

·     IPv4.

·     IPv6.

 

Examples

# Obtain DNS information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getdns

--------------------------------------------------

Status                                  : Enable

ServerSetup                             : Manual

SuperiorDomain                          :

PreferredServer                         : 192.168.0.66

AlternateServer                         : 192.168.0.67

TertiaryServer                          : 192.168.0.68

--------------------------------------------------

Table 104 Command output

Field

Description

Status

Enabling status of the DNS service. Supported options:

·     Enable.

·     Disable.

ServerSetup

Method for configuring the DNS server. Supported options:

·     Manual.

·     IPv4Auto.

·     IPv6Auto.

SuperiorDomain

Parent domain of the current domain.

PreferredServer

DNS server 1.

AlternateServer

DNS server 2.

TertiaryServer

DNS server 3.

 

Configure the DNS service

Perform this task to configure the DNS service.

Syntax

hREST -H host -p port -U username -P password setdns E serviceEnable –M configMethod –D dynamicSelects -P RegPort –DS domainSuffix -PS preferredServer –AS alternateServer –TS tertiaryServer -N network_port_id -IP internet_protocol

Parameters

Table 105 Parameter description

Parameter

Description

Value

serviceEnable

Enable or disable the DNS service.

Optional. Supported options:

·     Enable.

·     Disable.

configMethod

Method for configuring the DNS server.

Optional. Supported options:

·     Manual.

·     IPv4Auto.

·     IPv6Auto.

dynamicSelects

Dynamic registration option.

Optional. Supported options:

·     HostName.

·     Auto.

RegPort

Port to obtain DNS registration information.

Optional. Supported options:

·     Shared.

·     Dedicated.

By default, the system uses the shared network port.

domainSuffix

Domain suffix.

Optional.

This argument is in the domain name format.

preferredServer

Address of DNS server 1.

Optional.

IPv4 and IPv6 addresses are supported.

alternateServer

Address of DNS server 2.

Optional.

IPv4 and IPv6 addresses are supported.

tertiaryServer

Address of DNS server 3.

Optional. IPv4 and IPv6 addresses are supported.

network_port_id

Network port ID.

Optional.

internet_protocol

Internet protocol.

Optional. Supported options:

·     IPv4.

·     IPv6.

 

Examples

# Enable DNS service, set the configuration method to manual, and specify domain suffix sit.com, DNS sever 1 IP address 192.168.0.66, DNS server 2 IP address 192.168.0.67, and DNS server 3 IP address 192.168.0.68.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setdns -E Disable -M Manual -DS sit.com -PS 192.168.0.66 -AS 192.168.0.67 -TS 192.168.0.68

Success: DNS configuration is successful

Obtain system performance information

Perform this task to obtain system performance information.

Syntax

hREST -H host -p port -U username -P password getsysperf

Examples

# Obtain system performance information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getsysperf

--------------------------------------------------

CPUUsagePercent                         : 0

CPUThresholdPercent                     : 40

CPUUsageAlert                           : OK

MemoryUsagePercent                      : 3

MemoryThresholdPercent                  : 50

MemoryUsageAlert                        : OK

[IOUsage]

    ----------------------------------------------

    Name                                : C

    UsedSize                            : 29.16GB

    TotalSize                           : 1.82TB

    IOUsagePercent                      : 2

    IOUsageAlert                        : Alert

--------------------------------------------------

IOThresholdPercent                      : 1

--------------------------------------------------

Table 106 Command output

Field

Description

CPUUsagePercent

CPU usage.

CPUThresholdPercent

CPU usage alarm threshold.

CPUUsageAlert

CPU usage alarm status. Supported options:

·     OK.

·     Alert.

MemoryUsagePercent

Memory usage.

MemoryThresholdPercent

Memory usage alarm threshold.

MemoryUsageAlert

Memory usage alarm status. Supported options:

·     OK.

·     Alert.

IOUsage

IO usage.

Name

Drive name.

UsedSize

Used drive capacity.

TotalSize

Total drive capacity.

IOUsagePercent

Drive usage.

IOUsageAlert

Drive usage alarm status.

IOThresholdPercent

IO usage alarm threshold.

 

Configure system performance alarm thresholds

Perform this task to configure system performance alarm thresholds.

Syntax

hREST -H host -p port -U username -P password setsysperf -C CPU –M MEM -I IO

Parameters

Table 107 Parameter description

Parameter

Description

Value

CPU

CPU usage alarm threshold.

Optional.

MEM

Memory usage alarm threshold.

Optional.

IO

IO usage alarm threshold.

Optional.

 

Examples

# Configure usage alarm thresholds for the CPU, memory, and drive as 70, 80, 90, respectively.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setsysperf  -C 70 -M 80 -I 90

Success: successfully set the host monitoring alarm threshold

Obtain video recording configuration

Perform this task to obtain video recording configuration.

Syntax

hREST -H host -p port -U username -P password getvideocfg

Examples

# Obtain video recording configuration.

-> hREST –H 192.168.10.6 –U ****** -P ****** getvideocfg

--------------------------------------------------

RecordService                           : Enable

RecordTime                              : 20

[RecordEvent]

Crash                                   : Enable

Restart                                 : Enable

Shutdown                                : Disable

--------------------------------------------------

Table 108 Command output

Field

Description

RecordService

Enabling status of video recording. Supported options:

·     Enable.

·     Disable.

RecordTime

Recording duration in seconds.

Crash

Enabling status of pre-crash video recording.

Restart

Enabling status of pre-restart video recording.

Shutdown

Enabling status of pre-shutdown video recording.

 

Configure video recording

Perform this task to configure video recording.

Syntax

hREST -H host -p port -U username -P password setvideocfg -E recordEnable –T recordTime –C crashEnable –R restartEnable –S shutdownEnable

Parameters

Table 109 Parameter description

Parameter

Description

Value

recordEnable

Enable or disable video recording.

Optional. Supported options:

·     Enable.

·     Disable.

recordTime

Video recording duration.

Optional.

The length is in the range of 15 to 255 seconds.

crashEnable

Pre-crash recording.

Optional. Supported options:

·     Enable.

·     Disable.

restartEnable

Pre-restart recording.

Optional. Supported options:

·     Enable.

·     Disable.

shutdownEnable

Pre-shutdown recording.

Optional. Supported options:

·     Enable.

·     Disable.

Examples

# Enable video recording for crash and restart events and set the recording duration to 15s.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setvideocfg -E Enable -T 15 -C Enable -R Enable -S Disable

Success: the video recording function is set successfully

Configure the power mode

Perform this task to configure the power mode.

Syntax

hREST -H host -p port -U username -P password setpsu -M powerMode –I powerID –P  perfMode

Parameters

Table 110 Parameter description

Parameter

Description

Value

powerMode

Power mode.

Optional. Supported options:

·     LoadBalancing.

·     ActiveStandby.

powerID

ID of the active power supply in active/standby mode.

This argument is required in active/standby mode.

perfMode

Power efficiency mode.

Optional. Supported options:

·     PerformancePerformance first.

·     Balanced.

·     PowerPower saving.

 

Usage guidelines

In active/standby mode, make sure a minimum of one standby power is reserved. If only one power supply is present, you cannot set the power mode.

Exampels

# Set the power mode to active/standby, specify power supply 1 as the active power supply, and set the power efficiency mode to performance.

-> hREST -H 192.168.10.32 -p 443 -U admin -P Password@_ setpsu -M ActiveStandby -I 1 -P Power

Success: power setting is successful

Scan the servers for memory module failures

Perform this task to scan the servers for memory module failures.

Syntax

hREST -H host -p port -U username -P password memoryinspect –M Mode –C ThreadCount –P LogPath -L ALARMLIMIT

Parameters

Table 111 Parameter description

Parameter

Description

Value

Mode

Scanning mode.

Optional. Supported options:

·     SingleScans a single server.

·     MultipleScans servers in batch.

By default, the system uses the single mode for memory module failure prediction.

ThreadCount

Number of threads.

Optional.

By default, the number of threads is 100.

LogPath

Result file path.

Optional.

By default, the result file path is project_directory/logs/result.log.

ALARMLIMIT

Alarm limit.

Optional.

In HDM-3.37 and later versions, the user-defined alarm threshold is no longer effective. For details, see the usage guidelines below.

 

Usage guidelines

This command is not supported in in-band mode. Memory CE Limit alarm is by default in a masked state and must be manually enabled before you use the function.

HDM-3.37 introduced a PFA alarm strategy where a single CE limit alarm does not trigger an event log. If 32 CE alarms accumulate within a specific period, a PFA alarm will be triggered. The user-defined alarm threshold is no longer effective, and is always set to 1.

This command is supported in HDM-1.30.18P56 and later versions and BIOS-2.00.39 and later versions.

To perform bulk scanning, make sure the …/config/server_info.txt file exists and the server information format is correct. The system records the scanning process in the …/logs/execute.log file. When the file size reaches 10 M, the system backs up the file as execute.log.1.

For batch scanning, the –H, -U, -P, and –p keywords do not take effect. The keywords are kept for consistency with other commands. You can specify any valid values for these keywords.

To ensure the accuracy of the scanning result, make sure the servers use consistent time zones.

This command is not available in HDM-1.10.xx. (The corresponding version does not record log messages of hardware replacement.)

Each row in the server_info.txt file represents a server, including server host address, username, password, and port number (optional), which are separated by spaces, for example, 192.168.0.14  admin ****** 443. Make sure the server_info.txt file does not have extra blank lines at the end.

-> server_info.txt

192.168.0.18 admin ******

192.168.0.19 root ******

192.168.0.20 admin ****** 443

192.168.0.21 admin ******

--------------------------------

The above is a sample. Remove these rows before you use the server_info.txt file.

Examples

# Scan memory module failures on a single server.

-> hREST –H 192.168.0.14 –U ****** -P ****** memoryinspect

IP             Serial Number            Slot           Description

192.168.0.14   210235A2CSH17C000001     CPU1_DIMM_A5   occur 32 ce limit(s) in the past day

 

# Scan memory module failures on multiple servers in bulk, set the thread count to 50, and record the result in directory D:/result/inspect_res.log.

-> hREST –H 192.168.0.14 –U ****** -P ****** memoryinspect –M Multiple –C 50 –P D:/result/inspect_res.log

IP                Serial Number            Slot           Description        

192.168.0.33      None                     None           Cannot access HDM  

192.168.0.32      None                     None           Ping https failed  

192.168.170.53    210235A2CSH17D000001     None           No memory failure detected

192.168.0.197     210235A2CSH17C000001     CPU1_DIMM_A1   occur 33 ce limit(s) in the past day

Disable the HDM shared network port

Perform this task to disable the HDM shared network port.

Syntax

hREST -H host -p port -U username -P password setshareport –N ethernetid –S disable

Parameters

Table 112 Parameter description

Parameter

Description

Value

ethernetid

Network port name.

Optional.

disable

Disable the shared port.

Required. Supported options:

·     Disabled.

 

Usage guidelines

This command is supported in HDM-2.97 and later versions.

Example

# Disable shared network port eth0.

-> hREST –H 192.168.10.6 –U ****** -P ****** setshareport -N eth0 –S Disabled

Success: set shareport successfully

Obtain NCSI status for the shared network port

Perform this task to obtain NCSI status for the shared network port.

Syntax

hREST -H host -p port -U username -P password getncsi

Exampels

# Obtain NCSI status for the shared network port.

-> hREST –H 192.168.10.6 –U ****** -P ****** getncsi

--------------------------------------------------

NCSIStatus                              : Enable

--------------------------------------------------

Table 113 Command output

Field

Description

NCSIStatus

NCSI enabling status for the network port. Supported options:

·     Enable.

·     Disable.

 

Configure NCSI status for the shared network port

Perform this task to configure NCSI status for the shared network port.

Syntax

hREST -H Host -p Port -U UserName -P PassWord  setncsi -S NcsiStatus

User role

admin

Parameters

Table 114 Parameter description

Parameter

Description

Value

NcsiStatus

Enable or disable NCSI for the shared network port.

Required. Supported options:

·     Enable.

·     Disable.

 

Usage guidelines

You cannot use the IP address of the shared network port to disable NCSI for the port.

Examples

# Disable NCSI for the shared network port.

-> ./hREST –H 192.168.10.6 –U ****** -P ****** setncsi -S Disable

Success: set the shared port NCSI successfully

Set the VNC password

Perform this task to configure the VNC password.

Syntax

hREST -H Host -p Port -U UserName -P PassWord  setvnc -P VNCpwd

User role

admin

Parameters

Table 115 Parameter description

Parameter

Description

Value

VNCpwd

VNC password.

Required.

 

Usage guidelines

The password complexity and length are restricted by the back end, and this tool does not perform password check. As a best practice, do not use special characters that the operating system can automatically escape, to avoid setting a password that deviates from the actual valid password.

This command is not available in HDM B01.

Examples

# Set the VNC timeout timer to 20 minutes and the password to root.

-> ./hREST –H 192.168.10.6 –U ****** -P ****** setvnc -P root

"Success: VNC password is set successfully"

Obtain SMTP information

Perform this task to obtain SMTP information.

Syntax

hREST -H host -p port -U username -P password getsmtp

Examples

# Obtain SMTP information.

-> hREST –H 192.168.10.6 –U ****** -P ****** getsmtp

--------------------------------------------------

Id                                      : Smtp

Name                                    : Smtp

ServiceEnabled                          : True

ServerAddress                           : 2022::20

ServerPort                              : 10086

AnonymousLoginEnabled                   : False

SenderAddress                           : [email protected]

SenderUserName                          : test

SenderPassword                          : null

AlarmSeverity                           : All

TLSEnabled                              : False

 

RecipientAddresses

    MemberId                            : 1

    EmailAddress                        :

    Enabled                             : True

    ----------------------------------------------

--------------------------------------------------

Table 116 Command output

Field

Description

Id

SMTP resource ID

Name

Resource name.

ServiceEnabled

Whether the service is enabled.

ServerAddress

Server address.

ServerPort

Server port.

AnonymousLoginEnabled

Whether anonymous login is enabled.

SenderAddress

Sender email address.

SenderUserName

Sender username.

SenderPassword

Sender password.

AlarmSeverity

Alarm severities. Supported options:

·     Critical

·     All

·     Minor+Major+Critical

TLSEnabled

Whether TLS is enabled for trap notification.

RecipientAddresses.MemberId

ID of the recipient email address.

RecipientAddresses. EmailAddress

Recipient email address.

RecipientAddresses. Enabled

Whether the email address of the recipient is enabled.

 

Configure SMTP settings

Perform this task to configure SMTP settings.

Syntax

hREST -H host -p port -U username -P password setsmtp -S SmtpEnabled - A SeverAddress -P ServerPort -AN AnonymousEnabled -SN SenderName -SP SenderPwd -SA SenderAddr -AS AlarmSeverity -TLS TlsEnabled -RA RecipAddr

Parameters

Table 117 Parameter description

Parameter

Description

Value

SmtpEnabled

Enabling status of the SMTP service.

Optional.

Supported options:

·     Enable.

·     Disable.

SeverAddress

Server address.

Optional.

ServerPort

Service port.

Optional.

The port range is 1 to 65535.

AnonymousEnabled

Enabling status of anonymous login.

Optional.

Supported options:

·     Enable.

·     Disable.

SenderName

Sender username.

Optional.

SenderPwd

Sender password.

Optional.

SenderAddr 

Sender email address.

Optional.

AlarmSeverity

Alarm severity.

Optional.

Supported options:

·     Critical.

·     Minor+Major+Critical.

·     All.

TlsEnabled

Enabling status of TLS.

Optional. Supported options:

·     Enable.

·     Disable.

RecipAddr

Email address that receives alarm emails.

Optional.

For example:

[1:1:admin:administrator+2:0:test:abc]

Where two recipients are configured, each contains four options separated by colons (:). Take 2:0:test:abc as an example:

·     2A ID, in the range of 1 to 15.

·     1 indicates enabled and 0 indicates disabled.

·     testHDM username.

·     abcEmail subject.

 

Examples

# Configure the SMTP service.

-> hREST.bat -H 192.168.0.49 -U admin –P Password@_ setsmtp -S Enable -A 192.168.0.16 -P10999 -AN Enable -AS All -TLS Enable -RA [1:1:admin:administrator+2:1:test:abc]

Success: set smtp successfully

Export operation log

Perform this task to export the operation log of the tool.

Syntax

hREST -H host -p port -U username -P password exportlog –F filepath

Usage guidelines

This command is available in in-band management mode.

In out-of-band management mode, the tool will check the connectivity of the host address. As a best practice, do not use this command in out-of-band management mode. The log file is in ZIP format. As a best practice, name the log file name suffixed with .zip.

Parameters

Table 118 Parameter description

Parameter

Description

Value

filepath

Path and name of the file for saving configuration files.

Required.

If this argument is empty, the operation log will be saved to the config folder in the tool directory.

 

Examples

# Export the operation log of the tool.

-> hREST –H 192.168.10.6 –U ****** -P ****** exportlog -F ../abc.zip

Success: export tool operation logs successful

 

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网