The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Filesystem mystery: disks are not busy on one machine, very busy on a similar box mschwage UNIX for Advanced & Expert Users 2 08-13-2009 01:56 PM
Script Help - Another Way To Write This gbxfan Shell Programming and Scripting 2 04-17-2009 02:01 PM
Should I write a PERL Script or Shell Script? mojoman UNIX for Dummies Questions & Answers 2 11-11-2008 03:54 PM
Help me to write the script gyana_cboy Shell Programming and Scripting 5 10-05-2007 02:19 AM
How to write script for this ? me_haroon AIX 0 07-01-2006 06:30 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-06-2009
rainbow_bean rainbow_bean is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 82
how to write a script to let cpu busy?

how to write a script to let cpu busy?
and how to write a script to let memory/disk busy?
  #2 (permalink)  
Old 10-06-2009
garethr garethr is offline
Registered User
  
 

Join Date: May 2009
Location: England
Posts: 89
This gets close :-)

dd if=/dev/urandom of=/dev/null &
dd if=/dev/urandom of=/dev/null &
dd if=/dev/urandom of=/dev/null &
(repeat for as many CPUs as you have)

nmon output:

Code:
x CPU-Utilisation-Small-View x
x                           0----------25-----------50----------75----------100                                                                             x
xCPU User%  Sys% Wait% Idle%|           |            |           |            |                                                                             x
x  0   2.5  76.5   0.0  21.0|Ussssssssssssssssssssssssssssssssssssss>         |                                                                             x
x  1   1.0  80.5   0.0  18.5|ssssssssssssssssssssssssssssssssssssssss         >                                                                             x
x  2   1.0  82.5   0.0  16.5|sssssssssssssssssssssssssssssssssssssssss  >     |                                                                             x
x  3   0.0  87.5   0.0  12.5|sssssssssssssssssssssssssssssssssssssssssss  >   |                                                                             x
xPhysical Averages          +-----------|------------|-----------|------------+                                                                             x
xAll   5.5  74.2   0.0  20.2|>Usssssssssssssssssssssssssssssssssssss          |                                                                             x
x                           +-----------|------------|-----------|------------+
  #3 (permalink)  
Old 10-06-2009
rainbow_bean rainbow_bean is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 82
Thank you! Very helpful.

How to do it on memory and disk I/O?
  #4 (permalink)  
Old 10-06-2009
garethr garethr is offline
Registered User
  
 

Join Date: May 2009
Location: England
Posts: 89
Well, I suppose you could try some of the "SPEC" tests, some of which are designed to measure maximum throughputs. (Others are designed to emulate typical business workloads.)

See: SPEC - Standard Performance Evaluation Corporation
  #5 (permalink)  
Old 10-06-2009
zxmaus's Avatar
zxmaus zxmaus is offline Forum Staff  
Moderator
  
 

Join Date: May 2008
Location: /etc/objrepos
Posts: 297
Hi,

try if nstress is doing what you like to do ?

IBM developerWorks: Wikis - AIX - nstress

Kind regards
zxmaus
  #6 (permalink)  
Old 10-07-2009
funksen funksen is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Location: Austria/Vienna
Posts: 430
you could use something like that:
spawns 2 bc processes per processor
Code:
#!/usr/bin/ksh
CPUCOUNT=$(($(lsdev -C | grep "[P]rocessor"| wc -l)*2))


while true
        do
                if [ $(ps -ef | grep -w "[d]c" | wc -l ) -lt $CPUCOUNT ]
                      then
                                ps -ef | grep -w "[d]c" | wc -l
                                echo 9999^9999 | bc >/dev/null 2>&1 &
                      fi
        done
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0