LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-22-2012, 04:00 AM   #1
danibhai
Member
 
Registered: Oct 2009
Posts: 35
Blog Entries: 2

Rep: Reputation: 0
Question 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..?
 
Old 07-22-2012, 04:14 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,056

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Code:
while true ; do set a=1 ; done &
Should do it.
 
Old 07-22-2012, 04:19 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,096

Rep: Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243
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.
 
Old 07-22-2012, 04:34 AM   #4
danibhai
Member
 
Registered: Oct 2009
Posts: 35
Blog Entries: 2

Original Poster
Rep: Reputation: 0
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.. !
 
Old 07-22-2012, 03:05 PM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2 on Lenovo Thinkpad W520
Posts: 7,096

Rep: Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243Reputation: 2243
What syg00 suggested was to run the script he proposes in another shell, not to include it in yours.
 
Old 07-22-2012, 04:17 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,131
Blog Entries: 2

Rep: Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833Reputation: 4833
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.
Old 07-22-2012, 10:52 PM   #7
danibhai
Member
 
Registered: Oct 2009
Posts: 35
Blog Entries: 2

Original Poster
Rep: Reputation: 0
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....??
 
Old 07-23-2012, 03:19 AM   #8
danibhai
Member
 
Registered: Oct 2009
Posts: 35
Blog Entries: 2

Original Poster
Rep: Reputation: 0
Prime95, is cool, i do get desired results.. great application for stress test..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get %CPU usage of a process devershetty Linux - Newbie 1 08-18-2008 02:52 AM
How to get %CPU usage of a process devershetty Linux - Newbie 13 08-16-2008 12:51 PM
full cpu usage when using vmware overpencil Linux - Software 1 04-15-2008 12:24 AM
process cpu usage hamedrafi Programming 5 06-11-2007 07:32 PM
How to get %CPU usage of a process romydmisc Linux - Newbie 2 05-24-2006 02:02 PM


All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration