Skip to content

RDKEMW-16664: Send integer value for MemAvailable to t2ValNotify#496

Merged
shibu-kv merged 4 commits intodevelopfrom
copilot/update-memavailable-api-argument
Apr 10, 2026
Merged

RDKEMW-16664: Send integer value for MemAvailable to t2ValNotify#496
shibu-kv merged 4 commits intodevelopfrom
copilot/update-memavailable-api-argument

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

MemAvailable was being sent as a raw /proc/meminfo line (e.g., MemAvailable: 12345 kB) to t2ValNotify, unlike swap metrics which correctly extract the integer value.

Change

Extract the numeric value from MEM_AVAILABLE before notifying, consistent with how SwapCached, SwapTotal, and SwapFree are handled:

# Before
t2ValNotify "SYST_INFO_MemAvailable_split" "$MEM_AVAILABLE"

# After
MEM_AVAILABLE_VAL=`echo "$MEM_AVAILABLE" | tr -s '[:space:]' ' ' | cut -d' ' -f2`
t2ValNotify "SYST_INFO_MemAvailable_split" "$MEM_AVAILABLE_VAL"

The full line is still logged to messages.txt; only the argument passed to t2ValNotify changes.

…otify

Agent-Logs-Url: https://github.com/rdkcentral/sysint/sessions/9a128921-bee2-4756-8abf-414e532b08ea

Co-authored-by: yogeswaransky <166126056+yogeswaransky@users.noreply.github.com>
@yogeswaransky yogeswaransky marked this pull request as ready for review April 6, 2026 06:10
@yogeswaransky yogeswaransky requested a review from a team as a code owner April 6, 2026 06:10
Copilot AI review requested due to automatic review settings April 6, 2026 06:10
@yogeswaransky yogeswaransky changed the title fix: send integer value for MemAvailable to t2ValNotify RDKEMW-16664: send integer value for MemAvailable to t2ValNotify Apr 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes telemetry formatting for the MemAvailable metric in system_info_collector.sh by extracting and sending only the numeric value (kB) to t2ValNotify, aligning it with how swap metrics are already handled.

Changes:

  • Parse the integer value from the MemAvailable /proc/meminfo line.
  • Send the parsed integer (instead of the full line) to t2ValNotify under SYST_INFO_MemAvailable_split.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/rdk/system_info_collector.sh Outdated
@dharshini555 dharshini555 changed the title RDKEMW-16664: send integer value for MemAvailable to t2ValNotify RDKEMW-16664: Send integer value for MemAvailable to t2ValNotify Apr 6, 2026
Copy link
Copy Markdown
Contributor

@yogeswaransky yogeswaransky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI review requested due to automatic review settings April 10, 2026 02:18
@shibu-kv shibu-kv merged commit be07e4b into develop Apr 10, 2026
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants