0

I have created a script which reads the number of HDD's attached then runs a speed test on them using HDDParm

for i in `seq -s' ' $from $hddcount`
do
    # read and cache read speed test
    sudo hdparm -tT ${hd[$i]} >> /var/www/HDD_Test/Logs/Current/Bay$i/`basename ${hd[$i]}`_speed_test.txt
done

This works fine but it runs the test one by one which is ok for the speed test to get a true figure, but I now want to run a short SMART check using smartctl.

I want it to run simultaneously on all the HDD's attached, not one at a time. Anyone have any ideas or pointers on how to do this? Would it be a simple case of running them in the background with the & notation?

1 Answer 1

2

Why not just put it in the background using & ? See this SO question for more info.

Sign up to request clarification or add additional context in comments.

1 Comment

yes I just thought of that, I just wanted to make sure it would work correctly before jumping in with both feet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.