Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-17-2009   -   Original Discussion by cpolikowsky
cpolikowsky's Unix or Linux Image
cpolikowsky cpolikowsky is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 14 November 2016, 9:45 PM EST
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
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?
Sponsored Links
    #2  
Old Unix and Linux 02-17-2009   -   Original Discussion by cpolikowsky
jim mcnamara's Unix or Linux Image
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 16 December 2017, 11:45 PM EST
Location: NM
Posts: 11,253
Thanks: 578
Thanked 1,122 Times in 1,034 Posts
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.
Sponsored Links
    #3  
Old Unix and Linux 02-18-2009   -   Original Discussion by cpolikowsky
cpolikowsky's Unix or Linux Image
cpolikowsky cpolikowsky is offline
Registered User
 
Join Date: Jun 2008
Last Activity: 14 November 2016, 9:45 PM EST
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Hi Jim - I ended up using something similar.


Code:
#!/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.

Last edited by Don Cragun; 10-05-2016 at 07:31 PM.. Reason: Add CODE tags.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 11:25 AM
Configuration of email on HPUX server sharmavr UNIX for Dummies Questions & Answers 1 07-19-2006 11:22 AM
Finding server Model on HPUX lnineill HP-UX 4 01-06-2005 02:37 PM



All times are GMT -4. The time now is 07:51 AM.