Skip to content

Commit 2ff6d7b

Browse files
committed
2 parents e808582 + 84e7e6f commit 2ff6d7b

1 file changed

Lines changed: 24 additions & 17 deletions

File tree

support/azure/azure-kubernetes/availability-performance/identify-memory-saturation-aks.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -167,24 +167,31 @@ For advanced process level memory analysis, use [Inspektor Gadget](https://go.mi
167167

168168
1. Install Inspektor Gadget using the instructions found in the [documentation](/troubleshoot/azure/azure-kubernetes/logs/capture-system-insights-from-aks#how-to-install-inspektor-gadget-in-an-aks-cluster)
169169

170-
2. Run the [top_process gadget](https://aka.ms/igtopprocess) to identify processes that are using large amounts of memory. You can use `--fields` to select certain columns and can filter events based on specific field values, for example the pod names of previously identified pods with high memory consumption. You can also
171-
- Identify top memory-consuming processes across the cluster
172-
- Identify top memory-consuming processes on a specific node
173-
- Identify top memory-consuming processes on a specific namespace
170+
2. Run the [top_process gadget](https://aka.ms/igtopprocess) to identify processes that are using large amounts of memory. You can use `--fields` to select certain columns and `--filter` to filter events based on specific field values, for example the pod names of previously identified pods with high memory consumption. You can also:
174171

175-
```bash
176-
# Run top_process across the cluster
177-
kubectl gadget run top_process --sort memoryRelative --max-entries 12
178-
179-
# Monitor processes on a specific pod
180-
kubectl gadget run top_process --sort memoryRelative --podname <pod-name>
181-
182-
# Monitor processes on a specific node
183-
kubectl gadget run top_process --sort memoryRelative --node <node-name>
184-
185-
# Monitor processes in a specific namespace
186-
kubectl gadget run top_process --sort memoryRelative --namespace <namespace>
187-
```
172+
- Identify top 10 memory-consuming processes across the cluster:
173+
174+
```bash
175+
kubectl gadget run top_process --sort -memoryRelative --max-entries 10
176+
```
177+
178+
- Identify top memory-consuming processes on a specific node:
179+
180+
```bash
181+
kubectl gadget run top_process --sort -memoryRelative --filter k8s.node==<node-name>
182+
```
183+
184+
- Identify top memory-consuming processes in a specific namespace:
185+
186+
```bash
187+
kubectl gadget run top_process --sort -memoryRelative --filter k8s.namespace==<namespace>
188+
```
189+
190+
- Identify top memory-consuming processes in a specific pod:
191+
192+
```bash
193+
kubectl gadget run top_process --sort -memoryRelative --filter k8s.podName==<pod-name>
194+
```
188195

189196
The output of the Inspektor Gadget `top_process` command resembles the following:
190197

0 commit comments

Comments
 (0)