- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to we generate load on CPU
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2015 12:11 AM
06-23-2015 12:11 AM
We have a test server , weneed to test Nagios tool .
We would like to generate load on HPUX 11iv3 OS , rx2800i4 , let me know how do we achieve the same ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2015 03:56 AM
06-23-2015 03:56 AM
Re: How to we generate load on CPU
Got this Infor from James old post ;
For creating a CPU load that stops after 60-seconds:
# perl -e '$SIG{ALRM}=sub {exit};alarm 60;1 while {}'
...change the value of 'alarm 60' according to your tastes.
For allocating some memory and sleeping for some period thereafter:
# perl -e '$sz=$ARGV[0] ||1_000_000;@a=1..$sz;sleep 30'
...You may need to adjuct the default allocation of 1,000,000 characters depending upon your kernel parameters. You can pass any value you want, too:
# perl -e '$sz=$ARGV[0] ||1_000_000;@a=1..$sz;sleep 30' 50000
...means allocate a string of 50,000 characters instead of the default 1,000,000.
As for I/O, use the classic one:
# dd if=/dev/rdsk/c2t0d0 of=/dev/null bs=256k count=1000
...vary the count parameter to vary the amount of time doing I/O.
Thanks James :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2015 06:24 PM
06-23-2015 06:24 PM
SolutionAttached is a script that generates 1 or more 100% CPU load processes. There's no limits imposed so you can start 2 processes or 100 processes, each one consuming 100% CPU usage and shared CPU usage when the load exceeds the number of CPUs. Works on HP-UX, Linux, AIX and Solaris. Uses ksh so AIX might need ksh loaded or switch the interpreter line to bash. Use sar, top or Glance to see what is happening.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2015 11:11 PM
06-24-2015 11:11 PM
Re: How to we generate load on CPU
Thanks a ton Bill