mirror
IBM i Db2 Mirror Monitoring
Monitor Db2 Mirror replication, cluster topology, NRG communication, RDMA links, replication criteria, and diagnostics using QSYS2 SQL services.
Available Tools
The ibmi CLI is the primary tool for mirror monitoring. 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/mirror, ~/.claude/skills/mirror
ibmi tools --tools "$SKILL_DIR/tools/" --toolset mirror_default
ibmi tool list_mirror_status --tools "$SKILL_DIR/tools/"
ibmi sql "SELECT IASP_NAME, REPLICATION_STATE FROM QSYS2.MIRROR_INFO"
Service Selection Guide
Product Status (MIRROR-PRODUCT)
- QSYS2.MIRROR_INFO -- Replication state, node roles, auto-resume
- QSYS2.MIRROR_CLUSTER_INFO -- Cluster topology and IP addresses
- QSYS2.MIRROR_HEALTH_MONITOR_INFO -- Health monitor configuration
- QSYS2.MIRROR_TAKEOVER_INFO -- Takeover IP groups and addresses
- QSYS2.MIRROR_VERSION_LIST -- Version compatibility tracking
- QSYS2.MIRROR_OBJECTCONNECT_INFO -- ObjectConnect subsystem state
Communication (MIRROR-COMMUNICATION)
- QSYS2.NRG_INFO -- Network redundancy group configuration and stats
- QSYS2.NRG_LINK_INFO -- Individual NRG link state and priority
- QSYS2.RDMA_LINK_INFO -- RDMA link traffic and error statistics
- QSYS2.RDMA_CONNECTION_INFO -- RDMA connection details
Replication (MIRROR-REPLICATION)
- QSYS2.REPLICATION_CRITERIA_INFO -- Inclusion/exclusion rules
Reclone (MIRROR-RECLONE)
- QSYS2.CONFIRM_RECLONE_SECURITY_OBJECTS -- Security objects for reclone
Serviceability (MIRROR-SERVICEABILITY)
- QSYS2.MIRROR_FLIGHT_RECORDER_INFO -- Flight recorder config and logging levels
Key Capabilities
Replication Health
- Status Check -- Replication state per IASP (ACTIVE, SUSPENDED, etc.)
- Node Roles -- Primary/secondary node identification
- Auto-Resume -- Whether replication auto-resumes after interruption
- NRG State -- Network redundancy group health
Cluster Topology
- Node Info -- Cluster name, device domain, node names
- IP Addresses -- Primary and secondary IPs for each node
- Takeover Groups -- IP takeover configuration and current placement
- Version Tracking -- Mirror version compatibility between nodes
Communication Monitoring
- NRG Health -- Link counts, active links, load balancing
- NRG Links -- Individual link state, priority, and type
- RDMA Traffic -- Bytes in/out, message counts, error statistics
- Link Failures -- Dropped packets, sequence errors
Replication Management
- Criteria Rules -- Which objects are included or excluded
- Rule State -- Applied vs pending criteria
- Reclone Readiness -- Security objects that need confirmation
Common Use Cases
- Health check -- Verify replication is active and healthy
- Topology review -- Understand cluster nodes and IPs
- Network diagnosis -- Check NRG/RDMA link status and errors
- Takeover readiness -- Verify IP groups on preferred nodes
- Replication audit -- Review inclusion/exclusion criteria
- Version check -- Ensure mirror versions are compatible
- Diagnostics -- Review flight recorder settings
Quick Examples
Check replication status
ibmi tool list_mirror_status --tools "$SKILL_DIR/tools/"
View cluster topology
ibmi tool list_mirror_cluster --tools "$SKILL_DIR/tools/"
Check NRG link health
ibmi tool list_nrg_links --tools "$SKILL_DIR/tools/"
Review replication criteria
ibmi tool list_replication_criteria --tools "$SKILL_DIR/tools/"
Pre-built Tools
The tools/mirror.yaml file provides 12 ready-to-use tools:
| Tool | Description |
|---|---|
list_mirror_status |
Replication state per IASP |
list_mirror_cluster |
Cluster topology and IPs |
list_mirror_health_monitor |
Health monitor configuration |
list_mirror_takeover |
Takeover IP groups |
list_mirror_versions |
Version compatibility tracking |
list_nrg_info |
NRG configuration and stats |
list_nrg_links |
Individual NRG link state |
list_rdma_links |
RDMA link traffic and errors |
list_replication_criteria |
Inclusion/exclusion rules |
list_mirror_flight_recorder |
Flight recorder config |
list_confirm_reclone_security |
Reclone security objects |
get_mirror_objectconnect_info |
ObjectConnect state |
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
- Mirror Services Catalog -- All mirror SQL services
- Example SQL Patterns -- Working query examples
- Mirror Product -- MIRROR-PRODUCT services
- Mirror Communication -- MIRROR-COMMUNICATION services
- Mirror Replication -- MIRROR-REPLICATION services
- Mirror Reclone -- MIRROR-RECLONE services
- Mirror Serviceability -- MIRROR-SERVICEABILITY services
- Mirror Resynchronization -- MIRROR-RESYNCHRONIZATION services
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.
4template-skill
Replace with description of the skill and when Claude should use it.
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.
3product
Query IBM i software products, licensing, and product health via SQL services. Use when user asks about: (1) installed software products and versions, (2) product details for a specific product ID, (3) software products with load errors, (4) license compliance and usage limits, (5) unsupported or incompatible products, (6) replacing DSPSFWRSC, WRKLICINF, DSPPTF commands, or (7) any software product management task.
2