CR4® - The Engineer's Place for News and Discussion®


Previous in Forum: CAD Software Alternatives   Next in Forum: Statistics on an Excel Data Table
Close
Close
Close
12 comments
Member

Join Date: Oct 2017
Posts: 7

Computer CPU Meter

11/06/2017 4:12 AM

Hi All,

Maybe my questions sounds bizarre. Here it is. My boss wanted to install an external relay to trip or alarm when during high CPU usage of our desktop computer, it will trigger the alarm. What could possibly be the suggestions. Shout out for violent reactions

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
2
Guru

Join Date: Mar 2007
Location: at the beach in Florida
Posts: 19202
Good Answers: 1125
#1

Re: Computer CPU meter

11/06/2017 6:02 AM
__________________
Life is like riding a bicycle. To keep your balance you must keep moving. A.E.
Register to Reply Good Answer (Score 2)
Guru
Hobbies - HAM Radio - New Member United Kingdom - Big Ben - New Member Fans of Old Computers - Altair 8800 - New Member Canada - Member - New Member

Join Date: Jun 2006
Location: Toronto
Posts: 3961
Good Answers: 119
#2

Re: Computer CPU Meter

11/06/2017 10:04 AM

if you get a malware bit coin miner operating, it will show consistent high CPU useage

__________________
Per Ardua Ad Astra
Register to Reply Score 1 for Good Answer
Guru
New Zealand - Member - Kiwi Popular Science - Weaponology - New Member Engineering Fields - Power Engineering - New Member Engineering Fields - Electrical Engineering - New Member

Join Date: Sep 2006
Location: Auckland, New Zealand
Posts: 8448
Good Answers: 350
#3

Re: Computer CPU Meter

11/06/2017 1:54 PM

Why springs to mind?

Software is available that fulfils this need without modification of the computer but what is the purpose of the monitoring? Surely a standard desktop computer with a standard video card processor is nearly worthless when it comes to Bitcoin mining (if that is what this is all about).

Your boss would be better to add admin rights restrictions to the computers so staff cannot load unauthorised software onto them instead.

__________________
jack of all trades
Register to Reply
Guru

Join Date: Dec 2010
Location: North West England
Posts: 924
Good Answers: 116
#4

Re: Computer CPU Meter

11/07/2017 5:08 AM

The CPU monitors it's usage but there is only one flag that is set when an overflow condition occurs. The overflow flag is not ported to an output but a small software patch could be added to send an SMS message via your internet connection. There is also hardware on the market that can convert this message into a relay output. There is currently no provision to flag up a high usage condition and this would require a change to the operating system. Get your manager to contact Microsoft and ask them to add this feature to their next update. They regularly act positively to this kind of request if they feel that others would find it useful.

The information contained in this post was kindly provided by Jacaranda.org.

Register to Reply Score 1 for Good Answer
Guru
Popular Science - Cosmology - New Member Technical Fields - Technical Writing - New Member Engineering Fields - Energy Engineering - New Member Engineering Fields - Electrical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Electromechanical Engineering - Old Member, New Association

Join Date: Apr 2008
Location: Lexington, KY
Posts: 1553
Good Answers: 72
#5

Re: Computer CPU Meter

11/07/2017 7:39 AM

That sounds like a difficult task. Especially if the desktop computer is running software that has to link to other computers. My first question would be, what exactly are you trying to capture? Yes, you said CPU usage! I got that! More specifically, is he looking for rare events or something that slows everything down?

You can assign one or two CPU to Windows and let the others be assigned to other applications. Then you can watch the CPU usage in Task Manager, which I'm sure you know already. In most cases, with a non-infected system, there may be times when the CPU spikes and then settles down. Is that an important event? I doubt it.

But if a programming error is the cause, then you will be able to see it in Task Manager. Perhaps a "Dead Man Switch" would be easier and faster to implement. To implement that, you will need to write a program that changes the state of some output line (of which there are several) perodically. The pulse train should be a programmed 50% duty cycle (ON for a fixed time, then OFF for the same fixed time) and that bit (the pulse train) then drives a pair of missing pulse detectors. One looks at the normal signal, the other looks at the inverted signal. If either one takes too long, it will indicate a problem with the CPU or the software.

I will be offering that circuit for sale in a few weeks at two different voltages (5V, and 24V but you could build the same thing for yourself). It is a simple design and we use it to detect a program crash or access problem to other PC's. Send me an e-mail through CR4 if you want to know more. This covers more than delays caused by maxing out a CPU.

__________________
A great troubleshooting tip...."When you eliminate the impossible, whatever remains, however improbable, must be the truth." Sir Arthur Conan Doyle
Register to Reply Score 1 for Good Answer
Member

Join Date: Oct 2017
Posts: 7
#6
In reply to #5

Re: Computer CPU Meter

11/07/2017 8:02 AM

To: NotUrOrdinaryJoe, appreciate much your thoughts.

my email: valyonzon@gmail.com

Register to Reply
Power-User

Join Date: May 2011
Location: Northern California
Posts: 417
Good Answers: 32
#7
In reply to #6

Re: Computer CPU Meter

11/07/2017 10:05 AM

Enzo, you shouldn't display your email address. It is dangerous and against the rules (I couldn't find the rules.) You can contact notyouordinaryjoe by clicking on his name and selecting the "send notyouordinaryjoe a message"

__________________
"Why do things that only happen to stupid people keep happening to me?" Homer Simpson
Register to Reply Score 1 for Good Answer
Active Contributor
CR4 Admins - CR4 Moderator - New Member

Join Date: Nov 2016
Posts: 13
Good Answers: 1
#9
In reply to #6

Re: Computer CPU Meter

11/07/2017 11:07 AM

enzo,

Jhowdy gave great instructions on how to contact NotUrOrdinaryJoe. Please refer to this section of CR4 rules:

7. Do not post phone numbers or email addresses. The moderation team will delete all phone numbers posted in threads or comments, and we strongly urge you not to post email addresses. You should also avoid using your email address as your user name. Posting your email address is an open invitation to spammers; yes, they do crawl our site looking for easy marks. If you want to give someone your contact information and are a registered CR4 user, please use the internal messaging system. Keep in mind, however, that all use of the internal messaging system must conform to the Messaging Code of Conduct. Do not send spam!

Thank you!

Register to Reply
Guru

Join Date: Mar 2011
Location: Sebastopol, California
Posts: 831
Good Answers: 35
#8

Re: Computer CPU Meter

11/07/2017 10:15 AM

Hook an arduino up to the cpu fan. When the fan kicks on, sound an alarm or send a text or email. You can tune the output to only send if the fan is on for x seconds, or came on x times in y minutes, or came on and stayed on for x minutes.

All you need is a dropping resistor and a tap into the +12v lead powering the fan.

__________________
Most people are mostly good most of the time.
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 13428
Good Answers: 152
#10

Re: Computer CPU Meter

11/07/2017 12:20 PM

What is the primary function of this desktop computer, and who uses it?

Is the boss worried about (1) pulling too many GB off the internet?, or (2) too many electrons going past the meter?

What violent reactions are we talking about?

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Participant

Join Date: Apr 2017
Posts: 4
#11

Re: Computer CPU Meter

11/08/2017 11:44 AM

My company only runs Ubuntu Linux on the desktop and on all of our servers; both in the office and on our Amazon web services instances.

To see what is consuming your CPU you use the "top" command at the command line.

This produces an orderly display showing both CPU and memory usage which can be "piped" to a file using the programming language "Python" and then analysed by another program which removes from the listing all of those processes which are legitimate Linux system processes. (You can't just get rid of all "root" user processes in case your machine has been compromised.) Having done that, it is possible to do any form of statistical analysis and send that, when there is an anomaly, to a prescribed email address as an alert.

This ability to look at any aspect of the operations of any of our machines, and to write programs that can augment that which is often available as free software within the Linux movement, is one of the many reasons we use only Linux whenever possible. Sometimes we have a need to run applications which will only run in Windows. In those instances, we run a Virtual Box and run the Windows program within that. At the end of the application session, the Virtual Box is closed down. It is very hard for anyone to install anything permanent in the Virtual Box's environment.

We have run Linux since 1997 and, so far as we know, we have never been compromised.

Register to Reply Score 1 for Good Answer
Guru
Engineering Fields - Electrical Engineering - New Member Fans of Old Computers - Commodore 64 - New Member Popular Science - Evolution - New Member United States - Member - New Member

Join Date: Oct 2013
Location: Illinois, 7 county region (The 'blue dot' that drags the rest of the 'red state' around during presidential elections.)
Posts: 3488
Good Answers: 87
#12
In reply to #11

Re: Computer CPU Meter

11/08/2017 11:54 AM

Nice to see a serious implementation of Linux in the workplace.

I Use Linux at home, formerly Ubuntu Linux, but after they changed their UI to the cellphone metaphor and away from the desktop metaphor, I jumped ship to Linux Mint.

__________________
( The opinions espressed in this post may not reflect the true opinions of the poster, and may not reflect commonly accepted versions of reality. ) (If you are wondering: yes, I DO hope to live to be as old as my jokes.)
Register to Reply Off Topic (Score 5)
Register to Reply 12 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be Good Answers:

These comments received enough positive ratings to make them "good answers".

Comments rated to be "almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Copy to Clipboard

Users who posted comments:

adreasler (1); aurizon (1); Deefburger (1); enzo (1); IronWoman (1); jack of all trades (1); James Stewart (1); jhhassociates (1); jhowdy (1); Kevin A. Loughrey (1); NotUrOrdinaryJoe (1); SolarEagle (1)

Previous in Forum: CAD Software Alternatives   Next in Forum: Statistics on an Excel Data Table

Advertisement