IMD SolutionComputing LibraryShop main store

Troubleshooting

Why PI shows live values but no trend history

Edge computing and IIoT Published 7 min read

Short answer

A moving live value with an empty trend means the Snapshot is healthy and the archive write path is not. Sample piartool -qs twice a few minutes apart: if Total Event Reads climbs while Total Event Writes stays fixed, check free space on the archive and queue volumes, then piartool -al for an online writable primary archive, and stop at suspected corruption with the outputs in hand.

On this page
  1. What the live value proves and what the empty trend proves
  2. Prove the gap with two piartool -qs samples
  3. Worked example: proving a stalled write path with two -qs samples
  4. Check free space on the archive and queue volumes
  5. Confirm an online, writable primary archive
  6. Read the PI Message Log for the archive subsystem
  7. When to stop and escalate with evidence
  8. Prove the recovery end to end
  9. Questions asked

A PI tag that keeps updating while its trend stays empty is not a display fault: the Snapshot is healthy and the archive write path is not. The live value is served from memory; the trend is served from committed archive files. Prove where the path stops with piartool -qs run twice a few minutes apart: if Total Event Reads climbs while Total Event Writes stays fixed, the Archive subsystem is accepting events and failing to commit them. Work the path in order — free space on the archive and queue volumes, then piartool -al for an online writable primary archive, then the PI Message Log — and stop at suspected corruption with the evidence collected.

What the live value proves and what the empty trend proves #

The PI Server System Management Guide draws the split plainly: the Snapshot Subsystem writes events into the Event Queue, and the Archive Subsystem reads events out of the Event Queue. The live value on the screen is the Snapshot, held in memory and refreshed the moment an interface delivers an event. The trend is drawn from the archive files, which receive only the events the Archive subsystem has committed after exception and compression screening. Because those are separate stages, a moving live value over a flat trend isolates the fault downstream of the Snapshot.

What the operator sees Layer proven healthy Layer to inspect
Live value updates, trend empty or flat Interface, Snapshot Event Queue, Archive subsystem, archive files, disk
Live value frozen, trend empty Nothing proven Interface, buffering, tag binding, network
One tag missing history, neighbors trend normally Archive subsystem Tag configuration: compression settings, archiving flag

Check two or three unrelated tags before going further. All of them live with no history is a server-side archive fault. One tag alone points at tag configuration, which is the case walked through in historian trend empty: PLC tag collection troubleshooting. And if the question behind the empty trend is where the values physically live, the archive is not a SQL database — that separation is covered in does the PI Data Archive store tag data in SQL Server.

Prove the gap with two piartool -qs samples #

  1. Open an elevated command prompt on the Data Archive server and change to the adm directory of the PI installation.
  2. Run piartool -qs and write down Total Event Reads, Total Event Writes and the wall-clock time.
  3. Wait five minutes and run the same command again.
  4. Compare the deltas. Reads advancing while Writes holds a fixed value is the fault signature: the Archive subsystem is draining its input queue and committing nothing.

Total Event Reads counts the events the Archive subsystem has taken from its input queue; Total Event Writes counts the events it has committed to the archive files. A small, momentary difference is normal on a busy system, because events are in flight between the two counters. A difference that persists or widens between samples five minutes apart is not. The same administration counter set includes Event Queue Error Count, which tallies failed reads or writes of an event queue; a value that climbs between your two samples moves the suspicion from the archive files to the queue itself.

Worked example: proving a stalled write path with two -qs samples #

Inputs, each with its source:

  • Server: the Data Archive node at hand, running PI Server version 3.4, with several unrelated tags live but trending flat (the fault report).
  • Sample 1 at 10:00: Total Event Reads 4,182,336 events, Total Event Writes 4,175,912 events.
  • Sample 2 at 10:05: Total Event Reads 4,197,420 events, Total Event Writes 4,175,912 events.
  • The counter values are illustrative of this fault signature; the deltas and the decision are what your own two samples must reproduce.

Rule in words: the write path is proven blocked when the Writes delta over the interval is zero while the Reads delta is positive. A healthy server shows both counters advancing with the difference holding steady, not growing.

Arithmetic written out:

  • ΔReads = 4,197,420 − 4,182,336 = 15,084 events in 5 min, which is 15,084 ÷ 300 s ≈ 50 events per second.
  • ΔWrites = 4,175,912 − 4,175,912 = 0 events.
  • The gap grows from 4,182,336 − 4,175,912 = 6,424 events to 4,197,420 − 4,175,912 = 21,508 events, an increase of 15,084 events — exactly the Reads delta.

Result: Reads climbing at roughly 50 events per second while Writes is frozen. Decision: with Writes flat across two samples five minutes apart, treat the write path as blocked and go to the archive and queue volumes next, before touching archive registration or files.

Check free space on the archive and queue volumes #

Disk comes first because it is the cheapest cause to prove and the one that stalls writes without damaging anything else. The archive files and the queue files can sit on different volumes, and either one filling stops the flow: a full archive volume means the shift cannot create the next primary archive, and a full queue volume means events cannot be buffered, which opens a data-loss window.

List the volumes:

Get-Volume | Select-Object DriveLetter, SizeRemaining, Size

Check the volume that holds the archive files — piartool -al prints their paths — and the volume that holds the PI installation's queue files. Free space by moving non-PI files off the volume or extending it, then rerun piartool -qs twice and watch for Writes to advance. Do not delete files inside the PI archive or queue directories to make room; removing the wrong file turns a stalled write path into lost history.

Confirm an online, writable primary archive #

Archive writes need exactly one online, writable primary archive whose time range covers the present. Run piartool -al and read the listing for three things:

  • a primary archive is registered, online and writable;
  • its start time is earlier than now;
  • its end time is open, reaching the present rather than fixed in the past.

A primary that is missing, read-only, or registered with a range that stops short of the present explains the empty trend on its own. A shift is what creates the new primary, so a shift that failed for lack of disk leaves the server in exactly this state; once the volume has space, retry the shift by the procedure documented for the installed version. Confirm the primary's file exists on disk at the path the listing shows.

Read the PI Message Log for the archive subsystem #

Open the Message Logs plug-in in System Management Tools, or use pigetmsg, and read the period around the time trends stopped. Archive subsystem messages about opening, shifting or writing an archive name the failing step directly. A failed shift recorded there, with the disk now clear, confirms the retry is the fix.

When to stop and escalate with evidence #

If both volumes have free space, piartool -al shows an online primary covering the present, and Writes still does not advance between two samples, treat the archive or its index as corrupt. The repair options at that point — reprocessing, re-registering, restoring from backup — risk the history that survives, so stop and open a case with the OEM support channel that supplied the server. Collect before calling:

  • both piartool -qs outputs with their timestamps, showing the gap;
  • the piartool -al listing;
  • Message Log entries from the Archive subsystem around the failure time;
  • free-space figures for the archive, queue and system volumes;
  • the full version and build string of the PI server;
  • the time trends stopped, taken from the last good point on a trend.

Copy the archive directory to another volume before any repair, if space allows. Queued events stay buffered while the archive is down and replay once it recovers, but only while queue space lasts, so keep the queue volume clear for the whole repair.

Prove the recovery end to end #

  • Run piartool -qs twice, a few minutes apart: both counters advance and the difference holds steady instead of growing.
  • Run piartool -al again: the primary archive is online and its range reaches the present.
  • Widen the trend window across the outage: queued events replay into the gap, and any remaining hole is data that never reached the queue.
  • Check the Message Log over the same period: no new Archive subsystem errors.

A hole that remains after recovery is a backfill job rather than a repair, and that workflow is covered in backfilling trend history from a plant historian.

Questions asked

Why does PI show a live value but no trend?

The live value is served from the Snapshot in memory, which updates the moment an interface delivers an event. The trend is drawn from the archive files, which only hold events the Archive subsystem has committed. The two layers fail independently, so a moving value over an empty trend isolates the fault downstream of the Snapshot: the Event Queue, the Archive subsystem, the archive files or the disk.

Why does piartool -qs show Total Event Writes lower than Total Event Reads?

The Archive subsystem has taken events from its input queue but not committed them to an archive. A small transient difference is normal on a busy system because events are in flight; a gap that persists or widens across two samples five minutes apart is the fault signature. Keep both outputs with their timestamps, because they are the first evidence support will ask for.

Which disk fills first and what does it stop?

Either the archive volume or the queue volume, and either one stops the flow. A full archive volume means the shift cannot create the next primary archive, so writes stall while Reads keeps climbing. A full queue volume means events cannot be buffered, and data that never queues cannot be replayed later. Free space by moving non-PI files or extending the volume, never by deleting from the PI directories.

Will the lost trend data come back after the fix?

Only the events that reached the Event Queue. They stay buffered while the archive is down and replay once a writable primary archive is available, which is why widening the trend window across the outage is part of proving the fix. Data that never reached the queue leaves a permanent hole, and that hole is a backfill job from another source, not something the server reconstructs on its own.

When should you stop troubleshooting and open a support case?

When the archive and queue volumes have free space, piartool -al lists an online primary archive covering the present, and Total Event Writes still does not advance between two samples. That combination points to archive or index corruption, and the repair options carry risk to the surviving history. Copy the archive directory to another volume, gather the two -qs outputs, the -al listing and the Message Log entries, then call the OEM support channel.

Keep reading

  • Troubleshooting

    Historian trend empty: PLC tag collection troubleshooting

    A live PLC value proves nothing about what the historian stored. Work one known, changing tag through four boundaries — controller to data server, server to collector, collector to point, point to chart — and with a 2 s update rate, a 1% deadband on a 200 in span and a 24 in/h fill, a 20 min window must show about 4 stored events. Zero events means the collector; four events with a flat chart means the display.

    Edge computing and IIoT

  • Troubleshooting

    Citect SCADA connector to Historian shows disconnected

    A "Disconnected" destination status means the Citect SCADA Connector has no session to Historian and is buffering samples to local disk. SMC tag-discovery and write entries prove the connector's stages, not that values were archived. Stop the connector, verify the destination instance, services and write authorization, reconnect once, and close only when a query returns a sample and the buffer drains.

    Edge computing and IIoT

  • Troubleshooting

    Edge trend shows no historian data: fix the doubled SELECT

    The trend stays blank because a complete SELECT statement was pasted into the Table field, so the gateway wraps it in its own SELECT ... FROM and SQL Server rejects the result as incorrect syntax near the keyword select. Put only Runtime.dbo.History in Table, carry DateTime, TagName and Value in the column controls, and move TagName = 'SysTimeSec' into the filter control.

    Edge computing and IIoT