#!/bin/sh
# Script to launch the tracedaemon

TRACER=""

# check for args
if [ $# -ne 2 ]; then
	echo "Usage: ${0##*/} <seconds> <output file basename>"
	exit 1
fi

# check if this is a 2.4 kernel (without relayfs)
if grep "version 2.4" /proc/version >/dev/null; then 
	TRACER=/dev/tracer
fi

# activate tracedaemon
tracedaemon -ts$1 $TRACER $2.trace $2.proc
