Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as Bash by registered user uwe ( 12 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

Your Name: Code Language: