dotfiles/home/private_dot_config/zsh/functions/top-cpu-user

3 lines
87 B
Bash

#!/usr/bin/env zsh
top -b -n 1 -u "$1" | awk 'NR>7 { sum += $9; } END { print sum; }'