storage
IBM i Storage Management
Monitor and analyze storage resources on IBM i using SQL services from QSYS2.
Available Tools
The ibmi CLI is the primary tool for executing storage queries. Set SKILL_DIR to this skill's installed location (the directory containing this SKILL.md file):
# SKILL_DIR = directory containing this SKILL.md
# Examples: ./skills/storage, ~/.claude/skills/storage
# List all storage tools
ibmi tools --tools "$SKILL_DIR/tools/" --toolset storage_default
# Run a specific tool
ibmi tool get_asp_info --tools "$SKILL_DIR/tools/"
# Ad-hoc SQL for custom queries
ibmi sql "SELECT * FROM QSYS2.ASP_INFO ORDER BY ASP_NUMBER"
The ibmi-mcp-server also provides execute_sql and describe_sql_object for MCP-connected agents.
Service Selection Guide
ASP Management
- QSYS2.ASP_INFO — ASP capacity, usage %, storage type, disk unit counts
- QSYS2.ASP_JOB_INFO — Jobs active on Independent ASPs
- QSYS2.ASP_VARY_INFO — IASP vary-on/vary-off history and timing
Disk & Hardware
- QSYS2.SYSDISKSTAT (view) — Quick disk status overview
- QSYS2.SYSDISKSTAT (table function) — Detailed I/O counters and response times
- QSYS2.NVME_INFO — NVMe device health, temperature, firmware
- QSYS2.LOCKING_POLICY_INFO — NVMe locking policy status
Storage Consumption
- QSYS2.SYSTMPSTG — Temporary storage usage by job
- QSYS2.USER_STORAGE — Storage used per user profile
Key Capabilities
ASP Health & Capacity
- View all ASPs with capacity, usage percentage, and storage type
- Monitor Independent ASP (IASP) availability and vary operations
- Identify jobs running against specific IASPs before maintenance
Disk Performance
- Check disk utilization percentages across all units
- Identify SSD vs spinning disk storage
- Monitor I/O read/write counters and response times
Storage Consumption Analysis
- Find jobs consuming the most temporary storage
- Identify peak temp storage by job for capacity planning
- Track storage used per user profile and ASP
- Check user storage limits vs actual usage
Hardware Monitoring
- NVMe device inventory with firmware and serial numbers
- Temperature monitoring (controller and composite)
- Available spare capacity and percentage used
- Locking policy status for encrypted storage
Common Use Cases
1. System Storage Overview
Check overall ASP capacity and usage across all pools
2. Disk Health Check
Identify disk units with high utilization or poor I/O response
3. Temp Storage Troubleshooting
Find jobs consuming excessive temporary storage
4. User Storage Audit
Identify top storage consumers and users exceeding limits
5. IASP Maintenance
Check what jobs are active on an IASP before vary-off
6. Hardware Inventory
List NVMe devices with health and firmware status
CL Command Migration
| CL Command | SQL Service |
|---|---|
| WRKDSKSTS | SYSDISKSTAT (view or table function) |
| WRKSYSSTS (storage) | ASP_INFO + SYSTMPSTG |
| WRKSTG | USER_STORAGE |
Quick Examples
Check ASP usage
SELECT ASP_NUMBER, TOTAL_CAPACITY, CURRENT_USAGE_PERCENTAGE
FROM QSYS2.ASP_INFO ORDER BY ASP_NUMBER;
Find top temp storage consumers
SELECT JOB_NAME, JOB_USER_NAME, BUCKET_CURRENT_SIZE, BUCKET_PEAK_SIZE
FROM QSYS2.SYSTMPSTG
WHERE JOB_STATUS = '*ACTIVE'
ORDER BY BUCKET_CURRENT_SIZE DESC
FETCH FIRST 10 ROWS ONLY;
Check disk I/O performance
SELECT RESOURCE_NAME, PERCENT_USED,
SAMPLE_READ_RESPONSE_TIME, SAMPLE_WRITE_RESPONSE_TIME
FROM TABLE(QSYS2.SYSDISKSTAT(RESET_STATISTICS => 'NO'))
ORDER BY SAMPLE_WRITE_RESPONSE_TIME DESC;
Pre-built Tools
The tools/storage.yaml file provides 9 ready-to-use tools:
| Tool | Description |
|---|---|
get_asp_info |
ASP capacity, usage, and storage type |
get_asp_job_info |
Jobs active on Independent ASPs |
get_asp_vary_info |
IASP vary-on/vary-off history |
get_disk_status |
Quick disk utilization overview |
get_disk_status_detailed |
Detailed disk I/O counters |
get_temp_storage |
Temp storage by active job |
get_user_storage |
Storage used per user profile |
get_nvme_info |
NVMe device health and firmware |
get_locking_policy_info |
NVMe locking policy status |
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" # Execute
ibmi tool <tool_name> --tools "$SKILL_DIR/tools/" --dry-run # Preview SQL
ibmi tools show <tool_name> --tools "$SKILL_DIR/tools/" # View details
Reference Documentation
- Storage Services Catalog — All STORAGE category services from SERVICES_INFO
- Storage Examples — Working SQL query examples
- IBM i Services - Storage — IBM documentation
More from ajshedivy/ibmi-agent-skills
work-management
Query, monitor, and analyze jobs on IBM i using SQL table functions via the ibmi CLI. Use when user asks about: (1) finding jobs by status, user, subsystem, or type, (2) monitoring active job performance (CPU, I/O, memory), (3) detecting long-running SQL statements, (4) analyzing lock contention, (5) checking job queues, (6) scheduled jobs, (7) job logs, (8) replacing WRKACTJOB, WRKUSRJOB, WRKSBSJOB, WRKSBMJOB commands, or (9) any IBM i work management task.
12system-health
Monitor IBM i system health including CPU, memory, disk, ASPs, system limits, and network status via SQL services. Use when user asks about: (1) CPU utilization or system status, (2) memory pool sizes or page faults, (3) disk capacity or ASP usage, (4) system limits approaching thresholds, (5) TCP/IP connections and network status, (6) system activity overview, (7) replacing WRKSYSSTS, WRKDSKSTS, WRKTCPSTS commands, or (8) any system health monitoring task.
4database-performance
Monitor IBM i database performance including index statistics, maintained temporary indexes (MTIs), database monitors, query supervisor thresholds, and materialized query tables. Use when user asks about: (1) index usage or unused indexes, (2) maintained temporary indexes and whether to create permanent indexes, (3) database monitor configuration, (4) query supervisor thresholds, (5) MQT statistics and refresh status, or (6) tables with high MTI overhead.
3template-skill
Replace with description of the skill and when Claude should use it.
3skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
3ibmi
Core skill for working with IBM i systems via the ibmi CLI and ibmi-mcp-server. Provides text-to-SQL methodology, iterative querying best practices, schema discovery, and SQL validation patterns for Db2 for i. Use as the foundation for ANY IBM i task — install this skill first, then add domain-specific skills (ibmi-database, ibmi-system) as needed.
3