File: proc_maps_size.sh

package info (click to toggle)
dmtcp 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,496 kB
  • sloc: cpp: 33,592; ansic: 28,099; sh: 6,735; makefile: 1,950; perl: 1,690; python: 1,241; asm: 138; java: 13
file content (8 lines) | stat: -rwxr-xr-x 299 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
#!/bin/bash

if [ -z "$1" ]; then
    echo " Not enough params. Wand process PID"
fi

cat /proc/$1/maps | awk '{ if( $6 == "" ) print "anonym "$1; else print $6" "$1 }' | awk '{ split($2,array,"-"); print $1" 0x"array[2]" 0x"array[1] }' \
        | awk --non-decimal-data '{ print $1": "($2 - $3) }'