1*7556SAndrew.W.Wilson@sun.com# 2*7556SAndrew.W.Wilson@sun.com# CDDL HEADER START 3*7556SAndrew.W.Wilson@sun.com# 4*7556SAndrew.W.Wilson@sun.com# The contents of this file are subject to the terms of the 5*7556SAndrew.W.Wilson@sun.com# Common Development and Distribution License (the "License"). 6*7556SAndrew.W.Wilson@sun.com# You may not use this file except in compliance with the License. 7*7556SAndrew.W.Wilson@sun.com# 8*7556SAndrew.W.Wilson@sun.com# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*7556SAndrew.W.Wilson@sun.com# or http://www.opensolaris.org/os/licensing. 10*7556SAndrew.W.Wilson@sun.com# See the License for the specific language governing permissions 11*7556SAndrew.W.Wilson@sun.com# and limitations under the License. 12*7556SAndrew.W.Wilson@sun.com# 13*7556SAndrew.W.Wilson@sun.com# When distributing Covered Code, include this CDDL HEADER in each 14*7556SAndrew.W.Wilson@sun.com# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*7556SAndrew.W.Wilson@sun.com# If applicable, add the following below this CDDL HEADER, with the 16*7556SAndrew.W.Wilson@sun.com# fields enclosed by brackets "[]" replaced with your own identifying 17*7556SAndrew.W.Wilson@sun.com# information: Portions Copyright [yyyy] [name of copyright owner] 18*7556SAndrew.W.Wilson@sun.com# 19*7556SAndrew.W.Wilson@sun.com# CDDL HEADER END 20*7556SAndrew.W.Wilson@sun.com# 21*7556SAndrew.W.Wilson@sun.com# 22*7556SAndrew.W.Wilson@sun.com# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23*7556SAndrew.W.Wilson@sun.com# Use is subject to license terms. 24*7556SAndrew.W.Wilson@sun.com# 25*7556SAndrew.W.Wilson@sun.com 26*7556SAndrew.W.Wilson@sun.com# 27*7556SAndrew.W.Wilson@sun.com# Creates a fileset of $nfiles number of files, then loops through them 28*7556SAndrew.W.Wilson@sun.com# using $nthreads number of threads, doing "stat" calls on each file. 29*7556SAndrew.W.Wilson@sun.com# 30*7556SAndrew.W.Wilson@sun.com 31*7556SAndrew.W.Wilson@sun.comset $dir=/tmp 32*7556SAndrew.W.Wilson@sun.comset $nfiles=10000 33*7556SAndrew.W.Wilson@sun.comset $meandirwidth=20 34*7556SAndrew.W.Wilson@sun.comset $filesize=128k 35*7556SAndrew.W.Wilson@sun.comset $nthreads=20 36*7556SAndrew.W.Wilson@sun.com 37*7556SAndrew.W.Wilson@sun.comdefine fileset name=bigfileset,path=$dir,size=$filesize,entries=$nfiles,dirwidth=$meandirwidth,prealloc=100 38*7556SAndrew.W.Wilson@sun.com 39*7556SAndrew.W.Wilson@sun.comdefine process name=examinefiles,instances=1 40*7556SAndrew.W.Wilson@sun.com{ 41*7556SAndrew.W.Wilson@sun.com thread name=examinefilethread, memsize=10m,instances=$nthreads 42*7556SAndrew.W.Wilson@sun.com { 43*7556SAndrew.W.Wilson@sun.com flowop statfile name=statfile1,filesetname=bigfileset 44*7556SAndrew.W.Wilson@sun.com } 45*7556SAndrew.W.Wilson@sun.com} 46*7556SAndrew.W.Wilson@sun.com 47*7556SAndrew.W.Wilson@sun.comecho "Stat File Version 1.0 personality successfully loaded" 48*7556SAndrew.W.Wilson@sun.comusage "Usage: set \$dir=<dir> defaults to $dir" 49*7556SAndrew.W.Wilson@sun.comusage " set \$filesize=<size> defaults to $filesize" 50*7556SAndrew.W.Wilson@sun.comusage " set \$nfiles=<value> defaults to $nfiles" 51*7556SAndrew.W.Wilson@sun.comusage " set \$nthreads=<value> defaults to $nthreads" 52*7556SAndrew.W.Wilson@sun.comusage " set \$meandirwidth=<size> defaults to $meandirwidth" 53*7556SAndrew.W.Wilson@sun.comusage "(sets mean dir width and dir depth is calculated as log (width, nfiles)" 54*7556SAndrew.W.Wilson@sun.comusage " " 55*7556SAndrew.W.Wilson@sun.comusage " run runtime (e.g. run 60)" 56