Friday, May 14, 2010

My 1st Dtrace script!

Dtracing the oracle user to see what whacky commands it lauches at crsctl stop/start:

argsnoop.d -->
#!/usr/bin/sh

/usr/sbin/dtrace -wn '

inline int OPT_timestr = '1';

#pragma D option quiet
#pragma D option switchrate=10

syscall::exec:return, syscall::exece:return
/uid == 900/
{
OPT_timestr ? printf("%-20Y ", walltimestamp) : 1;
stop();
system("pargs -l %d", pid);
system("prun %d", pid);
}
'

No comments: