communication
IBM i Communication & Network Services
Monitor and analyze network and communication resources on IBM i using SQL services from QSYS2.
Available Tools
The ibmi CLI is the primary tool for executing network 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/communication, ~/.claude/skills/communication
ibmi tools --tools "$SKILL_DIR/tools/" --toolset communication_default
ibmi tool get_netstat_info --tools "$SKILL_DIR/tools/"
ibmi sql "SELECT * FROM QSYS2.NETSTAT_INFO WHERE TCP_STATE = 'ESTABLISHED' FETCH FIRST 20 ROWS ONLY"
The ibmi-mcp-server also provides execute_sql and describe_sql_object for MCP-connected agents.
Service Selection Guide
Network Connections
- QSYS2.NETSTAT_INFO — Active connections with bytes, addresses, ports, state
- QSYS2.NETSTAT_JOB_INFO — Network jobs associated with connections
- QSYS2.NETSTAT_INTERFACE_INFO — Network interface configuration and status
- QSYS2.NETSTAT_ROUTE_INFO — TCP/IP routing table
Server & Configuration
- QSYS2.HTTP_SERVER_INFO — HTTP server instances, ports, and status
- QSYS2.TCPIP_INFO — TCP/IP stack configuration (hostname, DNS, version)
- QSYS2.NETWORK_ATTRIBUTE_INFO — System-level network attributes
- QSYS2.TIME_PROTOCOL_INFO — NTP/SNTP server configuration and sync status
Key Capabilities
Network Monitoring
- List active connections sorted by traffic volume
- Identify busiest remote addresses and ports
- Monitor connection states (ESTABLISHED, LISTEN, etc.)
- Track bytes sent and received per connection
Interface & Routing
- View all network interfaces with IP addresses and status
- Check subnet masks, MTU, and line descriptions
- Review routing table entries and precedence
- Identify active vs inactive interfaces
Server Management
- List HTTP server instances with status and ports
- Check autostart configuration
- View server root directories and descriptions
Configuration Review
- Retrieve hostname, domain, and DNS settings
- Check network authentication parameters
- Verify NTP/SNTP time synchronization status
Common Use Cases
1. Connection Analysis
Identify active network connections and top bandwidth consumers
2. Network Troubleshooting
Check interface status, routing, and connection states
3. HTTP Server Monitoring
Verify web server status and port assignments
4. DNS & Network Config
Review TCP/IP settings, hostname, and DNS configuration
5. Time Sync Verification
Check NTP/SNTP server connectivity and synchronization
6. Security Audit
Identify unexpected remote connections or open ports
CL Command Migration
| CL Command | SQL Service |
|---|---|
| NETSTAT | NETSTAT_INFO + NETSTAT_INTERFACE_INFO |
| WRKTCPSTS | NETSTAT_INFO + NETSTAT_JOB_INFO |
| CFGTCP (display) | NETWORK_ATTRIBUTE_INFO + TCPIP_INFO |
| WRKHTTPSRVR | HTTP_SERVER_INFO |
Quick Examples
List established connections
SELECT REMOTE_ADDRESS, REMOTE_PORT, LOCAL_PORT, BOUND_USER,
BYTES_SENT_REMOTELY, BYTES_RECEIVED_LOCALLY
FROM QSYS2.NETSTAT_INFO
WHERE TCP_STATE = 'ESTABLISHED'
ORDER BY BYTES_SENT_REMOTELY DESC
FETCH FIRST 20 ROWS ONLY;
Check network interfaces
SELECT INTERNET_ADDRESS, LINE_DESCRIPTION, INTERFACE_STATUS
FROM QSYS2.NETSTAT_INTERFACE_INFO
ORDER BY INTERFACE_STATUS;
View HTTP servers
SELECT SERVER_NAME, SERVER_STATUS, LISTENING_PORT, AUTOSTART
FROM QSYS2.HTTP_SERVER_INFO
ORDER BY SERVER_STATUS;
Pre-built Tools
The tools/communication.yaml file provides 8 ready-to-use tools:
| Tool | Description |
|---|---|
get_netstat_info |
Active network connections with traffic |
get_netstat_interface_info |
Network interfaces and IP addresses |
get_netstat_job_info |
Network jobs and their connections |
get_netstat_route_info |
TCP/IP routing table |
get_http_server_info |
HTTP server instances and status |
get_tcpip_info |
TCP/IP stack configuration |
get_network_attribute_info |
System network attributes |
get_time_protocol_info |
NTP/SNTP time server 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
- Communication Services Catalog — All COMMUNICATION services
- Communication Examples — Working SQL examples
- IBM i Services - Communication — 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.
12template-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.
3database-utility
Manage and analyze IBM i database files, members, partitions, and objects using SQL services. Use when user asks about: (1) file inventory or file attributes in a library, (2) member or partition statistics like row counts, deleted rows, or data sizes, (3) object statistics including last used dates and sizes, (4) catalog health analysis or cross-reference checks, (5) comparing files between libraries, (6) finding objects that depend on a file, (7) validating data integrity, or (8) finding unused objects for cleanup.
2message-handling
Read and analyze message queues, system history log, reply lists, and message file definitions on IBM i via SQL services. Use when user asks about: (1) reading QSYSOPR or other message queues, (2) searching the system history log (QHST), (3) finding high-severity messages, (4) viewing the system reply list, (5) looking up message definitions (CPF, MCH, SQL messages), (6) message severity analysis, (7) replacing DSPMSG, DSPLOG, WRKMSGQ commands, or (8) any message handling or troubleshooting task.
2