Skip to content

Instantly share code, notes, and snippets.

@jettero
Created January 22, 2014 20:34
Show Gist options
  • Select an option

  • Save jettero/8566876 to your computer and use it in GitHub Desktop.

Select an option

Save jettero/8566876 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
for my $pid (1..32000) {
if( open IN, "/proc/$pid/cmdline" ) {
my @x = <IN>;
my $x = `ps $pid | tail -n +2`;
s/[^\/\.\-\_\d\w]/ / for @x;
print "$pid: @x\n" unless $x;
}
close IN;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment