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


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.
# 1  
Old 02-17-2009
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  
Old 02-17-2009
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  
Old 02-18-2009
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

HPUX 11.23 - server is crawling

OK HPUX masters I need help. I have a HPUX 11.23 server that I am using as a Ignite server that services two HPUX services for backups only. The other day I noticed that our Make Net Recoveries were failing. Upon attempting to login to the server SSH and could not I then tried to ping and could... (6 Replies)
Discussion started by: waytec
6 Replies

2. HP-UX

Hitachi Device Manager Agent for HPUX

Hi there, i am looking to download the Device manager agent for HPUX 11.31. Where we can find it. I've tried on google and Hitachi web sites and spent several hours, i just couldn't find anything at all. Please help. Thank you very much! (8 Replies)
Discussion started by: lamoul
8 Replies

3. HP-UX

Problem in Configuring kerberos Server on HPUX

Hi, I am getting this error during kerberos server setup in HPUX 11.31 : kdb_create: unknown LDAP backend error while adding master entry to the database ps -ef|grep ldap root 3905 1 0 13:11:36 ? 0:00 /opt/ldapux/bin/ldapclientd Unable to find out the meaning of this... (1 Reply)
Discussion started by: Amit Kulkarni
1 Replies

4. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

5. HP-UX

Ignite issue on HPUX server

Hi All, I am getting below error while igniting(restoring image) on 2470 server. i tried with different images it is giving same error. please help me out to resolve this issue * Making VxFS filesystem for "/usr/aethos/snss/suppimpapp1", (/dev/vg00/rsuppimpapp1). *... (3 Replies)
Discussion started by: Prabhu H
3 Replies

6. HP-UX

how to execute script from my desktop windows xp to my HPUX server?

Good day, i would like to get some advice, how will i execute my script in hp ux servers, and how to configure rsh and rexec. thanks (2 Replies)
Discussion started by: kenshinhimura
2 Replies

7. HP-UX

Can't start the cpp server in hpux

Hello, I have writtern the makefile and successfully produce the server exe. But, it doesn't run in hpux11.11 server. compile and link option: /opt/aCC/bin/aCC -Aa -Wl,+s /cc/smc3/root/development/auto_activation/AA_global/obj/smc3/aa_config.o... (0 Replies)
Discussion started by: onlyforforum
0 Replies

8. UNIX for Dummies Questions & Answers

Need an advise Backup HPUX Server while online

I will perform a "fbackup -f /dev/rmt/0m -i /". Can any body advise me on the following: 1. Is this a full backup of the entire file system or like the entire image of the server. Is it ok to do a backup while the server is online. 2. If it is not advisable to do a backup while the server is... (2 Replies)
Discussion started by: real-chess
2 Replies

9. UNIX for Dummies Questions & Answers

Configuration of email on HPUX server

I am working in an developer 2000 based application where backend is Oracle9i in unix environment. My application has the functionality if email generation. But I am not able to test this functionality as my HPUX server is not configured for emails. Please let me know the steps for configuring mail... (1 Reply)
Discussion started by: sharmavr
1 Replies

10. HP-UX

Finding server Model on HPUX

Hi i am just wondering is there a command in hp that you can find the server model on hpux? Thanks (4 Replies)
Discussion started by: lnineill
4 Replies
Login or Register to Ask a Question