I have developed a concept which reduces the power consumption and uptime of my network attached storage.
The system is therefore intelligent because it is recognizing that its needed or not on its own and sets to standby.There are many methods out there how to do that but none of them worked for me quiet well because the system turned off when i was coping files what was not really meant to be. For doing it my way i am using simple bash scripts which i would like to share with you and explain.
Posted in Deutsch, English, linux, shell, ubuntu-planet |
Tagged Aktion, automatisch, before, Checks, Connected, consumption, done, Entwurf, etherwake, ethtool, grep, hibernate, Intelligent, Laufzeiten, Methoden, NAS, NAS-Systeme Ich, network attached storage, power, root, sbin, script, Sep, Server, Service, smbstatus, Standby, Strom, suspend, wake, wake-on-lan, wakeonlan, zeit |
If you want to know how performing you hard drive is you have to install
Using Debian and it derivatives its just:
# apt-get install bonnie++
After the installation create an empty folder on the drive you want to test. Bonnie++ will create temporary random content there while the benchmark is running.
Because i am having just one drive in my notebook the decision wasn’t really hard. The Partition / is nearly full so i used /home.
# mkdir /home/tmp
Now we can let bonnie++ attack the directory
. For having the needed permissions i had to run bonnie++ as root. # bonnie++ -u root -d /home/tmp/
Now this will take a bit time but you will get a lot of information. (much more then a Windows application can process). When the process is done you should get some output like that:
(Please do not rate my benchmark. It was done under load)
bonnie++ -u root -d /home/tmp/
Using uid:0, gid:0.
Writing a byte at a time...done
Reading a byte at a time...done
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
srv-rs-dk 4G 620 98 67046 11 36145 7 2149 93 87481 9 187.5 5
Latency 13896us 621ms 1733ms 61811us 160ms 5080ms
Version 1.96 ------Sequential Create------ --------Random Create--------
srv-rs-dk -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
Latency 14986us 677us 1194us 729us 4487us 746us
Well this might disturb you but: Don’t Panic!
Per Char 4G has been written with 620 K/sec and an CPU-Usage of 98%
Per Block 4G has been written with 67046 K/sec and an CPU-Usage of 11%
Per Rewrite 4G has been written with 36145 K/sec and an CPU-Usage of 7%
Sequentiell Input done with 2149 K/sec and an CPU-Usage of 9%
Random done with 187,5 K/sec and an CPU-Usage of 5%
Posted in Deutsch, English, linux, shell |
Tagged Benchmark, bonnie, Debian, done, English, Festplatte, file, Hard Drive, HDD, intelligently, linux, max, min, Mint, read, reading, root, SSD, Ubuntu, write |
Diesen Artikel gibt es auch in Deutsch!
This is a short How-to for a while loop which echoes “LOOP!” : while(true)
do echo "LOOP!"
while: starts the loop (in the brackets there is the constraint). Because an undefined variable is always “true” the loop will restart endless.
do: Contains what the loop should do. For this example it echoes “Loop!”.
sleep – The script wait X second before continuing. (3 seconds here). X
done – Ends the loop
You can save the script and run it in shell using
“bash SCRIPTNAME” or use “chmod a+x” to make it runnable and start it by clicking at it.
Posted in bash, coding, Deutsch, English |
Tagged bash, Bedingung, chmod, chmod a+x, do, done, echo, endless, endlos, English, false, how, How to, Klammern, loop, mal eine kurze, schleife, script, sleep, to, true, Variable, while |