Skip to main content

IBM i (AS/400)

Plugin: ibm.d.plugin Module: as400

Overview

Monitors IBM i (AS/400) systems using SQL services and CL commands to expose CPU, memory, storage, job, and subsystem activity.

Dependencies:

  • unixODBC 2.3+ with IBM i Access ODBC driver
  • IBM i 7.2 or later with SQL services enabled

Required Libraries:

  • libodbc.so (provided by unixODBC)
  • IBM i Access Client Solutions

Collection paths

The collector executes queries in multiple tracks:

  • Fast path (5s): lightweight system status queries remain sequential on the main plugin thread.
  • Slow path (10s beat): heavier queries (per-queue metrics, subsystems, plan cache, etc.) run in a background worker with bounded concurrency.
  • Batch path (≥60s beat): optional long-period worker used for expensive aggregate queries such as queue totals. Disabled by default unless queue totals are explicitly enabled.

CPU Collection Methods:

The collector uses a hybrid approach for CPU utilization metrics to handle IBM i 7.4+ where AVERAGE_CPU_* columns were deprecated:

  1. Primary Method - TOTAL_CPU_TIME: Uses the monotonic TOTAL_CPU_TIME counter from QSYS2.SYSTEM_STATUS() to calculate CPU utilization via delta-based calculation. This is the most accurate method but requires *JOBCTL special authority. TOTAL_CPU_TIME is a cumulative counter in nanoseconds representing CPU-seconds consumed, naturally in per-core scale.

  2. Fallback Method - ELAPSED_CPU_USED: If *JOBCTL authority is not available, falls back to ELAPSED_CPU_USED with automatic reset detection. This method tracks when IBM i statistics are reset (either manually or via reset_statistics configuration) and re-establishes a baseline after detecting resets. The values are already in per-core scale.

  3. Legacy Method - AVERAGE_CPU_UTILIZATION: For IBM i versions before 7.4, uses the now- deprecated AVERAGE_CPU_UTILIZATION column, which IBM reports in the same per-core scale.

The collector automatically selects the appropriate method based on available permissions and logs which method is being used.

CPU Metric Scale:

CPU utilization is reported using the "100% = 1 CPU core" semantic. This means:

  • 100% indicates one CPU core is fully utilized
  • 400% indicates four CPU cores are fully utilized
  • Values are limited to 100% × ConfiguredCPUs, matching the partition's configured capacity

For shared LPARs, the metrics show absolute CPU consumption in per-core scale, not relative to entitled capacity. For example, a shared LPAR entitled to 0.20 cores can show 150% utilization when bursting above entitlement.

Statistics Reset Behavior:

The reset_statistics configuration option controls whether the collector resets IBM i system statistics on each query via SYSTEM_STATUS(RESET_STATISTICS=>'YES'). When enabled:

  • System-level statistics (CPU, memory pools, etc.) are reset after each collection cycle
  • Matches legacy behavior but clears global statistics that other tools may rely on
  • The ELAPSED_CPU_USED fallback method will detect and handle these resets automatically
  • Caution: Enabling this affects all users and applications on the IBM i system

Default: false (statistics are not reset, using RESET_STATISTICS=>'NO')

Chart Gaps During Baseline Resets:

The as400.system_activity_cpu_rate and as400.system_activity_cpu_utilization charts rely on delta calculations. When the collector detects that IBM i reset these statistics—or when it is still establishing the initial baseline—it intentionally skips a sample instead of emitting a zero or spike. Netdata renders those skipped samples as small gaps, which is expected behaviour.

Cardinality Management:

To prevent performance issues from excessive metric creation, the collector enforces cardinality limits on per-instance metrics (disks, subsystems, job queues, message queues, output queues, active jobs, network interfaces, HTTP servers).

How Limits Work:

  • The collector counts instances before collecting metrics
  • If count exceeds the configured max_* limit, collection is skipped entirely for that category
  • The collector logs a warning: "[category] count (X) exceeds limit (Y), skipping collection"
  • No metrics are collected for that category until you adjust the configuration

Configuration Options:

Use both limit and selector options together to manage high-cardinality environments:

OptionPurposeDefault
max_disksMaximum disk units to monitor100
max_subsystemsMaximum subsystems to monitor100
max_job_queuesMaximum job queues to monitor100
max_message_queuesMaximum message queues to monitor100
max_output_queuesMaximum output queues to monitor100
active_jobsFully qualified active jobs to monitor (JOB_NUMBER/USER/JOB_NAME)[]
collect_disks_matchingGlob pattern to filter disks (e.g., "001* 002*")"" (match all)
collect_subsystems_matchingGlob pattern to filter subsystems (e.g., "QINTER QBATCH")"" (match all)
collect_job_queues_matchingGlob pattern to filter job queues (e.g., "QSYS/*")"" (match all)

Optional batch-path controls:

OptionPurposeDefault
batch_pathEnables the long-period batch worker for aggregate queriesfalse
batch_path_update_everyBatch worker cadence (minimum 60s, recommend ≥600s in production)60s
batch_path_max_connectionsMaximum concurrent connections for batch queries1
collect_message_queue_totalsEnables full-scan counting of all message queues and messagesauto (off)
collect_job_queue_totalsEnables aggregate counting of job queues and queued jobsauto (off)
collect_output_queue_totalsEnables aggregate counting of output queues and spooled filesauto (off)

Warning: queue totals require scanning IBM i catalog views and can be very expensive on large systems. Leave these options disabled unless aggregate counts are absolutely necessary.

Example Workflow:

  1. System has 500 disks, collector skips disk metrics (exceeds default limit of 100)
  2. Check logs: "disk count (500) exceeds limit (100), skipping per-disk metrics"
  3. Two options:
    • Option A: Increase limit: max_disks: 500 (collects all 500 disks)
    • Option B: Use selector: collect_disks_matching: "00[1-5]*" (cherry-pick specific disks)

Best Practices:

  • Use selectors to monitor only business-critical objects in large environments
  • Set limits based on your Netdata server's capacity (each instance = multiple charts)
  • Start with defaults and adjust based on actual usage patterns

IBM i 7.2–7.3 Behavior Note (Message Queues):

IBM i 7.4 introduced a message-queue table function that returns only the live backlog. On 7.2–7.3 systems we fall back to the QSYS2.MESSAGE_QUEUE_INFO view, which includes all recorded messages (even those already processed/cleared from the queue). Aggregations—especially MAX(SEVERITY)—therefore reflect the historical log, not just the outstanding backlog. This behaviour is inherent to the IBM SQL service and can lead to higher-than-expected max severity values on pre-7.4 systems.

Network interface metrics have a fixed internal limit of 50 instances, and HTTP server metrics are capped at 200 instances; these limits are currently not configurable.

The collector connects to IBM i (AS/400) and collects metrics via its monitoring interface.

This collector is supported on all platforms.

This collector supports collecting metrics from multiple instances of this integration, including remote instances.

Default Behavior

Auto-Detection

This integration doesn't support auto-detection.

Limits

The default configuration for this integration does not impose any limits on data collection.

Performance Impact

The default configuration for this integration is not expected to impose a significant performance impact on the system.

Setup

Prerequisites

Enable monitoring interface

Ensure the IBM i (AS/400) monitoring interface is accessible.

Configuration

Options

Configuration options for the as400 collector.

Config options
OptionDescriptionDefaultRequired
update_everyData collection frequency.1no
endpointConnection endpoint.dummy://localhostno

via File

The configuration file name for this integration is ibm.d/as400.conf.

You can edit the configuration file using the edit-config script from the Netdata config directory.

cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config ibm.d/as400.conf
Examples
Basic

Basic configuration example.

Config
jobs:
- name: local
endpoint: dummy://localhost

Alerts

There are no alerts configured by default for this integration.

Metrics

Metrics grouped by scope.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.

Per activejob

These metrics refer to activejob instances.

Labels:

LabelDescription
job_nameJob_name identifier
job_statusJob_status identifier
subsystemSubsystem identifier
job_typeJob_type identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.activejob_cpuActive Job CPU Usagecpupercentage
as400.activejob_resourcesActive Job Resourcestemp_storageMiB
as400.activejob_timeActive Job Elapsed Timecpu_time, total_timeseconds
as400.activejob_activityActive Job Activitydisk_io, interactive_transactionsoperations/s
as400.activejob_threadsActive Job Thread Countthreadsthreads

Per disk

These metrics refer to disk instances.

Labels:

LabelDescription
disk_unitDisk_unit identifier
disk_typeDisk_type identifier
disk_modelDisk_model identifier
hardware_statusHardware_status identifier
disk_serial_numberDisk_serial_number identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.disk_busyDisk Busy Percentagebusypercentage
as400.disk_io_requestsDisk I/O Requestsread, writerequests/s
as400.disk_space_usageDisk Space Usageusedpercentage
as400.disk_capacityDisk Capacityavailable, usedgigabytes
as400.disk_blocksDisk Block Operationsread, writeblocks/s
as400.disk_ssd_healthDisk SSD Healthlife_remainingpercentage
as400.disk_ssd_ageDisk SSD Power On Dayspower_on_daysdays

Per httpserver

These metrics refer to httpserver instances.

Labels:

LabelDescription
serverServer identifier
functionFunction identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.http_server_connectionsHTTP Server Connectionsnormal, sslconnections
as400.http_server_threadsHTTP Server Threadsactive, idlethreads
as400.http_server_requestsHTTP Server Requestsrequests, responses, rejectedrequests/s
as400.http_server_bytesHTTP Server Throughputreceived, sentbytes/s

Per jobqueue

These metrics refer to jobqueue instances.

Labels:

LabelDescription
job_queueJob_queue identifier
libraryLibrary identifier
statusStatus identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.jobqueue_lengthJob Queue Lengthjobsjobs

Per messagequeue

These metrics refer to messagequeue instances.

Labels:

LabelDescription
libraryLibrary identifier
queueQueue identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.message_queue_messagesMessage Queue Messagestotal, informational, inquiry, diagnostic, escape, notify, sender_copymessages
as400.message_queue_severityMessage Queue Severitymaxseverity

Per networkinterface

These metrics refer to networkinterface instances.

Labels:

LabelDescription
interfaceInterface identifier
interface_typeInterface_type identifier
connection_typeConnection_type identifier
internet_addressInternet_address identifier
network_addressNetwork_address identifier
subnet_maskSubnet_mask identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.network_interface_statusNetwork Interface Statusactivestatus
as400.network_interface_mtuNetwork Interface MTUmtubytes

Per IBM i (AS/400) instance

These metrics refer to the entire monitored instance.

This scope has no labels.

Metrics:

MetricDescriptionDimensionsUnit
netdata.plugin_ibm.as400_query_latency_fastAS400 Query Latency (Fast Path)count_disks, count_http_servers, count_network_interfaces, detect_ibmi_version_primary, detect_ibmi_version_fallback, disk_instances, disk_instances_enhanced, disk_status, http_server_info, job_info, memory_pools, network_connections, network_interfaces, serial_number, system_name, system_activity, system_model, system_status, temp_storage_named, temp_storage_total, technology_refresh_level, active_jobms
netdata.plugin_ibm.as400_query_latency_slowAS400 Query Latency (Slow Path)analyze_plan_cache, count_subsystems, subsystems, message_queue_aggregates, job_queues, output_queue_info, plan_cache_summaryms
netdata.plugin_ibm.as400_query_latency_batchAS400 Query Latency (Batch Path)message_queue_totals, job_queue_totals, output_queue_totalsms

Per outputqueue

These metrics refer to outputqueue instances.

Labels:

LabelDescription
libraryLibrary identifier
queueQueue identifier
statusStatus identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.output_queue_filesOutput Queue Filesfilesfiles
as400.output_queue_writersOutput Queue Writerswriterswriters
as400.output_queue_statusOutput Queue Statusreleasedstate

Per plancache

These metrics refer to plancache instances.

Labels:

LabelDescription
metricMetric identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.plan_cache_summaryPlan Cache Summaryvaluevalue

Per queueoverview

These metrics refer to queueoverview instances.

Labels:

LabelDescription
queue_typeQueue_type identifier
item_typeItem_type identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.queues_countQueue Countsqueuesqueues
as400.queued_itemsQueued Itemsitemsitems

Per subsystem

These metrics refer to subsystem instances.

Labels:

LabelDescription
subsystemSubsystem identifier
libraryLibrary identifier
statusStatus identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.subsystem_jobsSubsystem Jobsactive, maximumjobs

Per IBM i (AS/400) instance

These metrics refer to the entire monitored instance.

This scope has no labels.

Metrics:

MetricDescriptionDimensionsUnit
as400.cpu_utilizationCPU Utilization (100% = 1 CPU core)utilizationpercentage
as400.cpu_utilization_entitledCPU Utilization (as % of entitlement)utilizationpercentage
as400.cpu_configurationCPU Configurationconfiguredcpus
as400.cpu_capacityCurrent CPU Capacitycapacitypercentage
as400.total_jobsTotal Jobs in Systemtotaljobs
as400.active_jobs_by_typeActive Jobs by Typebatch, interactive, activejobs
as400.job_queue_lengthJob Queue Lengthwaitingjobs
as400.main_storage_sizeMain Storage Sizetotalbytes
as400.temporary_storageTemporary Storagecurrent, maximumMiB
as400.memory_pool_usageMemory Pool Usagemachine, base, interactive, spoolbytes
as400.memory_pool_definedMemory Pool Defined Sizemachine, basebytes
as400.memory_pool_reservedMemory Pool Reserved Sizemachine, basebytes
as400.memory_pool_threadsMemory Pool Threadsmachine, basethreads
as400.memory_pool_max_threadsMemory Pool Maximum Threadsmachine, basethreads
as400.disk_busy_averageAverage Disk Busy Percentagebusypercentage
as400.system_asp_usageSystem ASP Usageusedpercentage
as400.system_asp_storageSystem ASP StoragetotalMiB
as400.total_auxiliary_storageTotal Auxiliary StoragetotalMiB
as400.system_threadsSystem Threadsactive, per_processorthreads
as400.network_connectionsNetwork Connectionsremote, totalconnections
as400.network_connection_statesNetwork Connection Stateslisten, close_waitconnections
as400.temp_storage_totalTemporary Storage Totalcurrent, peakbytes
as400.system_activity_cpu_rateSystem CPU Rateaveragepercentage
as400.system_activity_cpu_utilizationSystem CPU Utilizationaverage, minimum, maximumpercentage

Per tempstoragebucket

These metrics refer to tempstoragebucket instances.

Labels:

LabelDescription
bucketBucket identifier

Metrics:

MetricDescriptionDimensionsUnit
as400.temp_storage_bucketTemporary Storage Bucket Usagecurrent, peakbytes

Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.