system-health
IBM i System Health Monitoring
Monitor system health including CPU, memory, disk, ASPs, system limits, and network status using SQL services from QSYS2.
Available Tools
The ibmi CLI is the primary tool for executing system health 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/system-health, ~/.claude/skills/system-health
# List all system health tools
ibmi tools --tools "$SKILL_DIR/tools/" --toolset system_health_default
# Run a specific tool
ibmi tool get_system_status --tools "$SKILL_DIR/tools/"
# Ad-hoc SQL for custom queries
ibmi sql "SELECT * FROM TABLE(QSYS2.SYSTEM_STATUS(RESET_STATISTICS => 'YES')) X"
The ibmi-mcp-server also provides execute_sql and describe_sql_object for MCP-connected agents.
Service Selection Guide
System Status & Activity
- QSYS2.SYSTEM_STATUS() -- Comprehensive system metrics: CPU, memory, jobs, partition info
- QSYS2.SYSTEM_ACTIVITY_INFO() -- Real-time CPU utilization rates
Memory
- QSYS2.MEMORY_POOL() -- Pool sizes, threads, paging rates, tuning parameters
Disk & Storage
- QSYS2.SYSDISKSTAT -- Disk unit capacity, usage, I/O stats per unit
- QSYS2.ASP_INFO -- ASP capacity, thresholds, balance status
System Limits
- QSYS2.SYSLIMITS -- System limits with current vs maximum values
- QSYS2.SYSLIMITS_BASIC -- Lightweight limits view
Network
- QSYS2.NETSTAT_INFO -- TCP/IP connections, addresses, ports, transfer counts
Key Capabilities
CPU Monitoring
- Overall Utilization -- Average, minimum, maximum CPU percentages
- Capacity Info -- Configured CPUs, current capacity, sharing attributes
- Elapsed Metrics -- CPU used during measurement interval
Memory Analysis
- Pool Status -- Current size, defined size, reserved, thread counts
- Page Faults -- Database and non-database fault rates per pool
- Thread Activity -- Active, ineligible, and maximum threads per pool
- Tuning -- Priority, min/max size, min/max faults settings
Disk & ASP Health
- Disk Units -- Capacity, percent used, type, protection, I/O busy %
- ASP Status -- Total/available capacity, threshold, balance status
- Protected vs Unprotected -- Breakdown of storage by protection type
System Limits
- Threshold Monitoring -- Find limits approaching maximum values
- Capacity Planning -- Current vs maximum with percentage used
- Category Filtering -- Filter by limit type and category
Network Status
- Active Connections -- Established TCP connections with addresses and ports
- Connection Counts -- Total remote connections excluding loopback
- Transfer Stats -- Bytes sent/received per connection
Common Use Cases
- System health check -- Quick overview of CPU, memory, jobs, and storage
- CPU troubleshooting -- Identify high CPU utilization periods
- Memory pressure -- Find pools with high page fault rates
- Disk capacity planning -- Monitor ASP usage and thresholds
- Limit monitoring -- Find system limits approaching maximum
- Network audit -- Review active TCP connections
- Performance baseline -- Capture system metrics for comparison
- IPL planning -- Check system status before maintenance windows
Quick Examples
System status overview
ibmi tool get_system_status --tools "$SKILL_DIR/tools/"
Memory pool health
ibmi tool get_memory_pools --tools "$SKILL_DIR/tools/"
Find limits above 80% used
ibmi tool get_system_limits --tools "$SKILL_DIR/tools/" pct_threshold=80
ASP capacity check
SELECT ASP_NUMBER, TOTAL_CAPACITY, TOTAL_CAPACITY_AVAILABLE,
STORAGE_THRESHOLD_PERCENTAGE
FROM QSYS2.ASP_INFO
ORDER BY ASP_NUMBER;
Disk units by busy percentage
SELECT UNIT_NUMBER, ASP_NUMBER, PERCENT_USED, ELAPSED_PERCENT_BUSY
FROM QSYS2.SYSDISKSTAT
WHERE ELAPSED_PERCENT_BUSY > 0
ORDER BY ELAPSED_PERCENT_BUSY DESC
FETCH FIRST 10 ROWS ONLY;
Pre-built Tools
The tools/system-health.yaml file provides 8 ready-to-use tools:
| Tool | Description |
|---|---|
get_system_status |
Comprehensive system status: CPU, memory, jobs, partition |
get_system_activity |
Real-time CPU utilization rates |
get_memory_pools |
Memory pool sizes, threads, and paging metrics |
list_disk_units |
Disk unit capacity, usage, type, and I/O stats |
list_asp_info |
ASP capacity, thresholds, and balance status |
get_system_limits |
System limits with percentage used filtering |
get_tcp_connections |
Established TCP/IP connections with transfer stats |
count_remote_connections |
Count of remote connections excluding loopback |
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
- System Health Services Catalog -- Available SQL services
- Example SQL Patterns -- Working query examples
- IBM SYSTEM_STATUS -- Table function documentation
- IBM SYSLIMITS -- View documentation
More from ajshedivy/ibmi-agent-skills
database-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.
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.
3performance
Monitor IBM i performance including collection services, temporary storage, disk I/O metrics, and memory pool performance via SQL services. Use when user asks about: (1) collection services configuration or categories, (2) temporary storage usage by bucket or job, (3) disk I/O performance per unit, (4) memory pool page fault rates, (5) performance data collection settings, (6) replacing WRKSYSSTS performance views, or (7) any performance analysis or capacity planning task.
3ptf
Monitor and analyze PTFs, PTF groups, and system patching status on IBM i via SQL services. Use when user asks about: (1) PTF group currency or update status, (2) finding outdated or critical PTF groups, (3) individual PTF details by product, (4) installed PTF group levels, (5) defective PTF checks, (6) PTF patching summaries, (7) replacing DSPPTF, WRKPTFGRP commands, or (8) any PTF management or compliance task.
2java
Monitor Java Virtual Machines running on IBM i including heap memory usage, garbage collection activity, thread counts, and JVM configuration. Use when user asks about: (1) active JVMs on the system, (2) JVM heap or memory consumption, (3) garbage collection performance, (4) Java thread counts, (5) JVM home directories or properties, (6) identifying JVMs at risk of OutOfMemoryError, or (7) replacing WRKJVMJOB command output.
2