Skip to content

Add ismodulerestarted DMCLI parameter to DeviceFingerPrint section#67

Open
jayasrikadiyal wants to merge 1 commit intoagentic_docsfrom
66-add-ismodulerestarted-fingerprint-param
Open

Add ismodulerestarted DMCLI parameter to DeviceFingerPrint section#67
jayasrikadiyal wants to merge 1 commit intoagentic_docsfrom
66-add-ismodulerestarted-fingerprint-param

Conversation

@jayasrikadiyal
Copy link
Copy Markdown

Summary

Implements a new read-only boolean DMCLI parameter ismodulerestarted under the Device.DeviceInfo.X_RDKCENTRAL-COM_DeviceFingerPrint TR-181 object.

Changes

  • config/TR181-AdvSecurity.xml: Added read-only boolean parameter definition
  • source/AdvSecurityDml/cosa_adv_security_dml.c: Handle ismodulerestarted in DeviceFingerPrint_GetParamBoolValue
  • source/AdvSecurityDml/cosa_adv_security_internal.c: Implemented CosaAdvSecIsModuleRestarted() which compares cujo-agent process start time against system uptime
  • source/AdvSecurityDml/cosa_adv_security_internal.h: Declared the new function

How It Works

The parameter determines if cujo-agent has restarted after system boot by:

  1. Getting system uptime via sysinfo()
  2. Getting the cujo-agent PID via pidof
  3. Reading /proc/<pid>/stat to extract the process start time (field 22, in clock ticks since boot)
  4. If the process started more than 300 seconds after system boot, it is considered to have been restarted

Validation

dmcli eRT getv Device.DeviceInfo.X_RDKCENTRAL-COM_DeviceFingerPrint.ismodulerestarted

Resolves #66

Implements a new read-only boolean parameter 'ismodulerestarted' under the
Device.DeviceInfo.X_RDKCENTRAL-COM_DeviceFingerPrint TR-181 object.

The parameter indicates whether the cujo-agent process has restarted at any
point after system boot by comparing its process start time against the
system uptime. If the process started more than 300 seconds after boot,
it is considered to have been restarted.

Resolves #66
Copilot AI review requested due to automatic review settings May 6, 2026 17:20
@jayasrikadiyal jayasrikadiyal requested review from a team as code owners May 6, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant