Skip to content

Commit b0f09b1

Browse files
authored
chore(shell): Add mpstat and doc (#1889)
# Description See title. ## Related Issue If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request. ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/Contributing/overview). - [x] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [x] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed <img width="2539" height="975" alt="Screenshot 2025-09-26 153300" src="https://github.com/user-attachments/assets/f93c1d8e-a9c7-49eb-9a21-c677a8317596" /> <img width="1910" height="556" alt="Screenshot 2025-09-26 152236" src="https://github.com/user-attachments/assets/cf7a476d-6649-40ac-b816-166364f849fd" /> ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project.
1 parent 2369544 commit b0f09b1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/06-Troubleshooting/shell.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ ig -h
227227
ig run trace_dns:latest
228228
```
229229

230+
## [mpstat](https://www.man7.org/linux/man-pages/man1/mpstat.1.html)
231+
232+
Tool for detailed reporting of processor-related statistics. `mpstat` is useful for network troubleshooting because it shows how much CPU time is spent handling SoftIRQs, which are often triggered by network traffic, helping identify interrupt bottlenecks or imbalanced CPU usage. SoftIRQs (Software Interrupt Requests) are a type of deferred interrupt handling mechanism in the Linux kernel used to process time-consuming tasks—like network packet handling or disk I/O—outside the immediate hardware interrupt context, allowing faster and more efficient interrupt processing without blocking the system.
233+
234+
This example usage of `mpstat` monitors CPU usage statistics, specifically focusing on SoftIRQ usage, across all CPU cores, sampled every 1 second, for 5 intervals.
235+
236+
```shell
237+
mpstat -P ALL 1 5 | grep -E '(CPU|%soft|Average)'
238+
```
239+
230240
## Troubleshooting
231241

232242
### Timeouts

shell/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ RUN tdnf install -y \
2020
nmap \
2121
nmap-ncat \
2222
openssh \
23+
sysstat \
2324
socat \
2425
tcpdump \
2526
wget \

0 commit comments

Comments
 (0)