How to Use the Oracle Solaris Check Script (solaris-check)

solaris-check-v1.2.0.sh is ITCheckAI's read-only host check script for Oracle Solaris, supporting Solaris 10 and 11 on both SPARC and x86 platforms (running as root in the global zone is recommended). It collects system configuration (including beadm boot environments and dumpadm crash dump settings), hardware and FMA fault records, ZFS (including key pool properties and capped history) / SVM storage, Fibre Channel HBA ports (fcinfo), networking, SMF services, system logs, and performance snapshots, embeds a lightweight check.json manifest (schema itcheck.solaris.check/1) with 20-class streaming credential redaction, and writes /var/tmp/<hostname>.<serial>.check-<timestamp>.tar.gz (or .tar.Z when gzip is unavailable). Performance sampling runs for roughly 60 seconds (skippable via --skip-perf), and a full run typically finishes in 1 to 3 minutes.

Script Overview

The current release is version 1.2.0, distributed as solaris-check-v1.2.0.sh (schema itcheck.solaris.check/1) using the /usr/bin/ksh interpreter, with all commands written in plain text for easy review before execution. Key design characteristics implemented in the script:

  • Read-only collection: Executes only query utilities such as prtdiag, fmadm faulty, zpool status, and svcs, along with cat / tail on configuration and log files, without changing any system settings; the only writes occur under the output directory to build the staging directory and archive.
  • Built-in commands first: Optional tools such as sneep, ipmitool, metastat, mpathadm, and vxdisk (Veritas) are recorded as command_missing if absent without interrupting the rest of the run.
  • Per-command timeouts, local df, and exact status tracking: Uses a portable ksh watchdog (default 30s for regular commands, 90s for performance) and prefers df -lh to avoid hung NFS mounts; each file begins with ### <command> and records exact exit code, duration, original host timezone timestamps, and status in check.json.
  • Solaris 10 and 11 compatibility: Commands from both generations are invoked side by side (showrev -p and pkg list, ifconfig -a and dladm / ipadm), preferring /usr/xpg4/bin/awk or nawk when present.
  • Non-root tagging and 20-class credential redaction: Non-root runs emit warning.txt and mark restricted items permission_denied; never reads /etc/shadow, /etc/passwd, SNMP configs, or private keys; process tables collect comm basenames only (no raw args), crontab -l keeps schedule and executable basenames only ([args omitted]), and all outputs pass through a streaming 20-class redactor.

Download link: Download solaris-check-v1.2.0.sh. Scripts for other operating systems are available on the OS Check Toolkit page.

What Is Collected

The script first records the original date string in date.log at the archive root, populates matching subdirectories for each category below, and writes check.json. Commands listed in the table match the script verbatim; items with | head or | tail preserve true command exit codes before truncating lines.

CategoryCollected InformationPrimary Commands / Files
System (system)OS release, kernel and architecture, instruction set, uptime and last boot time, OBP / boot parameters, Solaris 11 boot environments (automatically marked command_missing on Solaris 10), crash dump settings, redacted crontab summary, Zones inventory, patches and packagescat /etc/release, uname -a, isainfo -v, uptime; who -b, eeprom, beadm list, dumpadm, crontab -l (schedule & basename only), zoneadm list -cv, showrev -p | tail -n 100, pkg list | head -n 200
Hardware (hardware)Device tree and properties, hardware diagnostics, processors, memory size, hot-plug attachment points, FMA active faults and fault log, IPMI SEL entriesprtconf -v | head -n 800, prtdiag -v, psrinfo -v; psrinfo -pv, prtconf | grep -i memory, cfgadm -al, fmadm faulty -a, fmdump | tail -n 100, ipmitool sel elist | tail -n 100
Storage (storage)Disk list, disk error counters, ZFS pool health, key health properties (health, capacity, dedupratio, autoreplace, failmode), capped pool history (last 80 lines plus recent scrub events with encryption key paths masked) and datasets, Solaris Volume Manager (SVM) volumes, local filesystem usage, mount table and vfstab, swap usage, MPxIO multipathing, Fibre Channel HBA ports and link state, Veritas disksprintf '\n' | format, iostat -En, zpool status -v, zpool list; zfs list, zpool get all (key properties), zpool history | tail -n 80, metastat -c, metastat | head -n 200, df -lh (fallback df -h), mount -p, cat /etc/vfstab, swap -l; swap -s, mpathadm list lu, fcinfo hba-port, vxdisk -o alldgs list
Network (network)Interface addresses, physical links / datalinks / link aggregations, IP address objects, routing table, interface packet/error counters, sockets and listening ports, DNS and host resolution orderifconfig -a, dladm show-phys, dladm show-link, dladm show-aggr, ipadm show-addr, netstat -rn, netstat -in, netstat -an | head -n 300, cat /etc/resolv.conf, grep hosts /etc/nsswitch.conf
Services (services)SMF services in degraded/maintenance state with explanations, all SMF services (first 300 lines)svcs -xv, svcs -a | head -n 300
Logs (logs)System messages, su switch log, kernel message buffer (stream-redacted)tail -n 500 /var/adm/messages, tail -n 100 /var/adm/sulog, dmesg | tail -n 300
Performance (performance)Memory and CPU activity, extended disk I/O statistics, per-CPU statistics, sar activity, top processes via prstat, top 10 processes by CPU and memory (comm basenames only, args omitted)vmstat 3 10, iostat -xnz 3 5, mpstat 3 3, sar 3 5, prstat -n 15 3 2, ps -eo pcpu,pid,user,comm | sort -rn | head -n 11, ps -eo pmem,pid,user,comm | sort -rn | head -n 11

Prerequisites

  • Privileges: Running as root is recommended (log in as an administrative user and switch via su - on Solaris 11). Non-root execution is also supported: the bundle includes warning.txt and tags restricted checks as permission_denied.
  • Run in the global zone: Inside a non-global zone, hardware and physical storage commands such as prtdiag, fmadm, cfgadm, and format are unavailable or restricted to the zone's virtualized view; always run full host checks from the global zone.
  • Free space in output directory: Defaults to /var/tmp (configurable via CLI or ITCHECK_OUT_DIR). Keep at least tens of megabytes free, checking beforehand with df -h /var/tmp.
  • Execution window: Performance sampling runs for roughly 1 minute with minimal overhead; avoid peak batch windows or pass --skip-perf for configuration-only collection.

Step-by-Step Usage

  1. Download the script from the link above in your browser, or fetch it from an admin workstation with curl (replace <site> with this site's domain):
curl -o solaris-check-v1.2.0.sh https://<site>/tools/os-check/download/solaris/
  1. Upload the script to the target host over scp or sftp (shown using administrative user admin):
scp solaris-check-v1.2.0.sh admin@192.168.1.10:/var/tmp/
  1. Log in to the host, elevate to root, and execute the script with ksh:
ssh admin@192.168.1.10
su -
ksh /var/tmp/solaris-check-v1.2.0.sh
# Example final line printed on the terminal:
# Check data saved to /var/tmp/host01.SN123.check-20261130_100000.tar.gz
  1. Because the archive is created with umask 077 (mode 0600), adjust permissions if pulling with a non-root admin account, then download it to your workstation:
# On the Solaris host (as root)
chmod 644 /var/tmp/host01.*.check-*.tar.gz
# On your admin workstation
mkdir -p results
scp admin@192.168.1.10:/var/tmp/host01.*.check-*.tar.gz ./results/
  1. Once verified locally, remove the script and archive from the host:
rm -f /var/tmp/solaris-check-v1.2.0.sh /var/tmp/host01.*.check-*.tar.*

Parameters

ParameterRequiredDescription
[output-dir] / --out-dir DIROptionalOutput directory; defaults to /var/tmp (honors ITCHECK_OUT_DIR).
--cmd-timeout SECOptionalPer-command timeout in seconds; defaults to 30 (honors ITCHECK_CMD_TIMEOUT).
--perf-timeout SECOptionalPerformance sampling command timeout in seconds; defaults to 90 (honors ITCHECK_PERF_TIMEOUT).
--max-item-bytes NOptionalMaximum bytes retained per collected item; defaults to 1048576 (1 MiB).
--skip-perfOptionalSkips live vmstat / iostat / mpstat / sar / prstat sampling (honors ITCHECK_SKIP_PERF=1).
--version / -h, --helpOptionalPrints script version and schema or usage help, then exits with code 0.

Output Reference

The generated archive is named <output-dir>/<hostname>.<serial>.check-<YYYYMMDD_HHMMSS>.tar.gz:

  • <hostname> comes from hostname, falling back to unknown on failure.
  • <serial> is taken first from the first line of sneep, then from chassis-sn in prtconf -pv (with spaces and slashes stripped), or NotAvailable if neither yields a value (common on some x86 systems).
  • Files are staged under umask 077 with check.json and removed once tar and compression succeed; if gzip is available, the tarball is compressed to .tar.gz, otherwise compress produces .tar.Z.

Extracting the archive yields the following directory layout, where each .log file starts with ### <command>:

host01.SN123.check-20261130_100000/
├── date.log
├── check.json   # lightweight metadata manifest (schema itcheck.solaris.check/1)
├── warning.txt       # created only on non-root runs
├── system/       release.log  uname.log  isainfo.log  uptime.log  eeprom.log
│                 beadm.log  dumpadm.log  crontab.log  zones.log  patches.log
├── hardware/     prtconf.log  prtdiag.log  psrinfo.log  memory.log  cfgadm.log
│                 fmadm.log  fmdump.log  ipmitool.log
├── storage/      format.log  iostat-e.log  zpool-status.log  zpool-list.log
│                 zpool-properties.log  zpool-history.log  metastat.log  df.log
│                 mount.log  vfstab.log  swap.log  mpathadm.log  fcinfo.log
│                 vxdisk.log
├── network/      ifconfig.log  dladm.log  ipadm.log  netstat-rn.log
│                 netstat-in.log  netstat-an.log  resolv.log
├── services/     svcs-failed.log  svcs-all.log
├── logs/         messages.log  sulog.log  dmesg.log
└── performance/  vmstat.log  iostat.log  mpstat.log  sar.log  prstat.log
                  top10cpu.log  top10mem.log

During execution, the terminal prints progress lines such as Collecting system information ... and Collecting performance snapshot (about 60 seconds) ..., ending with Check data saved to ... and the full archive path.

Exit codes: Returns 0 once the .tar.gz (or .tar.Z) archive is created and non-empty, after removing the staging directory and printing the archive path; returns 2 for invalid CLI arguments; returns 1 while removing any partial archive, preserving the staging directory and omitting the saved message if directory creation or tar / gzip / compress fails.

Key Points for Reviewing Results

  • Manifest first: Review collection.is_root and collection.counts in check.json for any timeout, permission_denied, or command_missing entries.
  • Fault Management Architecture (FMA) first: Any active faults in hardware/fmadm.log (which list affected FRUs, fault classes, and recommended actions) take top priority; check fmdump.log for the recent diagnostic event timeline.
  • SMF services: Any output in services/svcs-failed.log (svcs -xv) indicates services in maintenance or degraded state along with their log file paths and impact.
  • ZFS and SVM health: In storage/zpool-status.log, look for DEGRADED, FAULTED, or UNAVAIL states and any non-zero READ, WRITE, or CKSUM counters; review health, capacity, dedupratio, autoreplace, and failmode in storage/zpool-properties.log and recent scrub or pool operations in storage/zpool-history.log; in metastat.log, check for Needs maintenance.
  • Disk errors, Fibre Channel, and boot/dump posture: Growing Hard Errors or Transport Errors in storage/iostat-e.log typically point to failing media or HBA/SAN link issues; verify FC HBA ports are online at expected speed in storage/fcinfo.log, and verify active boot environments and crash dump targets in system/beadm.log and system/dumpadm.log.
  • Multipathing and attachment points: Check mpathadm.log for logical units whose operational path count is lower than total paths, and cfgadm.log for components marked failed or unusable.
  • Capacity and swap: As a general industry recommendation, keep filesystem and ZFS pool capacity in df.log and zpool-list.log below 80%, and watch swap.log for persistently low available swap indicating memory pressure.
  • Networking: Check dladm.log for physical links in down state and netstat-in.log for elevated Ierrs / Oerrs interface counters.
  • System logs: Scan logs/messages.log for keywords such as WARNING, panic, offline, and retryable.

ITCheckAI does not currently provide automated parsing reports for Solaris check archives, so review the collected logs manually using the checkpoints above.

Batch Check

For multiple Solaris hosts, distribute and run the script with an SSH loop from an admin workstation. The example below assumes key-based root SSH access; if direct root login is disabled, connect with an admin account and invoke sudo or pfexec instead:

# hosts.txt: one IP or hostname per line
mkdir -p results
for h in $(cat hosts.txt); do
  scp solaris-check-v1.2.0.sh root@$h:/var/tmp/ && \
  ssh root@$h "ksh /var/tmp/solaris-check-v1.2.0.sh" && \
  scp root@$h:/var/tmp/*.check-*.tar.* results/ && \
  ssh root@$h "rm -f /var/tmp/solaris-check-v1.2.0.sh /var/tmp/*.check-*.tar.*"
done

In environments managed with Ansible, use the script module (which does not require Python on remote targets) to push and run the collector, then retrieve archives from /var/tmp as shown above:

ansible all -i hosts.txt -m script -a "solaris-check-v1.2.0.sh" --become

Notes and Caveats

Note: The check archive contains host configurations, network settings, zone inventories, and system logs. Store and transfer it in accordance with your organization's security policies and avoid sending it to uncontrolled environments.

  • Files accessed and credential redaction boundary: The script never reads /etc/shadow, /etc/passwd, SNMP configs, or private keys. Direct file reads are limited to /etc/release, /etc/vfstab, /etc/resolv.conf, /etc/nsswitch.conf (hosts lines only), /var/adm/messages, and /var/adm/sulog. Process top lists use comm basenames only (no raw args), crontab -l emits schedule and executable basename only, and all outputs pass through a 20-class streaming redactor.
  • Actual sampling duration: vmstat 3 10, iostat -xnz 3 5, mpstat 3 3, sar 3 5, and prstat -n 15 3 2 run sequentially for roughly 1 minute in total; pass --skip-perf when live sampling is not needed.
  • Timeout and NFS protection: df prefers local-only df -lh to skip remote mounts and every command is guarded by the per-command timeout watchdog; scratch directories are cleaned automatically on interruption.
  • Difference from Oracle Explorer: Official Oracle collection tools such as Oracle Explorer (bundled in Oracle Services Tools Bundle alongside sneep) and supportfiles gather exhaustive diagnostic data for vendor support cases and produce large archives. This script collects only concise, plain-text data needed for routine health checks; use Oracle's official collector when opening an Oracle SR.
46 views Updated 2026-11-19

More in this groupOS Check Scripts

View all 6 in this group

Can't find an answer?

Upload a log for AI diagnosis, or ask the AI assistant directly in the console.