Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as Bash by registered user uwe ( 10 years ago )
#!/bin/bash
if [ ! -b "$1" ]; then
echo test.sh mountpoint prefix
fi
pre=${2:-tst}
echo using prefix: $pre
echo mounting
mount "$1" /mnt
if [ $? -ne 0 ]; then
echo something wrong
exit
fi
echo mkdir
mkdir -p /mnt/stats/$pre
echo sync
sync
echo wait 30 seconds
sleep 30
echo "start test (10 minutes)"
date > $pre.starttime
(dstat > $pre.dstat)&
(t=0; while sleep 10; do ((t+=10)); echo -en "$t/600\r"; done)&
timeout 600 find /mnt -path '*/[cn][ue][rw]/*' -ls > /mnt/stats/$pre/find
kill %1 %2
date > $pre.endtime
echo -n "count: "
wc -l /mnt/stats/$pre/find
wc -l /mnt/stats/$pre/find > $pre.count
umount "$1"
Revise this Paste