003 File Manager
Current Path:
/usr/src/usr.bin/lastcomm/tests
usr
/
src
/
usr.bin
/
lastcomm
/
tests
/
📁
..
📄
Makefile
(563 B)
📄
Makefile.depend
(176 B)
📄
README
(426 B)
📄
legacy_test.sh
(846 B)
📄
v1-amd64-acct.in
(1.53 KB)
📄
v1-amd64.out
(1.86 KB)
📄
v1-i386-acct.in
(1.31 KB)
📄
v1-i386.out
(1.89 KB)
📄
v1-sparc64-acct.in
(1.53 KB)
📄
v1-sparc64.out
(1.92 KB)
📄
v2-amd64-acct.in
(1.97 KB)
📄
v2-amd64.out
(1.89 KB)
📄
v2-i386-acct.in
(1.75 KB)
📄
v2-i386.out
(1.89 KB)
📄
v2-sparc64-acct.in
(2.53 KB)
📄
v2-sparc64.out
(2.45 KB)
📄
values.sh
(1.51 KB)
Editing: values.sh
#!/bin/sh # # $FreeBSD$ # ACCT=acct RESULTS=acct.`uname -m`.tar.gz TMPDIR=$$.tmp TZ=UTC; export TZ run() { /usr/bin/time -l -o $1.time "$@" } if [ `whoami` != "root" ]; then echo "You need to be root to run this test." exit 1 fi echo Redirecting accounting. mkdir $TMPDIR cd $TMPDIR :>$ACCT accton $ACCT echo Running commands. This should not take more than 30s. # User time run awk 'BEGIN {for (i = 0; i < 1000000; i++) cos(.3)}' /dev/null run egrep '(.)(.)(.)(.)(.)(.)(.)(.)(.)\9\8\7\6\5\4\3\2\1' /usr/share/dict/words # System time run find /usr/src -name xyzzy # Elapsed time run sleep 3 # IO run dd if=/dev/zero bs=512 count=4096 of=zero 2>/dev/null # Memory run diff /usr/share/dict/words /dev/null >/dev/null # AC_COMM_LEN - 1 ln /usr/bin/true 123456789012345 run ./123456789012345 # AC_COMM_LEN ln /usr/bin/true 1234567890123456 run ./1234567890123456 # AC_COMM_LEN + 1 ln /usr/bin/true 12345678901234567 run ./12345678901234567 # Flags: core, fork, signal echo 'main(){volatile int s; fork(); s = *(int *)0;}' >core.c cc -o core core.c echo Generating segmentation fault. ./core echo Turning off redirected accounting. accton echo Packing the results. sa -u $ACCT >sa.u lastcomm -cesuS -f $ACCT >lastcomm.cesuS tar -cf - acct sa.u lastcomm.cesuS *.time | gzip -c | uuencode $RESULTS >../$RESULTS.uue echo Cleaning up. cd .. rm -rf $TMPDIR echo "Done! Please send your reply, enclosing the file $RESULTS.uue" echo If your system runs with accounting enabled you probably need to run: echo accton /var/account/acct
Upload File
Create Folder