Skip to content

Instantly share code, notes, and snippets.

@slugonamission
Last active March 3, 2016 23:19
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slugonamission/5034551 to your computer and use it in GitHub Desktop.
Save slugonamission/5034551 to your computer and use it in GitHub Desktop.
Adding "99 problems, 0 bitches" to top's Tasks line
=============== START OF DIFF ========================
--- temp/procps-3.2.8/top.h 2006-06-25 07:41:48.000000000 +0100
+++ procps-3.2.8/top.h 2013-02-25 22:56:29.000000000 +0000
@@ -382,7 +382,7 @@
#define LOADAV_line "%s -%s\n"
#define LOADAV_line_alt "%s\06 -%s\n"
#define STATES_line1 "Tasks:\03" \
- " %3u \02total,\03 %3u \02running,\03 %3u \02sleeping,\03 %3u \02stopped,\03 %3u \02zombie\03\n"
+ " %3u \02total,\03 %3u \02running,\03 %3u \02sleeping,\03 %3u \02stopped,\03 %3u \02zombie,\03 99 \02problems,\03 0 \02bitches\03\n"
#define STATES_line2x4 "%s\03" \
" %#5.1f%% \02user,\03 %#5.1f%% \02system,\03 %#5.1f%% \02nice,\03 %#5.1f%% \02idle\03\n"
#define STATES_line2x5 "%s\03" \
================== END OF DIFF =======================
Or, the shorter version, change the end of the line after STATES_line1
in top.h to be ",\03 99 \02problems,\03 0 \02bitches\03\n" rather than "\03\n"
Get the procps tools from http://procps.sourceforge.net/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment