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, andsvcs, along withcat/tailon 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, andvxdisk(Veritas) are recorded ascommand_missingif 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 prefersdf -lhto avoid hung NFS mounts; each file begins with### <command>and records exact exit code, duration, original host timezone timestamps, and status incheck.json. - Solaris 10 and 11 compatibility: Commands from both generations are invoked side by side (
showrev -pandpkg list,ifconfig -aanddladm/ipadm), preferring/usr/xpg4/bin/awkornawkwhen present. - Non-root tagging and 20-class credential redaction: Non-root runs emit
warning.txtand mark restricted itemspermission_denied; never reads/etc/shadow,/etc/passwd, SNMP configs, or private keys; process tables collectcommbasenames only (no raw args),crontab -lkeeps 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.
| Category | Collected Information | Primary 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 packages | cat /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 entries | prtconf -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 disks | printf '\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 order | ifconfig -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
rootis recommended (log in as an administrative user and switch viasu -on Solaris 11). Non-root execution is also supported: the bundle includeswarning.txtand tags restricted checks aspermission_denied. - Run in the global zone: Inside a non-global zone, hardware and physical storage commands such as
prtdiag,fmadm,cfgadm, andformatare 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 orITCHECK_OUT_DIR). Keep at least tens of megabytes free, checking beforehand withdf -h /var/tmp. - Execution window: Performance sampling runs for roughly 1 minute with minimal overhead; avoid peak batch windows or pass
--skip-perffor configuration-only collection.
Step-by-Step Usage
- 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/- Upload the script to the target host over
scporsftp(shown using administrative useradmin):
scp solaris-check-v1.2.0.sh admin@192.168.1.10:/var/tmp/- Log in to the host, elevate to
root, and execute the script withksh:
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- Because the archive is created with
umask 077(mode0600), 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/- 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
| Parameter | Required | Description |
|---|---|---|
[output-dir] / --out-dir DIR | Optional | Output directory; defaults to /var/tmp (honors ITCHECK_OUT_DIR). |
--cmd-timeout SEC | Optional | Per-command timeout in seconds; defaults to 30 (honors ITCHECK_CMD_TIMEOUT). |
--perf-timeout SEC | Optional | Performance sampling command timeout in seconds; defaults to 90 (honors ITCHECK_PERF_TIMEOUT). |
--max-item-bytes N | Optional | Maximum bytes retained per collected item; defaults to 1048576 (1 MiB). |
--skip-perf | Optional | Skips live vmstat / iostat / mpstat / sar / prstat sampling (honors ITCHECK_SKIP_PERF=1). |
--version / -h, --help | Optional | Prints 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 fromhostname, falling back tounknownon failure.<serial>is taken first from the first line ofsneep, then fromchassis-sninprtconf -pv(with spaces and slashes stripped), orNotAvailableif neither yields a value (common on some x86 systems).- Files are staged under
umask 077withcheck.jsonand removed oncetarand compression succeed; ifgzipis available, the tarball is compressed to.tar.gz, otherwisecompressproduces.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.logDuring 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_rootandcollection.countsincheck.jsonfor anytimeout,permission_denied, orcommand_missingentries. - Fault Management Architecture (FMA) first: Any active faults in
hardware/fmadm.log(which list affected FRUs, fault classes, and recommended actions) take top priority; checkfmdump.logfor the recent diagnostic event timeline. - SMF services: Any output in
services/svcs-failed.log(svcs -xv) indicates services inmaintenanceordegradedstate along with their log file paths and impact. - ZFS and SVM health: In
storage/zpool-status.log, look forDEGRADED,FAULTED, orUNAVAILstates and any non-zeroREAD,WRITE, orCKSUMcounters; reviewhealth,capacity,dedupratio,autoreplace, andfailmodeinstorage/zpool-properties.logand recent scrub or pool operations instorage/zpool-history.log; inmetastat.log, check forNeeds maintenance. - Disk errors, Fibre Channel, and boot/dump posture: Growing
Hard ErrorsorTransport Errorsinstorage/iostat-e.logtypically point to failing media or HBA/SAN link issues; verify FC HBA ports areonlineat expected speed instorage/fcinfo.log, and verify active boot environments and crash dump targets insystem/beadm.logandsystem/dumpadm.log. - Multipathing and attachment points: Check
mpathadm.logfor logical units whose operational path count is lower than total paths, andcfgadm.logfor components markedfailedorunusable. - Capacity and swap: As a general industry recommendation, keep filesystem and ZFS pool capacity in
df.logandzpool-list.logbelow 80%, and watchswap.logfor persistently low available swap indicating memory pressure. - Networking: Check
dladm.logfor physical links indownstate andnetstat-in.logfor elevatedIerrs/Oerrsinterface counters. - System logs: Scan
logs/messages.logfor keywords such asWARNING,panic,offline, andretryable.
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.*"
doneIn 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" --becomeNotes 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(hostslines only),/var/adm/messages, and/var/adm/sulog. Process top lists usecommbasenames only (no raw args),crontab -lemits 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, andprstat -n 15 3 2run sequentially for roughly 1 minute in total; pass--skip-perfwhen live sampling is not needed. - Timeout and NFS protection:
dfprefers local-onlydf -lhto 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) andsupportfilesgather 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.