Host and agent lifecycle
Boots, shutdowns, sleep and wake, and agent starts and stops, each dated when it happened.
Topic id: lifecycle.
Occurrences (9)
host_booted The event is dated to when Windows started. The event before it says how the last run ended: Host shutting down for a clean shutdown, Unexpected host shutdown for a crash, a power loss or a reset. A start marked Fast Startup followed the default Shut down on most Windows 10 and 11 PCs: Windows restored a saved kernel, so it was not a full restart, and a driver fault that a restart clears can survive it. Restarts while the agent was not running are read back from the System log when it starts again.
- The event before it: a clean shutdown or an unexpected one.
- User32 event 1074 in the System log, which SparkLogs also collects, names the program and account that asked for the restart and the reason given.
- Whether the machine restarts more often than its patch schedule explains.
Host booted. sparklogs.instance: host
host_booted, Display, lifecycle: host_booted: NOTABLE: Host booted.host_clock_stepped Windows Time correcting a drifted clock, an administrator setting the time, or a virtual machine catching up after the hypervisor paused or restored it is the usual cause. Sleep does not count: the clock moving across a sleep is not a jump. Repeated large jumps point at a bad time source, two sources setting the clock (domain time and the hypervisor's time sync on a virtual machine), or a failing motherboard clock battery. Windows Time failing to reach its source is reported separately, from the System log.
- The size and direction of the jump in the event, and the clock time on either side.
w32tm /query /sourceandw32tm /query /statusshow where Windows takes its time from and when it last synchronized.- On a virtual machine, whether the hypervisor's time sync and domain time both set the clock.
Host clock stepped. step_s="-240". sparklogs.instance: host
host_clock_stepped, Display, lifecycle: host_clock_stepped: NOTABLE: Host clock stepped. step_s="-240".host_resume_settled After a wake from sleep, the agent waits a short time before it judges performance, disk and network readings, so the burst of activity that follows every resume does not open conditions. This marks when the last of those waits ended.
- A problem raised soon after this point that was not there before the sleep: the power-management settings and recent updates of the network, storage and graphics drivers.
Host resume settled. sparklogs.instance: host
host_resume_settled, Display, lifecycle: host_resume_settled: NOTABLE: Host resume settled.host_shutdown Windows tells running services the machine is going down, for a restart, a shut down or a Fast Startup shut down, and the event is dated from that notice. It does not say whether the machine restarted or powered off: the next Host booted, and how long until it, does. A clean run ends with this event before the next Host booted, and a start without one is reported as Unexpected host shutdown.
- User32 event 1074 in the System log, which SparkLogs also collects, names the program and account that asked for it and the reason given.
- The time to the next Host booted: how long the machine was down.
Host shutting down. sparklogs.instance: host
host_shutdown, Display, lifecycle: host_shutdown: NOTABLE: Host shutting down.host_sleep_entered SparkLogs reports a sleep when the machine wakes, dated to when it went to sleep, so a machine that is still asleep has no sleep event yet. Sleeps shorter than thirty seconds do not count, and a virtual machine that the hypervisor pauses or saves is not reported as asleep. For Modern Standby the event says what started it: the lid, the power button, a sleep request, the display timeout or the battery. A server, or a machine that should run overnight jobs, going to sleep points at its power plan.
- The type of sleep and, for Modern Standby, the reason in the event.
- The power plan's sleep and hibernate timeouts, in Settings or
powercfg /query.
Host entered sleep. sparklogs.instance: host
host_sleep_entered, Display, lifecycle: host_sleep_entered: NOTABLE: Host entered sleep.host_sleep_exited The event carries how long the machine was asleep. Problems that start right after a wake are often a driver's power management at fault, and this event dates them. Repeated wakes with nobody at the machine are the Power wake loop condition.
powercfg /lastwake, or Power-Troubleshooter event 1 in the System log, which SparkLogs also collects, names what woke the machine after classic sleep or hibernation.- Driver updates for the device that fails after a wake, and the "Allow the computer to turn off this device to save power" setting on its Power Management tab in Device Manager.
Host resumed from sleep. sparklogs.instance: host
host_sleep_exited, Display, lifecycle: host_sleep_exited: NOTABLE: Host resumed from sleep.host_unexpected_shutdown A blue screen, a power loss, a held power button, a dead battery, or a hypervisor resetting the virtual machine ends a run this way. The event carries the last time the machine was known to be running, and the failure came after it, sometimes well after. SparkLogs also reports the System log's own records of the same failure (event 6008 and Kernel-Power 41) as a separate unexpected shutdown event. A failure while the agent was not running is read back from the System log when it starts again.
- A Windows crashed (blue screen) event near the restart: start from its bug check code.
- Repeats with no blue screen: the power supply, UPS, power cable or battery, and overheating.
- On a virtual machine, the hypervisor's log for a reset or a host failure.
Host restarted without a clean shutdown. sparklogs.instance: host
host_unexpected_shutdown, Display, lifecycle: host_unexpected_shutdown: NOTABLE: Host restarted without a clean shutdown.kernel_crash: A blue screen, with its stop code.
sparklogs_agent_started The agent starts with Windows, after its own update, or when someone starts the service. A start whose previous run left no stop record means the agent crashed, was ended, or went down with the machine. An Unexpected host shutdown just before it says it was the machine.
- The previous SparkLogs agent stopped event and its cause, or an Unexpected host shutdown before this start.
- Notice starts that repeat with no machine failure behind them: report them to SparkLogs support with the device name.
SparkLogs agent started. service="SparkLogsAgent". sparklogs.instance: service:sparklogsagent
sparklogs_agent_started, Display, lifecycle: sparklogs_agent_started: NOTABLE: SparkLogs agent started. service="SparkLogsAgent".sparklogs_agent_stopped: The agent stopped, and why.
sparklogs_agent_stopped The event names the cause: an agent update, Windows shutting down, someone stopping the service (an administrator, an RMM tool or an uninstall), or an error inside the agent. When the agent dies without stopping, the Service Control Manager records it in the System log, and SparkLogs reports that record under this reason at Error.
- The cause in the event, and for a stop by someone, which administrator or RMM policy stopped it.
- The time to the next SparkLogs agent started: how long the machine had no readings.
- Repeated error stops: report them to SparkLogs support with the device name.
SparkLogs agent stopped. service="SparkLogsAgent" stop_cause="os_shutdown". sparklogs.instance: service:sparklogsagent
sparklogs_agent_stopped, Display, lifecycle: sparklogs_agent_stopped: NOTABLE: SparkLogs agent stopped. service="SparkLogsAgent" stop_cause="os_shutdown".sparklogs_agent_started: The agent started again, and whether its last stop was clean.
Fields (17)
One occurrence per transition, dated when it happened: the host booting, shutting down or restarting unexpectedly, entering and leaving sleep, and the agent starting and stopping. Each row names its subject and transition, with the boot and awake clocks at that moment.
Full inventory on its own schedule. Supported changes are reported when the agent observes them.
Event (4)
sparklogs.data.lifecycle. subject_kind sparklogs.data.lifecycle. transitionsparklogs.data.lifecycle. boot_elapsed_s sparklogs.data.lifecycle. awake_s Sleep (4)
sparklogs.data.lifecycle. sleep_kind sparklogs.data.lifecycle. sleep_state_native S3 or S4 when the kernel's sleep-entry record (Kernel-Power 42) gives that effective state, S0ix for a low power idle span (reported only when its awake clock stopped); omitted for a suspend or hibernate without that record.sparklogs.data.lifecycle. sleep_reason_native Reason: 1 power button, 11 sleep request, 12 display idle timeout, 15 lid, 55 battery budget); low power idle only, omitted without that record.sparklogs.data.lifecycle. asleep_s Boot and shutdown (5)
sparklogs.data.lifecycle. stop_cause sparklogs.data.lifecycle. stopped_ts sparklogs.data.lifecycle. last_alive_basis event_log: the power button time in the kernel's unclean-reboot record (Kernel-Power 41), after a long press. agent_tick: the agent's last recorded observation. latest_record: on a row rebuilt from the System log, the latest record written before the boot that followed. Guards and the cleared-as-clean cases: docs/engineering/clocks-and-observation.md.sparklogs.data.lifecycle. booted_ts sparklogs.data.lifecycle. fast_startup host_shutdown and host_booted pair a Fast Startup raises: the kernel's sleep-entry record targeted shutdown and reached hibernate (Kernel-Power 42 TargetState 6, EffectiveState 5) and the resume booted as Fast Startup (Kernel-Boot 27 BootType 1). The agent process and its uptime survive it, so boot_elapsed_s and awake_s keep counting from the earlier boot; on a pair rebuilt from the System log they are omitted. Omitted otherwise.Clock step (4)
sparklogs.data.lifecycle. step_s sparklogs.data.lifecycle. old_ts sparklogs.data.lifecycle. new_ts sparklogs.data.lifecycle. step_source tick_pair, two of the agent's own clock readings, 10 s apart while the agent samples performance and otherwise up to one capture interval apart (60 s by default), so old_ts and new_ts place the step at the later reading, up to that interval after it happened.