systime(8)

systime8

Kylin sdk system time monitoring service

Usage

kysdk-systime

Overview

kysdk-systime is a system time monitoring service in the KYLIN SDK system. This service provides real-time system time broadcasting and monitoring capabilities, detecting system time changes and timezone changes, and broadcasting time information through D-Bus signals.

The service runs as a system daemon that continuously monitors the system clock for changes and broadcasts time updates every minute. It also monitors for system time adjustments and timezone changes, ensuring accurate time information is available to all subscribed applications.

Features

Real-time Time Broadcasting

Broadcasts current system time every minute through D-Bus signals

System Time Change Detection

Monitors and detects system time adjustments using timerfd

Timezone Change Monitoring

Monitors changes to system timezone settings using inotify

D-Bus Signal Broadcasting

Provides time information through D-Bus signals for inter-process communication

Precise Timing

Uses high-precision timers for accurate time synchronization

D-Bus INTERFACE

The service implements the following D-Bus interface `com.kylin.kysdk.TimeInterface` with these signals:

TimeSignal

Emitted every minute with current time information in format: "YYYY/MM/DD HH:MM:SS"

TimeChangeSignal

Emitted when system time or timezone changes, providing updated time information

Monitored events

System Time Changes

Detects manual time adjustments, NTP synchronization, and other time modifications

Timezone Changes

Monitors changes to /etc/localtime for timezone updates

Clock Drift

Handles clock synchronization and drift correction

Threading model

The service uses a multi-threaded architecture:

Main Thread

Handles D-Bus communication and main event loop

Time Change Monitor Thread

Monitors system time changes using timerfd

Timezone Monitor Thread

Monitors timezone changes using inotify

Time Broadcast Thread

Manages periodic time broadcasting

Timer system

Periodic Timer

Runs every 60 seconds for regular time broadcasting

Single-shot Timer

Used for immediate time change notifications

Timer Synchronization

Automatically resynchronizes when time changes are detected

Files

/usr/bin/systime

Main executable file

/etc/systemd/system/kysdk-systime.service

Systemd service configuration file

/etc/localtime

Monitored file for timezone changes

Service

The service runs as a systemd service with: - Service name: kysdk-systime.service - D-Bus name: com.kylin.kysdk.TimeServer - Object path: /com/kylin/kysdk/Timer - Interface: com.kylin.kysdk.TimeInterface - Type: D-Bus activated service

Dependencies

D-Bus

For inter-process communication

GLib

For main loop integration

libkytimer

For timer management functionality

systemd

For service management

Signal handling

SIGTERM, SIGINT

Graceful shutdown signals

TFD_TIMER_CANCEL_ON_SET

Special timer flag for detecting time changes

Time formats

All time information is broadcast in the following format: YYYY/MM/DD HH:MM:SS - 4-digit year - 2-digit month (01-12) - 2-digit day (01-31) - 2-digit hour (00-23) - 2-digit minute (00-59) - 2-digit second (00-59)

Synchronization

Automatic Resync

Automatically resynchronizes timers when time changes are detected

Mis-sync Handling

Detects and corrects timing drift or missed notifications

Timer Management

Intelligently manages periodic and single-shot timers

Author

KylinSoft Co., Ltd.

From libkysdk-system 3.0.1.4-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.