Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-22-2012, 04:00 AM
|
#1
|
Member
Registered: Oct 2009
Posts: 35
Rep:
|
An application or a process which uses almost full cpu usage
Hi , i have generated a shell script, i intend to display the cpu usage on my suse machine, however i need to show almost 100% cpu usage to be displayed when the script runs..... Any suggestion , can i install a particular application or invoke any process which would use all cpu..
Any idea..?
|
|
|
07-22-2012, 04:14 AM
|
#2
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,285
|
Code:
while true ; do set a=1 ; done &
Should do it.
|
|
|
07-22-2012, 04:19 AM
|
#3
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,255
Rep:
|
Hello, welcome to LQ.
You can try to compile a big program with an aggressive -j flag, but don't complain if this results in burning you computer or even your house
Last edited by Didier Spaier; 07-22-2012 at 04:21 AM.
|
|
|
07-22-2012, 04:34 AM
|
#4
|
Member
Registered: Oct 2009
Posts: 35
Original Poster
Rep:
|
No , i dont intend to implement it in my shell script, all i want it any name of a program or third party application that i can install and invoke its process, which would consume 100% cpu, will kill the process after my script is executed.. !
|
|
|
07-22-2012, 03:05 PM
|
#5
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,255
Rep:
|
What syg00 suggested was to run the script he proposes in another shell, not to include it in yours.
|
|
|
07-22-2012, 04:17 PM
|
#6
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Try Prime95, it will stress your CPU to its limit (also good for testing for heat problems and overall system stability)
|
|
1 members found this post helpful.
|
07-22-2012, 10:52 PM
|
#7
|
Member
Registered: Oct 2009
Posts: 35
Original Poster
Rep:
|
Thank u all... For cpu usage. i installed apache.. ran httpd daemon, it did the needful..
Another small query... what if i wish to use my entire memory usage..? any script or program that i can envoke....??
|
|
|
07-23-2012, 03:19 AM
|
#8
|
Member
Registered: Oct 2009
Posts: 35
Original Poster
Rep:
|
Prime95, is cool, i do get desired results.. great application for stress test..
|
|
|
All times are GMT -5. The time now is 09:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|