performance
IBM i Performance Monitoring
Monitor system performance including collection services configuration, temporary storage usage, disk I/O metrics, and memory pool performance using SQL services from QSYS2.
Available Tools
The ibmi CLI is the primary tool for executing performance 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/performance, ~/.claude/skills/performance
# List all performance tools
ibmi tools --tools "$SKILL_DIR/tools/" --toolset performance_default
# Run a specific tool
ibmi tool get_collection_services_config --tools "$SKILL_DIR/tools/"
# Ad-hoc SQL for custom queries
ibmi sql "SELECT * FROM QSYS2.COLLECTION_SERVICES_INFO"
The ibmi-mcp-server also provides execute_sql and describe_sql_object for MCP-connected agents.
Service Selection Guide
Collection Services
- QSYS2.COLLECTION_SERVICES_INFO -- Configuration, intervals, retention, categories
Temporary Storage
- QSYS2.SYSTMPSTG -- Temporary storage per bucket and per job
Disk I/O
- QSYS2.SYSDISKSTAT -- Elapsed I/O statistics per disk unit
Memory Performance
- QSYS2.MEMORY_POOL() -- Page faults, thread transitions, tuning settings
Key Capabilities
Collection Services Management
- Configuration -- Active collection, library, profile, intervals
- Categories -- What data categories are collected and at what interval
- Retention -- How long performance data is kept
- Monitoring -- Whether system monitoring is enabled
Temporary Storage Analysis
- Named Buckets -- System-level named temporary storage areas with current/peak sizes
- Unnamed Storage -- Aggregate usage of unnamed temporary storage
- Per-job Usage -- Which jobs consume the most temporary storage
- Limit Tracking -- Job-level storage limits vs current usage
Disk I/O Performance
- Per-unit Metrics -- Read/write requests, data transferred, busy percentage
- Elapsed Statistics -- I/O during the measurement interval
- Hot Spots -- Identify the busiest disk units
Memory Pool Performance
- Fault Rates -- Database and non-database page faults per pool
- Thread Transitions -- Active-to-wait, wait-to-ineligible counts
- Tuning Parameters -- Priority, min/max size, fault thresholds
Common Use Cases
- Collection services audit -- Verify performance data is being collected
- Temp storage investigation -- Find jobs using excessive temporary storage
- Named bucket monitoring -- Track system temp storage bucket growth
- Disk I/O hot spots -- Identify the busiest disk units
- Memory pressure detection -- Find pools with high page fault rates
- Performance baseline -- Capture metrics for trend analysis
- Capacity planning -- Analyze storage and I/O trends
Quick Examples
Check collection services configuration
ibmi tool get_collection_services_config --tools "$SKILL_DIR/tools/"
View collection categories
ibmi tool get_collection_categories --tools "$SKILL_DIR/tools/"
Top temp storage consumers by job
ibmi tool get_temp_storage_by_job --tools "$SKILL_DIR/tools/"
Disk I/O performance
SELECT UNIT_NUMBER, ASP_NUMBER,
ELAPSED_READ_REQUESTS, ELAPSED_WRITE_REQUESTS,
ELAPSED_PERCENT_BUSY
FROM QSYS2.SYSDISKSTAT
WHERE ELAPSED_IO_REQUESTS > 0
ORDER BY ELAPSED_PERCENT_BUSY DESC
FETCH FIRST 10 ROWS ONLY;
Named temp storage buckets
SELECT GLOBAL_BUCKET_NAME, BUCKET_CURRENT_SIZE, BUCKET_PEAK_SIZE
FROM QSYS2.SYSTMPSTG
WHERE GLOBAL_BUCKET_NAME IS NOT NULL
ORDER BY BUCKET_CURRENT_SIZE DESC;
Pre-built Tools
The tools/performance.yaml file provides 7 ready-to-use tools:
| Tool | Description |
|---|---|
get_collection_services_config |
Collection services configuration and settings |
get_collection_categories |
Collection categories with their intervals |
get_temp_storage_buckets |
Named temporary storage bucket usage |
get_unnamed_temp_storage |
Aggregate unnamed temporary storage usage |
get_temp_storage_by_job |
Temporary storage consumption by job |
get_disk_io_performance |
Disk I/O performance stats per unit |
get_memory_pool_performance |
Memory pool fault rates and tuning metrics |
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
- Performance Services Catalog -- Available SQL services
- Example SQL Patterns -- Working query examples
- IBM COLLECTION_SERVICES_INFO -- View documentation
- IBM SYSTMPSTG -- View 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