Welcome, guest! Login / Register - Why register?
[email protected] webmail now available. Want one? Go here.
Windows getting boring or just want to try something Open Source for your next Desktop Environment?! Go Zorin OS.

Paste

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