1*11237SJonathan.Haslam@Sun.COM#!/bin/ksh -p 2*11237SJonathan.Haslam@Sun.COM# 3*11237SJonathan.Haslam@Sun.COM# CDDL HEADER START 4*11237SJonathan.Haslam@Sun.COM# 5*11237SJonathan.Haslam@Sun.COM# The contents of this file are subject to the terms of the 6*11237SJonathan.Haslam@Sun.COM# Common Development and Distribution License (the "License"). 7*11237SJonathan.Haslam@Sun.COM# You may not use this file except in compliance with the License. 8*11237SJonathan.Haslam@Sun.COM# 9*11237SJonathan.Haslam@Sun.COM# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*11237SJonathan.Haslam@Sun.COM# or http://www.opensolaris.org/os/licensing. 11*11237SJonathan.Haslam@Sun.COM# See the License for the specific language governing permissions 12*11237SJonathan.Haslam@Sun.COM# and limitations under the License. 13*11237SJonathan.Haslam@Sun.COM# 14*11237SJonathan.Haslam@Sun.COM# When distributing Covered Code, include this CDDL HEADER in each 15*11237SJonathan.Haslam@Sun.COM# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*11237SJonathan.Haslam@Sun.COM# If applicable, add the following below this CDDL HEADER, with the 17*11237SJonathan.Haslam@Sun.COM# fields enclosed by brackets "[]" replaced with your own identifying 18*11237SJonathan.Haslam@Sun.COM# information: Portions Copyright [yyyy] [name of copyright owner] 19*11237SJonathan.Haslam@Sun.COM# 20*11237SJonathan.Haslam@Sun.COM# CDDL HEADER END 21*11237SJonathan.Haslam@Sun.COM# 22*11237SJonathan.Haslam@Sun.COM 23*11237SJonathan.Haslam@Sun.COM# 24*11237SJonathan.Haslam@Sun.COM# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 25*11237SJonathan.Haslam@Sun.COM# Use is subject to license terms. 26*11237SJonathan.Haslam@Sun.COM# 27*11237SJonathan.Haslam@Sun.COM 28*11237SJonathan.Haslam@Sun.COMif [ $# != 1 ]; then 29*11237SJonathan.Haslam@Sun.COM echo expected one argument: '<'dtrace-path'>' 30*11237SJonathan.Haslam@Sun.COM exit 2 31*11237SJonathan.Haslam@Sun.COMfi 32*11237SJonathan.Haslam@Sun.COM 33*11237SJonathan.Haslam@Sun.COMdtrace=$1 34*11237SJonathan.Haslam@Sun.COM 35*11237SJonathan.Haslam@Sun.COM# 36*11237SJonathan.Haslam@Sun.COM# Make sure we kill a process if the dtrace(1M) command fails. 37*11237SJonathan.Haslam@Sun.COM# 38*11237SJonathan.Haslam@Sun.COM 39*11237SJonathan.Haslam@Sun.COMrc=`$dtrace -c date -n jarod 2>/dev/null | /usr/bin/wc -l` 40*11237SJonathan.Haslam@Sun.COM 41*11237SJonathan.Haslam@Sun.COMexit $rc 42