Solaris 10


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris 10
# 1  
Old 04-26-2016
Solaris 10

I am working on a Solaris 10 server that is quite locked down. When testing we want to add 15% more load to the CPU. We are unable to add stress or any program to do so. Does anyone have a way to do it where you can add lets say 10, 15, 20 percent load to cpu on top of this psrinfo -v gives me 175 virtual processors. psrinfo -pv gives me 4 physical processors
Code:
sparc-m5 32 virtual processors
sparc-m5 48 virtual processors
sparc-m5 48 virtual processors
sparc-m5 48 virtual processors

all clocking 3600MHz.

Last edited by DukeNuke2; 04-27-2016 at 03:28 AM..
# 2  
Old 04-26-2016
You can use this ksh/bash function:

Code:
# Usage: lc [number_of_virtual_cpus_to_load [number_of_seconds] ]
lc() {
  (
    pids=""
    cpus=${1:-1}
    seconds=${2:-60}
    echo loading $cpus CPUs for $seconds seconds
    trap 'for p in $pids; do kill $p; done' 0
    for ((i=0;i<cpus;i++)); do while : ; do : ; done & pids="$pids $!"; done
    sleep $seconds
  )
}

This User Gave Thanks to jlliagre For This Post:
# 3  
Old 04-26-2016
May I ask what the colon is for in front of the numbers? can I do 3600 seconds and 20 virtual cpu? can I save this as lc.sh?
# 4  
Old 04-26-2016
Quote:
Originally Posted by bdid
May I ask what the colon is for in front of the numbers?
That's the default values (one vCPU for 60 seconds)
Quote:
can I do 3600 seconds and 20 virtual cpu?
Sure, there is no hardcoded limit.
Quote:
can I save this as lc.sh?
Up to you. I'd rather save it in $HOME/Functions/lc and set FPATH=~/Functions (assuming ksh is used).
# 5  
Old 04-26-2016
I tried this as bash and it did not do anything. This is all I changed.
cpus=${27}
seconds=${60)
# 6  
Old 04-26-2016
There is nothing to change in the shell function I posted.

If you saved the function in lc.sh, run this:

Code:
. lc.sh
lc 27 60

Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Solaris

Patching Procedure in Solaris 10 with sun cluster having Solaris zone

Hi Gurus I am not able to find the patching procedure for solaris 10 ( sol10 u11) to latest patchset with sun cluster having failover zones so that same I should follow. Take an instance, there are sol1 and sol2 nodes and having two failover zones like sozone1-rg and sozone2-rg and currently... (1 Reply)
Discussion started by: nick101
1 Replies

2. Solaris

root disk mirroring in solaris volume manager for solaris 10

Need a procedure document to do "root disk mirroring in solaris volume manager for solaris 10". I hope some one will help me asap. I need to do it production environment. Let me know if you need any deatils on this. Thanks, Rama (1 Reply)
Discussion started by: ramareddi16
1 Replies

3. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies

4. Solaris

application compiled on solaris 10 throwing error when executed on solaris 9

I have compiled my application on Solaris 10 with following description SunOS ldg1 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Blade-T6320 The compiler is Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 But when installing the application on Solaris 9 SunOS odcarch02 5.9... (2 Replies)
Discussion started by: ash_bit2k2
2 Replies
Login or Register to Ask a Question