Jeff Schroeder wrote: > Awesome tool! I learned about this from the LWN article and > immediately (stupidly) tried it out on a centos 5 host. Here is a > patch to add a kernel version check. This is a nice fix, but the version check should be done against the proc data being used (which is not necessarily that of the local kernel). This required moving kernel_version_check to after where the src data is read.
12 lines
300 B
Bash
Executable file
12 lines
300 B
Bash
Executable file
#!/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 /proc/version $1
|
|
|
|
# build a compressed tarball of snapshot
|
|
cd $1/proc
|
|
tar czf ../../$1.tgz *
|
|
|