# IBM i: design note Status: decided 2026-11-14 (Decisions, at the end); all four steps built. Not yet tried against a real partition or HMC (decision 5). John, 2026-11-12: "is there anything we can do for iseries?" Yes. The shops Cairn OBS is aimed at often still run their core business on IBM i (AS/400, iSeries) partitions on Power servers, next to the Linux, Windows and OpenShift estate. Today those partitions are invisible to Cairn OBS. ## What there is now Nothing for IBM i. An agent on it, as on Windows, is a long way off: Go's AIX port might run in PASE (IBM i's AIX runtime), but nobody ships Go programs there that we know of, much of what matters isn't visible from PASE, and installing software on a production IBM i partition is a change most shops make slowly, if at all. What IBM i does have is **SQL services**: IBM ships views and table functions in QSYS2 and SYSTOOLS that answer, in SQL, everything an operator looks at on a green screen (WRKSYSSTS, WRKACTJOB, WRKSBS, DSPMSG QSYSOPR, WRKDSKSTS, WRKJOBQ). Every supported release has them (7.4, 7.5, 7.6), they cost nothing, and they're how IBM i monitoring is done now. So the plan is the same as Pure's and Nutanix's: **a host agent nearby reads each partition over the network, read-only**, and the partition is a source on the same pages as everything else. ## What's read Every minute, one query per line, all SELECTs: | SQL service | Becomes | |---|---| | `QSYS2.SYSTEM_STATUS_INFO_BASIC`: CPU use, system ASP % used, jobs, temporary storage, restricted state, the attention light; `SYSIBMADM.ENV_SYS_INFO` and `QSYS2.GROUP_PTF_INFO`: the release and the Technology Refresh | the partition's own record: "PROD1 · read by mgmt1", "IBM i 7.5 TR6", CPU and storage graphs | | `QSYS2.ASP_INFO` and `SYSDISKSTAT`: each ASP's state and % used, each disk unit's status | parts: a failed ASP is down, one with disk units missing or overflowing into the system ASP is degraded, a disk unit in trouble (failed, not ready, parity being rebuilt, mirroring suspended, an SSD's predictive failure warning) makes its ASP degraded, named on it; ASP % used warns at the ASP's own threshold (IBM i's, not ours). An independent ASP varied off is said, not judged: PowerHA keeps it so on the node that isn't using it | | `QSYS2.SUBSYSTEM_INFO`: each subsystem and whether it's active | parts, as units are on Linux: `expected.yaml` names the subsystems that must be active (`subsystems: [QINTER, QBATCH, ORDERS]`), and obs-beacond judges them; the rest are counted, not alerted on | | `QSYS2.MESSAGE_QUEUE_INFO` for QSYSOPR: inquiry messages of the last 30 days with no reply, and messages of severity 80 and up of the last day | parts, named for the message and the job that sent it ("Unanswered inquiry CPA0701 from 418276/BATCH/NIGHTLY"): an unanswered inquiry is a job in MSGW (decision 2) and warns; a message of severity 90 and up is critical, 80 to 89 warns. At most 25 of each; the partition's own record counts them all | | `QSYS2.JOB_QUEUE_INFO`: queues with jobs ready to run | parts, only for a queue that's held, or that no active subsystem takes from: its jobs can't start; warns | | `QSYS2.NETSTAT_INTERFACE_INFO`: interfaces and their state | parts: an interface set to start with TCP/IP (IBM i's own `AUTOSTART`) that isn't active is degraded, or down when its line failed (RCYPND, RCYCNL, FAILED); one not set to start is said, not judged | What the partition says about itself it judges itself, as Purity and vCenter do: IBM i's ASP threshold, QSYSOPR's severities. Cairn OBS adds only what's expected to be running (subsystems) and what's been stuck too long (MSGW, waiting jobs). Later, when asked: the history log (`HISTORY_LOG_INFO`), PTF currency (`GROUP_PTF_CURRENCY`, which asks IBM, so off by default), expiring certificates in the Digital Certificate Manager store (needs more authority than the rest). The Power servers themselves are read through the HMC (below). ## How to reach it Three ways, in the order I'd choose: **Mapepire** (recommended). IBM's own database server for IBM i (2024, open source; its licence to be checked before we build against it), made for clients that aren't Java: SQL over a secure WebSocket on one port (8076), results as JSON. The partition's admin installs it from IBM's open-source package repository (`yum install mapepire-server`) and starts it with Service Commander. The agent needs no new dependency (golang.org/x/net, already in the module, has a WebSocket client) and no driver; one TLS port through the firewall. The cost: something new installed on the IBM i, and Java running for it. **SSH and db2util.** Many shops already run OpenSSH on IBM i. The agent logs in with a key and runs `db2util -o json ""` for each read. Nothing new to listen on, but SSH adds golang.org/x/crypto/ssh to the agent, a shell for the profile, and a process per query. **The host servers' own protocol** (the database host server on 8471, which ODBC and JDBC use). Nothing to install on the IBM i, but the protocol is IBM's own and unpublished outside the Java toolbox; writing it in Go is weeks, and IBM's ODBC driver for Linux is proprietary and needs cgo. Not worth it. ## The profile A user profile just for this: user class *USER, no special authorities to start with, password or key in a file on the agent's host (like Pure's token), with `LMTCPB(*YES)` and `INLMNU(*SIGNOFF)` so a green-screen sign-on gets no command line and no menu. Most of the views above work for any user. Seeing other users' jobs in ACTIVE_JOB_INFO (for MSGW) needs *JOBCTL, which is also the authority to end and hold jobs: more than we want to hold. Question 2. ## Setting it up On the partition, as a security officer: 1. **Mapepire**, from IBM's open-source packages (ACS's Open Source Package Management, or `yum install mapepire-server` in an SSH session), started with Service Commander: `sc start mapepire`, and `sc` again after an IPL unless it's set to start with TCP/IP. It listens on 8076 with a certificate it makes itself; the agent pins that with `fingerprint`: `openssl s_client -connect prod1:8076 ` in `/QOpenSys/etc/mapepire/iprules.conf` (the setup page says so). Basic mode allows views and unqualified built-in functions only, not IBM's table functions, so every read here is a view. That rules out `SYSTEM_ACTIVITY_INFO` (a table function, and it needs *JOBCTL): CPU use comes from `SYSTEM_STATUS_INFO_BASIC`'s `ELAPSED_` columns, which average since the connection's first read, so two reads give the minute between them. 2. **No special authorities.** And with the table functions out, MSGW isn't read from `ACTIVE_JOB_INFO` at all: a batch job in MSGW has sent an inquiry to QSYSOPR (or the message queue its job description names), so step 3 lists QSYSOPR's unanswered inquiries with the job that sent each, from the `MESSAGE_QUEUE_INFO` view. That needs no *JOBCTL. An interactive job waiting on its own external queue isn't seen; that's someone at a screen. 3. **A source like the Pure arrays**, on Clusters, with the partition as the source's own record and its ASPs, subsystems and interfaces as its parts. A host of its own on Hosts comes later, with Windows, Linux and IBM i in one list. 4. **The HMC as step 4**, after steps 1 to 3. 5. **PUB400.COM for real output, fakes until then.** The sign-up is John's, when step 3 is in; until then the tests and the demo simulator answer as IBM documents the views. Changed 2026-11-15, John: "let's skip it for now". PUB400 doesn't run Mapepire, and calls itself a playground, not for commercial use, so it could only have checked the SQL over SSH. The fakes stand until a shop with IBM i (and an HMC) tries it. Still to check then: Mapepire's timestamps and `TIMESTAMPDIFF` and `NOW() - 1 DAY` in its basic query mode, QSYSOPR's default authority for a `*USER` profile, and on the HMC, that hmcviewer with remote web access is enough for the REST API.