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?
The mpctl() system call (in C) lets you specify what cpu a process runs on.
Is that what you meant?
or something like this?
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.
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.