Add reading from alternate directory and tarball and example capture script

This commit is contained in:
Matt Mackall 2009-04-06 22:48:01 -07:00
commit 000c1e0689
2 changed files with 50 additions and 9 deletions

12
capture Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
# example of capturing target data for smem
# capture a memory data snapshot with realtime priority
mkdir -p $1
chrt --fifo 99 \
cp -a --parents /proc/[0-9]*/{smaps,cmdline,stat} /proc/meminfo $1
# build a compressed tarball of snapshot
cd $1/proc
tar czf ../../$1.tgz *