You are not logged in.

#1 2004-12-22 09:34:30

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

[kernel] lmbench

I'd really appreciate it if someone could build a package for lmbench - it requires internet access to download the source and i am internet cafe bound at the moment.

http://www.bitmover.com/lmbench/get_lmbench.html

lmbench is a kernel bench marking app.

if this package is created it would be great of some people could post their results with different patchsets - see Phrakture's "discussion"

Offline

#2 2005-01-05 10:30:33

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [kernel] lmbench

please!

Offline

#3 2005-01-05 10:30:46

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [kernel] lmbench

please!

Offline

#4 2005-01-05 23:22:45

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: [kernel] lmbench

This is a little weird thing :-)

I tried to follow gentoo ebuild and lmbench installation docs and this is what I produced so far (latest version):

pkgname=lmbench
pkgver=3.0a4
_lmbenchver=3.0-a4
pkgrel=1
pkgdesc="Suit of simple, portable benchmarks"
url="http://www.bitmover.com/lmbench/"
depends=('glibc' 'bash' 'perl')
source=(ftp://ftp.bitmover.com/lmbench/$pkgname-${_lmbenchver}.tgz 
http://mirror.reachable.ca/gentoo/portage/app-benchmarks/lmbench/files/bc_lm.pl 
http://mirror.reachable.ca/gentoo/portage/app-benchmarks/lmbench/files/bc-config)
md5sums=('641760af27929f3435f609787db96892' '25a33fad490151f7d1e8522b7795da7f'
         '1cddbfe67828e96db956b8b6535f44c0')

build() {

    cd $startdir/src

    sed -i "s#^my $distro =.*#my $distro = "`uname -r`";#" ./bc_lm.pl
    sed -i 's#^@files =#chdir "/usr/share/lmbench"; @files =#' ./bc_lm.pl
    sed -i "s#../../CONFIG#/etc/bc-config#g" ./bc_lm.pl

    cd $startdir/src/$pkgname-${_lmbenchver}

    make build || return 1

    cd $startdir/src/$pkgname-${_lmbenchver}/src

    make BASE=$startdir/pkg/usr install

    install -D -m755 $startdir/src/bc_lm.pl $startdir/pkg/usr/bin/bc_lm.pl
    install -D -m644 $startdir/src/bc-config $startdir/pkg/etc/bc-config

    install -d -m755 $startdir/pkg/usr/share/lmbench/src
    install -d -m777 $startdir/pkg/usr/share/lmbench/results
    install -d -m777 $startdir/pkg/usr/share/lmbench/bin
    install -d -m755 $startdir/pkg/usr/share/lmbench/scripts

    cd $startdir/src/$pkgname-${_lmbenchver}

    install -D -m644 src/webpage-lm.tar $startdir/pkg/usr/share/lmbench/src/webpage-lm.tar
    cp -R scripts/* $startdir/pkg/usr/share/lmbench/scripts

}

The package builds ok and lmbench should work but it was not designed to be packaged IMO. Normally you should run it with:

make results
or
make rerun

The above pkgbuild (just like gentoo ebuild) includes also a perl wrapper script for lmbench which should produce nice results and take care of everything. I had to use some gentoo mirror for source url because I coudn't find the script anywhere else.

To run everything do:

bc_lm.pl

Config is in /etc/bc-config

These are the commands that are run if you do make resutls or make rerun (you can check if they work "manually". we could make a simple script for them then. most probably problems may be the result of wrong paths which should be easy to correct):

results: lmbench
        @../scripts/config-run
        @BENCHMARK_HARDWARE=YES BENCHMARK_OS=YES ../scripts/results

rerun: lmbench
        @if [ ! -f $(CONFIG) ]; then ../scripts/config-run; fi
        @../scripts/results

Of course this is only part of the makefile so you should first cd to /usr/share/lmbench/scripts first.

I'm really tired today and it's late (again ;-)) so I can't check how it works. Please make some tests and tell me if this is ok or what's wrong (consider this an alpha version  roll which means don't beat me if something goes wrong...). You should also be able to use all tools separately but I don't know if this really works. I've found a gentoo forums thread which might (or not) help you:
http://forums.gentoo.org/viewtopic.php? … ht=lmbench

Good luck!

EDIT: gentoo ebuild:
http://gentoo-portage.com/ebuild?e=app- … ha3.ebuild

Offline

#5 2005-01-06 09:19:52

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: [kernel] lmbench

thanks lanrat - i think i may still need some time to explore this one myself!  big_smile

Offline

Board footer

Powered by FluxBB