Sponsored Content
Operating Systems AIX how to write a script to let cpu busy? Post 302359365 by garethr on Tuesday 6th of October 2009 11:11:02 AM
Old 10-06-2009
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                           +-----------|------------|-----------|------------+

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

2. Solaris

Multi CPU Solaris system shows 100% CPU usage.

Hello Friends, On one of my Solaris 10 box, CPU usage shows 100% using "sar", "vmstat". However, it has 4 CPUs and prstat and glance are not showing enough processes to justify high CPU utilization. ========================================================================= $ prstat -a ... (4 Replies)
Discussion started by: mahive
4 Replies

3. UNIX for Advanced & Expert Users

Filesystem mystery: disks are not busy on one machine, very busy on a similar box

Hi, We have a filesystem mystery on our hands. Given: 2 machines, A and Aa. Machine Aa is the problem machine. Machine A is running Ubuntu, kernel 2.6.22.9 #1 SMP Wed Feb 20 08:46:16 CST 2008 x86_64 GNU/Linux. Machine Aa is running RHEL5.3, kernel 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38... (2 Replies)
Discussion started by: mschwage
2 Replies

4. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

5. Shell Programming and Scripting

Freeing the terminal from busy shell script?

Hi guys, I wrote a basic inotifywait shell script on my CentOS 5.6 x86_64 test server that syncs any deleted files in a directory. /usr/bin/script #!/bin/sh inotifywait -m -e delete /home/user/test | while read file; do # log event here done The script alone works fine. However, the... (4 Replies)
Discussion started by: TECK
4 Replies

6. Shell Programming and Scripting

Cpu utilization script

I have a set of requirement 1)cpu utilization on a server with pid and and process name. It should display the above and also the script should have an option to record the cpu utilization for a given period of time first part i can get with below commands ps -eo pcpu,pid,user,args or... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies

7. Shell Programming and Scripting

Shell script to calculate the max cpu usage from the main script

Hi All, I have a script which does report the cpu usuage, there are few output parameter/fields displayed from the script. My problem is I have monitor the output and decide which cpu number (column 2) has maximum value (column 6). Since the output is displayed/updated every seconds, it's very... (1 Reply)
Discussion started by: Optimus81
1 Replies

8. Shell Programming and Scripting

CPU usage script

Hello Friends, I am trying to create a shell script which will check the CPU utilization. I use command top to check the %CPU usage. It give s me below output Cpu states: CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS 0 0.31 9.6% 0.0% 6.1% 84.3% 0.0% 0.0%... (3 Replies)
Discussion started by: Nakul_sh
3 Replies

9. UNIX for Dummies Questions & Answers

Is it possible to combine multiple CPU to act as a single CPU on the same server?

We have a single threaded application which is restricted by CPU usage even though there are multiple CPUs on the server, hence leading to significant performance issues. Is it possible to merge / combine multiple CPUs at OS level so it appear as a single CPU for the application? (6 Replies)
Discussion started by: Dissa
6 Replies

10. Shell Programming and Scripting

Help with speeding up my working script to take less time - how to use more CPU usage for a script

Hello experts, we have input files with 700K lines each (one generated for every hour). and we need to convert them as below and move them to another directory once. Sample INPUT:- # cat test1 1559205600000,8474,NormalizedPortInfo,PctDiscards,0.0,Interface,BG-CTA-AX1.test.com,Vl111... (7 Replies)
Discussion started by: prvnrk
7 Replies
RANDOM(4)						   BSD Kernel Interfaces Manual 						 RANDOM(4)

NAME
random , urandom -- random data source devices. SYNOPSIS
pseudo-device random DESCRIPTION
The random device produces uniformly distributed random byte values of potentially high quality. To obtain random bytes, open /dev/random for reading and read from it. To add entropy to the random generation system, open /dev/random for writing and write data that you believe to be somehow random. /dev/urandom is a compatibility nod to Linux. On Linux, /dev/urandom will produce lower quality output if the entropy pool drains, while /dev/random will prefer to block and wait for additional entropy to be collected. With Yarrow, this choice and distinction is not necessary, and the two devices behave identically. You may use either. OPERATION
The random device implements the Yarrow pseudo random number generator algorithm and maintains its entropy pool. Addditional entropy is fed to the generator regularly by the SecurityServer daemon from random jitter measurements of the kernel. SecurityServer is also responsible for periodically saving some entropy to disk and reloading it during startup to provide entropy in early system operation. You may feed additional entropy to the generator by writing it to the random device, though this is not required in a normal operating envi- ronment. LIMITATIONS AND WARNINGS
Yarrow is a fairly resilient algorithm, and is believed to be resistant to non-root. The quality of its output is however dependent on regu- lar addition of appropriate entropy. If the SecurityServer system daemon fails for any reason, output quality will suffer over time without any explicit indication from the random device itself. Paranoid programmers can counter-act this risk somewhat by collecting entropy of their choice (e.g. from keystroke or mouse timings) and seeding it into random directly before obtaining important random numbers. FILES
/dev/random /dev/urandom HISTORY
A random device appeared in Linux operating system. Darwin September 6, 2001 Darwin
All times are GMT -4. The time now is 03:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy