Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Created July 13, 2009 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericboehs/146372 to your computer and use it in GitHub Desktop.
Save ericboehs/146372 to your computer and use it in GitHub Desktop.
#!/bin/bash
PS=$(
ps auxc |
head -6 |
tail -5 |
awk '{
printf("%6s %s %s %6.2f%s", $2" ",$3"\t",$4"\t",$6/1024,"M\t");
for (i = 10 + 1; i <= NF; i++ )
printf("%s ", $i);
print "";
}'
);
echo " PID %CPU %MEM RSS CMD";
echo "$PS";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment