Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-14-2006, 02:43 PM   #1
paranoid times
Registered: Jan 2005
Distribution: Fedora Core 3, 4
Posts: 135

Rep: Reputation: 16
Script to cause load average to increase

I want to test systems that are doing a lot of things. These things in particular are cpu usage, disk read/write, and network I/O. So I want a script to make the computer do all these things so that the average use of them all increases as much as possible. The CPU usage is easy enough I just have it adding numbers in an endless loop. However what I thought would cause the disk read/write to go up doesn't. I Have the script writing a number from a file, then writing it to a differnt file, then reading from that second file the number, then getting rid of the files and going around and around like this, but that doesn't seem to increase the average disk read/write. Also I'm not sure how to cause a lot of network I/O, should I just flood ping something and have something flood ping it?

Thanks for any help,

UPDATE: flood pinging the local loopback increases both the upload and download rates, though I'm still not sure how to get the disk activity up.

Last edited by paranoid times; 04-14-2006 at 02:45 PM.
Old 04-14-2006, 03:39 PM   #2
Senior Member
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
I think dd will do what you need. Have a look at the man page for it. You could read parts of the filesystem and output to /dev/null, or you could write 500 megs of junk to a file on the file system. That ought to produce disk activity

Examples (not tested):
Read from hdd:
$ dd if=/dev/hda1 of=/dev/null bs=1k count=500000
Write to hdd:
$ dd if=/dev/zero of=/somewhere/testfile bs=1k count=500000
Old 04-14-2006, 05:41 PM   #3
paranoid times
Registered: Jan 2005
Distribution: Fedora Core 3, 4
Posts: 135

Original Poster
Rep: Reputation: 16
Well I tried it out, but it doesn't seem to be raising the report of how many reads/writes in the proc directory...I wouldn't expect that it has anything to do with them being serial drives (sda, instead of hda) would it?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
load average? ampex189 Linux - Newbie 2 03-06-2005 07:17 PM
load average approaching 20 kfiralfia Linux - General 5 09-29-2004 09:35 AM
RH 8 load average is messed up Mike-BB Red Hat 1 07-30-2004 05:59 AM
Load average 1.0, 1.0, 1.0 ? belated Linux - Newbie 4 11-30-2003 03:49 PM
Average load Cyth Linux - General 1 01-22-2002 03:33 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration