cheat:sar
---
tags: [ reporting ]
---
# Reports CPU utilization every 2 seconds, 5 times:
sar -u 2 5
# Report the CPU usage for a given core:
sar -P 1 1 3
# Reports the amount of memory used, amount of memory free, available cache, available buffers every 1 second, 3 times:
sar -r 1 3
# Reports statistics on swapping:
sar -S 1 3
# Reports on the file systems mounted every 2 seconds 5 times:
sar -F 2 5
# Reports on the block devices every 1 second, 3 times:
sar -d 1 3
# Reports on the network interface, network speed, IPV4, TCPV4, ICMP traffic and errors:
sar -n DEV 1 3 | grep -v lo
tldr:sar
# sar
# Monitor performance of various Linux subsystems.
# More information: <https://manned.org/sar>.
# Report I/O and transfer rate issued to physical devices, one per second (press CTRL+C to quit):
sar -b 1
# Report a total of 10 network device statistics, one per 2 seconds:
sar -n DEV 2 10
# Report CPU utilization, one per 2 seconds:
sar -u ALL 2
# Report a total of 20 memory utilization statistics, one per second:
sar -r ALL 1 20
# Report the run queue length and load averages, one per second:
sar -q 1
# Report paging statistics, one per 5 seconds:
sar -B 5
$
cheat.sh