Kernel version >= 2.6.27 check

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.
This commit is contained in:
Tim Bird 2009-05-22 12:41:07 -05:00
commit 67aee6e39d
2 changed files with 6 additions and 3 deletions

View file

@ -4,7 +4,7 @@
# 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
cp -a --parents /proc/[0-9]*/{smaps,cmdline,stat} /proc/meminfo /proc/version $1
# build a compressed tarball of snapshot
cd $1/proc