Skip to content

Commit f8bfcbe

Browse files
committed
Style fixes perf
1 parent 85a1872 commit f8bfcbe

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

scenarios/ObtainPerformanceMetricsLinuxSustem/obtain-performance-metrics-linux-system.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ The metrics collected are:
573573
* Look for single processes with high read/write rates per second. This information is a guidance for processes with I/O more than identifying issues.
574574
Note: the `--human` option can be used to display numbers in human readable format (that is, `Kb`, `Mb`, `GB`).
575575

576-
### `ps`
576+
### Top CPU processes
577577

578578
Lastly `ps` command displays system processes, and can be either sorted by CPU or Memory.
579579

@@ -599,6 +599,7 @@ root 2186 42.0 0.0 73524 5836 pts/1 R+ 16:55 0:06 stress-ng --c
599599
root 2191 41.2 0.0 73524 5592 pts/1 R+ 16:55 0:06 stress-ng --cpu 12 --vm 2 --vm-bytes 120% --iomix 4 --timeout 240
600600
```
601601

602+
## Top memory processes
602603
To sort by `MEM%` and obtain the top 10 processes:
603604

604605
```azurecli-interactive
@@ -634,13 +635,4 @@ echo "$extracted"
634635

635636
To run, you can create a file with the above contents, add execute permissions by running `chmod +x gather.sh`, and run with `sudo ./gather.sh`.
636637

637-
This script saves the output of the commands in a file located in the same directory where the script was invoked.
638-
639-
Additionally, all the commands in the bash block codes covered in this document, can be run through `az-cli` using the run-command extension, and parsing the output through `jq` to obtain a similar output to running the commands locally: `
640-
641-
```azurecli-interactive
642-
output=$(az vm run-command invoke -g $MY_RESOURCE_GROUP_NAME --name $MY_VM_NAME --command-id RunShellScript --scripts "ls -l /dev/disk/azure")
643-
value=$(echo "$output" | jq -r '.value[0].message')
644-
extracted=$(echo "$value" | awk '/\[stdout\]/,/\[stderr\]/' | sed '/\[stdout\]/d' | sed '/\[stderr\]/d')
645-
echo "$extracted"
646-
```
638+
This script saves the output of the commands in a file located in the same directory where the script was invoked.

0 commit comments

Comments
 (0)