Skip to content

Instantly share code, notes, and snippets.

@Mikhael-Danilov
Created October 16, 2018 12:56
Show Gist options
  • Save Mikhael-Danilov/2eaee8516739280a2535884ffe9a971f to your computer and use it in GitHub Desktop.
Save Mikhael-Danilov/2eaee8516739280a2535884ffe9a971f to your computer and use it in GitHub Desktop.
Memory mapping counter
!#/bin/bash
maxn=0
for fn in /proc/*; do
if [ -e $fn/maps ] ; then
n=$(cat $fn/maps | wc -l)
if [ $n -gt $maxn ] ; then
maxn=$n
echo $fn "->" $n
cat $fn/cmdline
echo "\n"
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment