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 > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ignite issue on HPUX server Prabhu H HP-UX 3 12-10-2008 10:15 PM
how to execute script from my desktop windows xp to my HPUX server? kenshinhimura HP-UX 2 03-05-2008 05:47 PM
Can't start the cpp server in hpux onlyforforum HP-UX 0 05-26-2007 10:25 AM
Configuration of email on HPUX server sharmavr UNIX for Dummies Questions & Answers 1 07-19-2006 10:22 AM
Finding server Model on HPUX lnineill HP-UX 4 01-06-2005 02:37 PM

Closed Thread
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 02-17-2009
cpolikowsky cpolikowsky is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 8
Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas?
  #2 (permalink)  
Old 02-17-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
The mpctl() system call (in C) lets you specify what cpu a process runs on.
Is that what you meant?

or something like this?
Code:
i=0
while true
do
    while [[ $i -lt  100000000 ]]
    do
         i=$(( $i + 1))
    done
    i=0
done
This is BAD idea on a production system with other users, especially if you start a bunch of these running.
  #3 (permalink)  
Old 02-18-2009
cpolikowsky cpolikowsky is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 8
Hi Jim - I ended up using something similar.

#!/sbin/sh
for i in 1 2 3 4 5 6 7 8 9 10
do
while `true`
do
false
done
done

I agree not the best idea but I needed to test.

Thank you.
Closed Thread

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:35 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