158dbc507SJonathan Haslam#!/bin/ksh -p 258dbc507SJonathan Haslam# 358dbc507SJonathan Haslam# CDDL HEADER START 458dbc507SJonathan Haslam# 558dbc507SJonathan Haslam# The contents of this file are subject to the terms of the 658dbc507SJonathan Haslam# Common Development and Distribution License (the "License"). 758dbc507SJonathan Haslam# You may not use this file except in compliance with the License. 858dbc507SJonathan Haslam# 958dbc507SJonathan Haslam# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 1058dbc507SJonathan Haslam# or http://www.opensolaris.org/os/licensing. 1158dbc507SJonathan Haslam# See the License for the specific language governing permissions 1258dbc507SJonathan Haslam# and limitations under the License. 1358dbc507SJonathan Haslam# 1458dbc507SJonathan Haslam# When distributing Covered Code, include this CDDL HEADER in each 1558dbc507SJonathan Haslam# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1658dbc507SJonathan Haslam# If applicable, add the following below this CDDL HEADER, with the 1758dbc507SJonathan Haslam# fields enclosed by brackets "[]" replaced with your own identifying 1858dbc507SJonathan Haslam# information: Portions Copyright [yyyy] [name of copyright owner] 1958dbc507SJonathan Haslam# 2058dbc507SJonathan Haslam# CDDL HEADER END 2158dbc507SJonathan Haslam# 2258dbc507SJonathan Haslam 2358dbc507SJonathan Haslam# 2458dbc507SJonathan Haslam# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2558dbc507SJonathan Haslam# Use is subject to license terms. 2658dbc507SJonathan Haslam# 2758dbc507SJonathan Haslam 2858dbc507SJonathan Haslamif [ $# != 1 ]; then 2958dbc507SJonathan Haslam echo expected one argument: '<'dtrace-path'>' 3058dbc507SJonathan Haslam exit 2 3158dbc507SJonathan Haslamfi 3258dbc507SJonathan Haslam 3358dbc507SJonathan Haslamdtrace=$1 3458dbc507SJonathan Haslam 3558dbc507SJonathan Haslam# 36*bbf21555SRichard Lowe# Make sure we kill a process if the dtrace(8) command fails. 3758dbc507SJonathan Haslam# 3858dbc507SJonathan Haslam 3958dbc507SJonathan Haslamrc=`$dtrace -c date -n jarod 2>/dev/null | /usr/bin/wc -l` 4058dbc507SJonathan Haslam 4158dbc507SJonathan Haslamexit $rc 42