HPE 3PAR CLI Cheat Sheet: 50+ show and check Commands - 夜莺博客

HPE 3PAR CLI Cheat Sheet: 50+ show and check Commands

HPE 3PAR (StoreServ) storage arrays are administered primarily through the CLI, and with dozens of show* commands it is easy to lose track of which one answers which question. This cheat sheet — compiled from the spectra.com 3PAR CLI reference — groups the most commonly used commands by function: system health, provisioning (CPG/VV), host mapping (VLUN), physical disks, ports and diagnostics. Bookmark it for your next maintenance window.

This page is the inventory: what commands exist, what each one does, and which question it answers. For the operational narrative — creating a volume, mapping it, snapshotting it and handling an alert end to end — read the companion article HPE 3PAR administration: common CLI commands by category, which turns this list into workflows.

How to Read This Cheat Sheet

Every command below runs from the 3PAR CLI prompt, which is entered by SSHing to the array's management IP and authenticating. The prompt is shown as cli% throughout. A handful of conventions apply to nearly every command:

  • Object name patterns. Most commands accept glob-style patterns, so showvv VV* lists every volume whose name begins with VV, and showpd -c 1.* selects chunklets on disk 1.
  • Verbosity. The -v (verbose) flag turns single-line output into a multi-line block with every attribute. It is the difference between "the volume exists" and "the volume exists, is on these LDs, with these policies".
  • No confirmation for reads. show* and check* commands are read-only. Destructive commands (removevv, removevlun, dismisspd) prompt for confirmation.
  • Command history and help. help <command> prints the full option list for any command; help search <keyword> finds commands by keyword. On older code both are available offline, which matters when a support engineer asks for exact syntax.
cli% help                          # command overview
cli% help showvv                   # full syntax for one command
cli% help search volume            # find commands by keyword
cli% help search -t "snapshot"     # keyword search in help text

System and Health

The first command set to run in any maintenance window: is the array healthy, is anything alerting, what changed recently.

showalert        - show status of system alerts
showsys          - show system information (name, serial)
showversion      - show software versions
shownode         - show node and component information
shownodeenv      - show node environmental status
showeventlog     - show event logs
showlicense      - show installed license key
showdate         - show date and time on all system nodes
showpatch        - show applied patches
checkhealth      - perform checks on overall system state

showsys -d is the command support will ask for first: it prints model, serial number, node count and per-node detail in one block. showalert -d lists alerts with full description; showalert -n restricts output to new (unacknowledged) alerts only, which is the fastest way to see whether somebody else already triaged the issue.

cli% showsys -d                    # model, serial, node detail
cli% showalert -n                  # new alerts only
cli% showalert -v                  # verbose alert detail
cli% showeventlog -min 30          # events in the last 30 minutes
cli% showpeer -d                   # peer/remote-copy partner state
cli% showbattery                   # battery/capacitor status per node

Provisioning: CPG and VV

Virtual volumes (VVs) are carved out of Common Provisioning Groups (CPGs); CPGs are carved out of logical disks (LDs); LDs are built from chunklets on physical disks. Every layer has its own show command, and knowing which layer to inspect is most of the diagnosis.

showcpg          - show Common Provisioning Groups (CPGs)
showvv           - show virtual volumes (VVs)
showvvmap        - show VV to LD mapping
showvvpd         - show VV distribution across PDs
showvvset        - show sets of VVs
showld           - show logical disks (LDs)
showldch         - show LD to PD chunklet mapping
showldmap        - show LD to VV mapping

Three combinations cover most provisioning questions. showvv -v <vv> answers "what are this volume's policies, provisioning type and size". showvv -s answers "how much space is actually reserved versus allocated" (the Usr_Rsvd_MB, Usr_Used_MB, Usr_Free_MB columns). showcpg -sdg answers "how is each CPG laid out across device types and RAID levels".

cli% showvv -v VV1                 # full attributes for one volume
cli% showvv -s                     # space consumption per VV
cli% showcpg -sdg                  # CPG layout by device type / RAID
cli% showvv -perc                  # VV space breakdown by category
cli% showvvmap -v VV1              # which LDs back this VV
cli% showld -t p                   # logical disks by RAID type

Hosts and Mappings

Host objects bundle one or more WWNs (FC) or iSCSI IQNs, and a VLUN is the export that makes a VV visible to a host at a LUN ID.

showhost         - show host and host path information
showhostset      - show sets of hosts
showvlun         - show virtual LUNs (VLUNs) in the system
showblock        - show block mapping info for VVs, LDs, PDs
cli% showhost -d                   # host objects with WWNs/IQNs
cli% showhost -listnames           # host names only (fast)
cli% showvlun -v VV1               # every export of one volume
cli% showvlun -host host1          # every volume exported to one host
cli% showvlun -host host1 -pathsum # path count and state per host
cli% showhost -pathsum             # path summary for all hosts

The -pathsum variants are the single most useful diagnostic in this section: a host that has lost half its paths shows it immediately as a reduced path count, and that tells you to look at the fabric or one array port rather than at the volume.

Physical Disks, Ports and Connectivity

showpd           - show physical disks (PDs)
showpdch         - show chunklet status of physical disks
showpdvv         - show PD to VV mapping
showspare        - show spare and relocated chunklets
showport         - show FC and iSCSI ports
showportdev      - show detailed device info on FC port
showportlesb     - show Link Error Status Block on FC port
showiscsisession - show iSCSI sessions
showcage         - show disk cage information
checkpd          - surface scan / diagnostics on physical disks
checkport        - loopback test on FC ports
checkld          - validity checks on logical disks
cli% showpd -failed -degraded      # any bad or degraded disk
cli% showpd -c                     # chunklet counts per disk
cli% showpd -spare                 # spare usage per disk
cli% showpdch -fail                # every failed chunklet
cli% showcage -d 0                 # cage 0 detail (power, fans, drives)
cli% showportlesb -state           # FC link error summary
cli% showportlesb -summary         # aggregate error counters
cli% showiscsisession -v            # iSCSI session detail

showpd -failed -degraded is the fastest answer to "do I have a bad disk". showportlesb exposes link error statistics when a host reports flaky storage — a rising CRC or loss-of-signal counter on one HBA port usually means an optics or cable problem, not an array problem.

Alerts and Event Investigation

Alerts are the array telling you what it thinks is wrong; the event log is the raw chronological record. Working both together is how you go from "an alert fired" to "here is the root cause".

cli% showalert                     # all active alerts, one line each
cli% showalert -n                  # new / unacknowledged only
cli% showalert -d                  # with full detail block
cli% showalert -a                  # acknowledged alerts
cli% showalert -t 2                # only alerts of severity/filter type 2
cli% showalert -nf                 # new alerts, no footer/detail
cli% showeventlog                  # full event log
cli% showeventlog -min 60          # last 60 minutes
cli% showeventlog -oneline         # one line per event (compact)
cli% showeventlog -debug 1         # include debug-level events

Typical triage order: showalert -n to see what fired, showalert -d to read the exact component and recommended action, then showeventlog -min 30 to see the sequence immediately before it — a disk failure alert is far more useful when you can see the preceding write-error events on the same disk. Alerts are cleared with dismissalert once addressed, and checkhealth -svc produces the consolidated health report that HPE support requests when opening a case.

cli% checkhealth -svc              # service-level health summary
cli% checkhealth -svc -detail      # with per-component detail
cli% dismissalert <alert_id>       # acknowledge / clear an alert

Performance and Statistics Commands

The stat* family samples counters over an interval and prints them, either continuously or for a fixed number of iterations. These are the commands you run while a workload is slow, not after.

statvv           - virtual volume performance
statvlun         - VLUN performance (per volume/per host)
statld           - logical disk performance
statpd           - physical disk performance
statport         - port performance (FC/iSCSI)
statportdev      - port device performance
statcpu          - node CPU utilisation
statcmp          - cache performance (miss ratio, write-back)
statrcopy        - remote copy link performance
srstatvv         - service-level VV statistics
cli% statvv -d 2 VV1               # VV1, 2-second samples, continuous
cli% statvlun -d 5 -rw -ni 6       # 6 samples, include read+write columns
cli% statport -d 5 -ni 12          # port throughput, 12 samples
cli% statpd -d 5 -ni 6             # per-disk IOPS and latency
cli% statcmp -d 5 -ni 6 -d          # cache hit/miss detail
cli% statcpu -d 5 -ni 6            # node CPU busy percent

The -d <secs> flag sets the sample interval and -ni <count> limits it to a fixed number of samples, which is what you want in a script. Reading order when performance is bad: statvlun to find the busy volume, statpd to see whether the backend disks are saturated, statcmp to check whether cache is helping, and statport to rule out a fabric bottleneck. Queue-length and service-time columns matter more than raw IOPS.

Tasks, Schedules and Background Jobs

Long-running operations (volume moves, tunesys, snapshot schedules) are tasks. They continue after your SSH session closes, so being able to list and inspect them is essential.

showtask         - show tasks
showtask -active -d  - show active tasks with detail
showsched        - show scheduled tasks
showvv -sched    - VV snapshot schedule configuration
showcronsys      - scheduled system tasks
cli% showtask -active -d           # what is running right now
cli% showtask -id 42 -d            # one task in detail, incl. progress
cli% showtask -t 60 -active        # filter tasks by type/age
cli% showsched -d                  # scheduled task detail
cli% showvv -sched                 # per-VV snapshot schedules

The task ID printed by a long command (createvv with an offline copy, tunesys, servicemag) is what you feed to showtask -id to follow progress. Many commands accept -nowait to return immediately and hand you a task ID instead of blocking the session.

Users, Domains and Security

showuser         - show user accounts and SSH keys
showdomain       - show domains in the system
showrole         - show roles and their privileges
showdomain -u    - show domain-to-user assignments
showauth         - show authentication configuration (LDAP, local)
showlicense      - licensing state per feature
cli% showuser -d                   # users with roles and domains
cli% showdomain -d                 # domain detail
cli% showrole                      # role-to-privilege mapping
cli% showauth -d                   # LDAP / authentication settings

In multi-tenant arrays, showdomain plus showrole answers "who can see what" without reading the full permission reference. Domain-scoped users see only their own objects, which is why a showvv run as the wrong user can appear to show an incomplete inventory.

Output Filtering, CSV and Scripting

The 3PAR CLI is scriptable, and a handful of global settings change how output is produced.

setclienv csvtable 1     - emit CSV instead of formatted tables
setclienv listnamecol 1  - pad name column for easy parsing
setclienv cli_show_csv 1 - CSV for show command output
setclienv -list          - list current CLI environment settings
cli% setclienv csvtable 1
cli% showvv -csv                   # explicit CSV output
cli% showpd -csv
cli% showvlun -csv
cli% setclienv -list | more        # current settings
cli% showvv -v -csv > vvlist.csv   # redirect inside the shell

For inventory reporting, CSV output piped through the array's shell into a file (then pulled with getrcopy/SCP) is far more reliable than parsing the human-readable table, whose column widths shift with content.

Symptom-to-Command Quick Reference

Symptom or question Start with Then
Is the array healthy? checkhealth -svc showalert -n
Any bad disks? showpd -failed -degraded showpdch -fail, showspare
Host cannot see its LUN showvlun -host <h> -pathsum showportlesb -state, showhost -d
Volume full / thin growth showvv -s showeventlog -min 60
Slow application on one volume statvlun -host <h> statpd, statcmp, statport
What is this array exactly? showsys -d showversion, showpatch
Which volume is on which disk? showpdvv showvvmap, showldch
Remote copy not syncing showrcopy -d showrctransport, showpeer -d
Where did my long command go? showtask -active -d showtask -id <n> -d
Space growth by VV set showvvset -s showvv -perc

Remote Copy and Network Commands

shownet          - show network configuration and status
showrcopy        - show remote copy configuration
showrctransport  - show end-to-end transport for remote copy
showpeer         - show peer (Remote Copy partner) state
showinventory    - show hardware inventory
showtoc          - show system Table of Contents summary
cli% showrcopy -d                  # remote copy groups, targets, state
cli% showrctransport -d            # transport links and latency
cli% shownet -d                    # interfaces, addresses, routes
cli% showpeer -d                   # partner array identity and status

Related Storage Content on This Site

Pair this cheat sheet with the practical HPE 3PAR administration workflows article, the HPE 3PAR error codes and checkhealth troubleshooting guide, the 3PAR disk replacement and servicemag workflow, and FC vs iSCSI SAN comparison. If you also run NetApp or Brocade gear, the NetApp ONTAP CLI cheat sheet and Brocade SAN switch commands follow the same task-grouped format.

原文链接:https://www.spectra.com/hpe-3par-common-cli-command-line-interface-commands