Add reading from alternate directory and tarball and example capture script
This commit is contained in:
parent
a7aa17b484
commit
000c1e0689
2 changed files with 50 additions and 9 deletions
12
capture
Executable file
12
capture
Executable 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 *
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue