Jetson Memory Audit
NVIDIAOfficialCreated by Jetson TeamDistributed by NVIDIA
- Skill
- Review and audit
- Cloud and DevOps
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The jetson-memory-audit skill provides a structured approach to monitoring and verifying memory usage on NVIDIA Jetson devices. It addresses common issues where memory appears stuck after stopping CUDA workloads by providing tools to capture accurate snapshots and perform cache reclamation. By using live device data rather than estimates, it allows users to establish baselines and calculate the actual delta of reclaimed memory after system changes.
What it does
- Captures a JSON-formatted snapshot of current Jetson memory consumers.
- Identifies top memory-consuming processes using procrank or smaps_rollup.
- Provides a helper to flush reclaimable page, dentry, and inode caches.
- Calculates memory reclamation deltas by comparing before and after snapshots.
- Detects and reports GPU memory usage via NvMap or nvidia-smi based on the driver stack.
- Verifies if memory was actually freed after stopping services like vLLM or sglang.
When to use it
- When you need to determine exactly how much memory is in use on a Jetson device.
- To verify if memory was successfully freed after stopping a container or service.
- When memory appears stuck or unavailable after a CUDA workload exits.
- As a baseline measurement before applying system-level memory optimizations.
Advantages
- Uses live device data for accuracy instead of container or model size estimates.
- Provides a reliable workaround for stuck memory on older JetPack/L4T releases.
- Standardizes the process of measuring memory reclamation.
- Handles variations in driver stacks and L4T versions automatically.
Usage examples
- “How much memory is currently in use on my Jetson?”
- The agent runs scripts/audit.sh and reports total memory, available memory, and the top process consumers from the JSON output.
- “I stopped my vLLM container but free -h still shows high usage. How do I fix this?”
- The agent identifies the JetPack version, explains the stuck memory issue, and runs scripts/drop_caches.sh to reclaim the cache and report the new available memory.
- “Did disabling the GUI actually free up memory?”
- The agent compares a baseline snapshot taken before the change with a new snapshot taken after, reporting the exact delta in available memory.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/nvidia/jetson-memory-audit/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip jetson-memory-audit.zip -d .agents/skills
Documentation by Jetson Team
Jetson Memory Audit
Read-only memory-focused snapshot for a Jetson, plus the drop_caches verify-loop helper that confirms freed memory actually shows up as free instead of cached.
Purpose
Measure current Jetson memory consumers, capture before/after baselines, and verify whether user-approved changes actually reclaimed DRAM. Use live device data rather than estimates from container size, model size, or generic process memory.
CRITICAL: Memory appears stuck after stopping vLLM / sglang (JetPack below 7.2 / L4T below r39.0)
This is the most common memory confusion on Jetson releases before JetPack 7.2 or before L4T r39.0.
After you stop a vLLM, sglang, or Ollama server (or any CUDA workload), the memory shown as free by free -h or tegrastats may not recover — even though the process is gone. nvidia-smi may also show misleadingly low free GPU memory.
Root cause: The Thor RM (resource manager) holds freed sysmem pages in its own pool after a CUDA context exits. On Unified Memory Architecture (UMA) devices like Jetson, cudaMemGetInfo reads RM pool state and reports far less free memory than is actually available to a new process.
Workaround (for JetPack below 7.2 or L4T below r39.0):
sudo sync && sudo sysctl -w vm.drop_caches=3Run this on the host, not inside a container. The important operation is sudo sysctl -w vm.drop_caches=3; keep sudo sync immediately before it so dirty data is flushed before reclaimable page/dentry/inode caches are dropped. After running it, free -h and tegrastats will reflect the true available memory.
For affected releases, recommend this command when a user says:
"Memory didn't free after I stopped vLLM/sglang"
"Why does tegrastats still show high usage after my container exited?"
"OOM even though nothing is running"
"Memory was fine yesterday but now it's full"
On JetPack below 7.2 or L4T below r39.0, drop_caches is the reliable workaround when memory appears stuck after a CUDA workload exits; on newer releases, use it only if the same symptom is observed and the user approves.
When to use
"How much memory is in use on this Jetson? What's holding it?"
"I disabled the GUI / stopped vLLM / quit my container — did memory actually free?"
"Why does
free -hstill show low free memory after I stopped my workload?"As the baseline before applying
jetson-headless-modeor other memory-related changes, and again after to compute the actual delta.
Prerequisites
Run on the Jetson host, or in a sandbox/container with host-visible
/proc,/etc/nv_tegra_release,tegrastats, and process data.NvMap debugfs reads may require root. If unavailable, report that GPU memory attribution is limited rather than guessing.
drop_caches.shrequires root or passwordlesssudo -n; run it only after the user explicitly authorizes cache dropping.
Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
scripts/audit.sh | Emits a JSON snapshot from jetson-diagnostic/scripts/snapshot.sh for memory audit workflows. | No arguments. |
scripts/drop_caches.sh | Flushes reclaimable page/dentry/inode caches and prints before/after memory deltas. | --mode 1|2|3, --quiet. |
If your agent runtime supports run_script, use it to run scripts/audit.sh or scripts/drop_caches.sh and summarize the returned output. Otherwise run the scripts with bash from the repository root.
Instructions
For "how much memory is in use right now?" questions, run scripts/audit.sh and report only values from the JSON snapshot.
Reporting guidance
Do not only print or mention the path to a helper. Invoke the helper and then summarize the returned data.
For "how much memory is in use" prompts, run
scripts/audit.shand quotemem_total_gb,memory_kb.available, and the leadingprocrank_topprocess ornvmap.top_clientsconsumer.For GUI/desktop memory prompts, run
scripts/audit.shand reportdefault_systemd_targetplus any display manager incandidate_services(gdm3,gdm,lightdm,sddm, ordisplay-manager). Do not disable anything; hand off tojetson-headless-modefor a plan.For prompts that explicitly authorize cache dropping after a stopped workload, run
scripts/drop_caches.sh(equivalent tosudo sync && sudo sysctl -w vm.drop_caches=3by default) and report its before/after free, available, and cached deltas. If root is unavailable, explain that it must be run on the host with sudo.
If your agent runtime does not execute helper scripts relative to this skill directory, resolve script paths with the AgentSkills {baseDir} placeholder:
{baseDir}/scripts/audit.sh
{baseDir}/scripts/drop_caches.shDo not call jetson-memory-audit as a tool name unless the runtime explicitly registers skills as callable tools; Agent Skills are normally instructions plus files, not direct tool functions.
Sandbox note for agents: seeing this skill file does not guarantee access to Jetson host memory data. If /proc/device-tree/model, /etc/nv_tegra_release, tegrastats, /sys/kernel/debug/nvmap, or host process data are missing inside a NemoClaw/OpenClaw sandbox, say the sandbox lacks Jetson host visibility and ask the user to run on the Jetson host or relaunch with a host-visible sandbox profile. Do not fabricate memory totals, available memory, PSS, NvMap, or reclamation deltas.
For "how much memory did this change free?" questions, use a before/after delta. Do not estimate freed memory from container size, image size, RSS, or a single post-change snapshot.
Before the change, run
scripts/audit.shand save the JSON baseline.Make the user-approved change (stop the container, switch mode, apply a tuning recommendation, etc.).
On JetPack below 7.2 / L4T below r39.0, or when the same stuck-memory symptom is observed on a newer release, flush reclaimable page cache on the host (not inside a container) so freed pages show up as free instead of cached:
sudo sync && sudo sysctl -w vm.drop_caches=3Re-run
scripts/audit.shand comparememory_kb.availablebefore vs after — that delta is the real reclamation.
If the user already made the change and no baseline exists, say that the exact freed amount cannot be recovered from the current snapshot alone. Capture a new baseline now so the next change can be measured.
Use live audit data as the source of truth. Memory totals, available memory, NvMap totals, PSS values, display-manager state, and savings deltas must come from scripts/audit.sh, free -h, or tegrastats on the actual device. If a number is not present in those outputs, do not guess it.
Output contract for audit.sh
{
"sku": "orin-nano",
"variant": "orin-nano-8gb",
"mem_total_gb": 8,
"l4t_version": "36.4.0",
"product_model": "nvidia jetson orin nano developer kit",
"memory_kb": { "total": 8123456, "available": 4123456, "free": 1023456, "cached": 1234567, "swap_total": 0, "swap_free": 0 },
"default_systemd_target": "graphical.target",
"candidate_services": { "gdm3": { "active": "active", "enabled": "enabled" } },
"tegrastats_sample": "RAM 4011/8138MB (lfb 8x4MB) ...",
"nvmap": { "readable": false, "total_kb": 0, "top_clients": [] },
"procrank_top": [ { "pid": 4321, "pss_kb": 4000000, "cmd": "vllm" } ]
}Limitations
Exact freed-memory deltas require a before snapshot, the user-approved change, cache flush when appropriate, and an after snapshot.
NvMap attribution depends on host-visible debugfs access; if it is unavailable, report limited GPU memory attribution instead of guessing.
Sandbox/container runs may not see host
/proc,tegrastats, systemd, or NvMap data unless the runtime exposes them.
Error handling
If
scripts/audit.shcannot access host Jetson data, report the missing visibility and ask to rerun on the Jetson host or in a host-visible sandbox.If
scripts/drop_caches.shlacks root or passwordlesssudo -n, report that cache dropping must be run on the host with sudo approval.If no before snapshot exists, say the exact reclaimed amount cannot be recovered from the current state alone and capture a new baseline for the next change.
Safety
Read-only. drop_caches is non-destructive (kernel only releases pages it could reclaim under pressure anyway; sync runs first to preserve dirty data).
Hand off to
jetson-headless-mode— biggest single user-space win on systems still bootinggraphical.target.jetson-inference-mem-tune— when a model server is the top NvMap / PSS consumer.If runtime changes cannot hit the target, report that further reclamation is outside this skill's scope rather than suggesting unsafe boot-time edits.
Files
- ATTRIBUTION.mdAdded by AutoGineer920 B
- BENCHMARK.md3.2 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md8.9 KiB
- evals/evals.json5.7 KiB
- references/DESIGN.md2.6 KiB
- scripts/audit.shScript2.7 KiB
- scripts/drop_caches.shScript3.4 KiB
- skill-card.md3.5 KiB
- skill.oms.sig5.2 KiB
LICENSE
Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Jetson Team
- Publisher
- NVIDIA (Official)
- Distributed by
- NVIDIA
- Source
- NVIDIA/skills · skills/jetson-memory-audit · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Jetson Team or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download jetson-memory-audit.zip