Show top processes by CPU

Sort processes by CPU usage and show the first 15 lines.

ps aux --sort=-%cpu | head -15

tool
linux133 commands
tags
linuxmonitoring

More linux commands

  • ps aux --sort=-%mem | head -15

    Sort processes by memory usage and show the first 15 lines.

  • journalctl -u <service> -f --since '10 minutes ago'

    Show the last 10 minutes of a unit's logs and keep printing new lines.

  • systemctl status <service> --no-pager -l

    Show the service state, main PID and recent log lines without cutting long lines.

  • tcpdump -i eth0 -nn host <ip> and port 80 -w /tmp/capture.pcap

    Write traffic to and from one IP on port 80 into a pcap file.

  • df -i | sort -k5 -rn

    Show inode usage per filesystem. When inodes run out, you get "No space left on device" while the disk still has free space.

all 133 linux commands