File: do_ctx

package info (click to toggle)
lmbench 3.0-a9%2Bdebian.1-3
  • links: PTS
  • area: non-free
  • in suites: bullseye
  • size: 2,752 kB
  • sloc: ansic: 12,328; perl: 6,531; sh: 3,965; makefile: 730
file content (37 lines) | stat: -rwxr-xr-x 698 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

# Make sure we can find: ./cmd, df, and netstat
BINDIR=${BINDIR:-..}
SCRIPTSDIR=${SCRIPTSDIR:-../scripts}
PATH=.:${SCRIPTSDIR}:${BINDIR}/bin/`${SCRIPTSDIR}/os`:$PATH:/etc:/usr/etc:/sbin:/usr/sbin
export PATH

if [ X$MB = X ]
then	MB=8
fi
AVAILKB=`expr $MB \* 1024`

# Figure out how big we can go for stuff that wants to use
# all and half of memory.
HALF="512 1k 2k 4k 8k 16k 32k 64k 128k 256k 512k 1m"
ALL="$HALF 2m"
i=4
while [ $i -le $MB ]
do
	ALL="$ALL ${i}m"
	h=`expr $i / 2`
	HALF="$HALF ${h}m"
	i=`expr $i \* 2`
done

msleep 250
if [ "X$CTX" = X ]
then	CTX="0 4 8 16 32 64"
fi
if [ "X$N" = X ]
then	N="2 4 8 16 24 32 64 96"
fi
for size in $CTX
do	lat_ctx -s $size $N
done
exit 0