3 # usttrace by Pierre-Marc Fournier 2009
4 # Distributed under the GPLv2.
7 LIBINTERFORK
="./libinterfork/.libs/libinterfork.so"
9 BASE_TRACE_DIR
="$HOME/.usttraces"
12 echo "usage: $0 COMMAND" 2>/dev
/stderr
16 echo "$0: error: $1" 2>/dev
/stderr
25 error
"no home specified"
30 error
"no command specified"
35 # Create directory for trace output
36 DATESTRING
="$(hostname)-$(date +%Y%m%d%H%M%S)"
37 OUTDIR
="$BASE_TRACE_DIR/$DATESTRING"
41 SOCKPATH
="/tmp/ust-sock-$$"
44 $USTD -s "$SOCKPATH" -o "$OUTDIR" >"$OUTDIR/ustd.log" 2>&1 &
47 # Establish the environment for the command
49 export UST_AUTOPROBE
=1
50 export UST_DAEMON_SOCKET
="$SOCKPATH"
55 ## Because of the keepalive mechanism, we're sure that by the time
56 ## we get here, the daemon is connected to all the buffers that still exist.
57 ## Therefore we can politely ask it to die when it's done.
59 kill -SIGTERM "$USTDPID"
61 # Tell the daemon to die
62 echo "Waiting for ustd to shutdown..."
This page took 0.046024 seconds and 6 git commands to generate.