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