Skip to content

Commit 0a7e93a

Browse files
chore: improving the step by step commands
1 parent 624e770 commit 0a7e93a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: blog/_posts/2025-04-07-troubleshooting-high-memory-consumption.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,17 @@ This section is important because this is where `cAdvisor` captures statistics f
140140

141141
We can inspect the memory statistics of the `cgroup` of the `pod` we used as an example by following the steps below.
142142

143-
Connect to the `pod`: `kubectl exec disk-writer -it -- bash`.
143+
- Connect to the `pod`.
144+
- Navigate to the directory of `cgroup` statistics.
145+
- List all memory-related files: ``
144146

145-
Navigate to the directory of `cgroup` statistics: `cd /sys/fs/cgroup`.
147+
```sh
148+
kubectl exec YOU-POD-NAME -it -- bash
149+
cd /sys/fs/cgroup
150+
ls | grep -e memory.stat -e memory.current
151+
```
146152

147-
List all memory-related files: `ls | grep -e memory.stat -e memory.current`.
153+
The location and schema of those files can change depending on the `Distribution` and `Kernel Version`. If everything went well you'll see a result as bellow:
148154

149155
```sh
150156
memory.current

0 commit comments

Comments
 (0)