Skip to content

Instantly share code, notes, and snippets.

@cverbiest
Created October 12, 2016 15:33
Show Gist options
  • Save cverbiest/9f5cda5a306c0fa856ebf6d46274a964 to your computer and use it in GitHub Desktop.
Save cverbiest/9f5cda5a306c0fa856ebf6d46274a964 to your computer and use it in GitHub Desktop.
Linux Enhanced proshut list, add process info
#/bin/bash
# Enhance proshut list, show process info for local processes, needs root access
#
proshut $1 -C list | awk '{ if (NR==1) { procinfo="process info"; } else if ($8 == "REMC" || $9=="REMC") { procinfo="remote process"; } else { procfile="/proc/"$2"/cmdline"; getline procinfo < procfile; procinfo = gensub(/\000/, " ", "g", procinfo); } print $0,procinfo ;}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment