A Linux robot diagnostic service can receive one timer notification after several periodic expirations have accumulated. If its dashboard adds one tick for each handler visit, it can hide scheduling backlog. If it adds the returned expiration count to completed checks, it can claim work that never ran. Timer progress and completed diagnostic work need separate counters.
This article considers a fictional, non-control diagnostic process that samples the robot computer's current status. It proposes an accounting method, not an actuator schedule, safety watchdog, or real-time guarantee. A local arithmetic model checks the example totals; no Linux timer was executed and no robot timing was measured.
Read the count, then name what it counts
The Linux timerfd manual describes a successful read returning an eight-byte unsigned integer with the number of expirations since the last successful read or timer-setting change. Readiness indicates that expiration information is available. It does not establish that an application ran the same number of diagnostic jobs.
The inspected Linux timerfd implementation keeps timer ticks separately from the polling readiness indication. Its read path collects the tick value, accounts for a periodic timer's elapsed intervals when needed, and clears the stored count. That implementation supports the manual's distinction between the available count and the application's work. The inspected master branch is dated evidence, not a statement about a particular deployed kernel.
For the proposed report, use separate fields for successful timer reads, expiration counts returned, diagnostic work started, and diagnostic work completed. A completion belongs to the job's own result path. Receiving a timer count is not that result path, even when a normal unloaded run often makes the two totals look alike.
Work through a delayed-reader example
Assume an invented periodic schedule with slots at 10, 20, 30, 40, 50, 60, and 70 milliseconds. Assume successful reads at 12, 51, and 72 milliseconds. These deliberately small values make the arithmetic readable; they are not recommended robot diagnostic settings or observed scheduler performance.
The model places one expiration in the first read's interval, four in the second, and two in the third. The returned counts are therefore modeled as 1, 4, and 2, for seven total expirations across three successful reads. It also checks that each count fits the proposed eight-byte unsigned representation. This is a model of the documented accounting boundary, not a reproduction of kernel execution.
Now give the application an explicit policy: run one current-status check after each successful read. That produces three work runs. If each finishes successfully, the report can record three completed checks and seven elapsed timer slots. It cannot report seven completed checks merely because the expiration total is seven.
Choose the backlog policy before interpreting the gap
Under a latest-slot policy in this example, the checks correspond to the newest pending slots: 10, 50, and 70 milliseconds. The model labels the other four slots as skipped under that policy. That label comes from the application's stated selection rule. It is not a universal definition of a missed deadline or proof of four lost sensor messages.
A different service could choose to queue one job for every expiration. That policy would request seven jobs in the example, but completions would still have to be counted separately. Queuing seven requests does not prove that seven samples were acquired at their original intended times, and a later retry does not create an earlier observation.
For a current-status diagnostic, repeatedly reading the present state may produce several records from approximately the same later period. It cannot reconstruct past states that were never recorded. Decide whether the diagnostic needs the newest state, a retained history, or a separate acquisition stream before selecting a catch-up policy.
Preserve the configuration boundary
The manual defines the read count relative to the last successful read or the last timer-setting modification. The proposed report therefore begins a new configuration segment when the application changes the timer. Retain its own segment identifier, selected clock, requested initial expiration and interval, and the operation's outcome.
Do not join segments by assuming the previous count continued unchanged. Likewise, keep a service restart visible in the diagnostic history. A gap across a restart may involve unavailable observations as well as a changed timer. The data should let a reviewer distinguish what the process observed from what it inferred about the unobserved interval.
Record unsuccessful reads without inventing zeros
For a nonblocking timer descriptor with no pending expirations, the documented read outcome is EAGAIN. That unsuccessful attempt should have its own outcome; it is not a successful count of zero. The manual also specifies that a supplied buffer smaller than eight bytes fails with EINVAL. Validate the read result before decoding a count.
Keep errors, interrupted attempts, and successfully decoded counts in separate reporting paths. This makes a malformed read or unavailable observation visible without assigning imaginary completed work. The scope here is the accounting design; production clock selection and application error handling need review against the actual deployment.
Use the gap to guide investigation
An increasing difference between expiration totals and completed checks is a reason to inspect the selected backlog policy, job outcomes, and service availability. It is not enough evidence to identify CPU contention, network delay, or a specific faulty driver. Those diagnoses need measurements from their respective layers.
The synthetic report closes with three reads, seven modeled expirations, three completed checks under the stated success assumption, and four intentionally unserved slots under the latest-slot policy. Keeping those nouns attached to their totals prevents a responsive-looking diagnostic dashboard from claiming historical work it did not perform.
Sources checked November 18, 2026:
Linux man-pages project, timerfd_create(2), read and timer-setting semantics:
https://man7.org/linux/man-pages/man2/timerfd_create.2.html
Linux kernel maintainers, fs/timerfd.c inspected on the check date:
https://github.com/torvalds/linux/blob/master/fs/timerfd.c
The arithmetic trace and proposed diagnostic receipt are original T-800 editorial work. They are not a Linux timing benchmark or a safety-function validation.
Illustration: an AI-generated conceptual dashboard separates seven fictional timer expirations from three fictional completed checks. It represents the stated synthetic policy, not a measured robot deployment.