Cpu Usage
Ronen
Posts: 55
in AMX Hardware
Hi,
Has Anyone noticed a bug in the latest firmware (3.41.422) that if you use the command "Cpu Usage" in a telnet session it will almost always be around 70%-98%? no matter the code size...
as far as i remember the old firmware, if you typed that command it will halt the session for 30 seconds and give you a normal resualt.
Thanks,
Ronen Katz
Has Anyone noticed a bug in the latest firmware (3.41.422) that if you use the command "Cpu Usage" in a telnet session it will almost always be around 70%-98%? no matter the code size...
as far as i remember the old firmware, if you typed that command it will halt the session for 30 seconds and give you a normal resualt.
Thanks,
Ronen Katz
0
Comments
Mine is at 99.97, that may be a tad high.
***oooh snap***
It is true (has been discussed in this forum) that mainline will not execute (well, once per second) if a value in mainline does not change. For example, [myTP,channel]= thisValue will not generate an event to myTP until thisValue changes. If no value changes then mainline won't even execute. It monitors the values and only executes if one of those changes. But, if you are using a loop it totally changes the dynamics of what we are talking about. Example:
for (i = 1; i <= numBtns; i++)
{
[myTP,channel] = thisValue
}
At first glance we'd think an event would only be generated to myTP if thisValue changed, right? But if you think about it i is changing every single time through mainline. So mainline never stops executing. This will raise your CPU usage very high because you are making the system do something all the time. It never stops.
I've had the same problem when I use NetLink Studio 3.0 to make connection via telnet, try with the windows cmd interfaces or via some windows utility like Hercules (http://www.hw-group.com/products/hercules/index_en.html).
And let me know the result.
Bye Kman88
cpu usage
CPU usage = 37.82% (30 sec. average = 85.35%, 30 sec. max = 96.79%)
I poll for memory and cpu status every minute or so on all of my new systems on campus so I can get a better idea of how efficient my program is running. By the looks of the above #'s, it appears both decent and bad. Does anyone have an idea why there is such a disparity between the 37% and the 30 second average of 85%? To be honest, I have only started polling the master for cpu usage with the latest version of firmware (.422) so I cannot attest to previous versions. If I have 60 or so masters across campus maxing out all the time, you can easily see the potential for some issues. The program itself is pretty simple, no duet stuff, my own modules, 200k~ish file size, etc. The only events that run constantly are my button feedback timelines, periodic telnet sessions to the master and my status timelines that, if flagged, report to our management software.
What's has been odd to me is that the above numbers were pulled from my home system. They are virtually identical to any master at work. Two completely different systems with only 1 common include file. This issue sounds pretty much exactly like the original poster's issue.
One of my goals, given time this week, is to call AMX and see if this is something to be concerned with or if I am misinterpreting this stuff. Has anyone noticed anything like this that can shed some light?
1) I've tried to connecting with the telnet application included in NetLinx Studio 3.0 whit the just cleared Netlinx Master and I've got the same Issue an Hight value of Avarange and an Hight Value of CPU Usage.
2) If I tried to connect to the Netlinx Master whit the normal telnet (Using the windows command line) I havent got problem.
So I thing that the issue will be in the NetLinx Studio 3.0 and not in the firmware.
Your value is not the same of mine so I think that yours will be caused by a huge use of the CPU just because in the moment you have done the check you where use 37.82% of CPU and in the last 30 sec you have used 96.79% of CPU so I think It's OK.
Did you tried with the telnet app in NS3 or with the windows command line???
Bye Kman88
It's a 30-second rolling average. If you sampled the CPU usage thirty times, once per second (although I don't know if this is actually the interval it uses), it's saying the max usage was 96.79%, the average of the 30 samples was 85.35%, and the last value sampled was 37%. The 30-second average is more useful, being a "smoothed" value, rather than just looking at a single point in time.
Now I have to isolate why the hell the 30 second average is so high. Does anyone think there could be potential long-term effects to the master? I don't want to be running a stress test on my equipment if I don't have to. I will gladly rethink my timeline/feedback approaches if necessary.
CPU usage = 64.13% (30 sec. average = 65.99%, 30 sec. max = 78.09%)
These numbers will only vary +/- 4%, no matter what. Something other than code has to be causing this.
hmmm.. you might try doing a clean disk command and make sure that everything is completely cleared out. But you may be chasing a ghost here.
It reminds me of the new Windows 7 CPU rating system. I've gotten many calls saying, "why is my bad-a$$ cpu only rating a 1.2???
I've done the same with a clean disk command and I've got:
CPU usage = 90.99% (30 sec. average = 90.99%, 30 sec. max = 90.99%)
I would belive there is something in the new firmware tht cause this when connecting via telnet By NS3, when I'm connected via window command line telnet I havent got problem.
are you running any duet modules? Or for that matter any modules that you didn't write yourself?
I cant run any module duet or not duet If I have done a clean disk before.
So no I didnt run anythink.
Kman88
Any tips for reducing the CPU USAGE when evaluating time? I was surprised when I put this in: and got about 51 % CPU USAGE (30 sec avg). When I commented the above out, the CPU USAGE went to zero. Using this: allowed my CPU USAGE to also go to zero.
Here's a copy of the .axi file I use for time and date stuff and I think it's as processor friendly as you can get. Of course I could be wrong. The function call in def program is commented out since I usually have a timeline to call it somewhere else in my code. There's some useful stuff in this file which I would imagine others would benefit from. There's empty function already set up for running seconds, minute, hourly, daily , etc events so it pretty much plug and play and then drop it what you want in the appropriate function call and your good to go. It will even determine the major holidays for you.
This from our head of engineering, CJ Butcher:
The CPU USAGE command only gives valid number after the usage system is started with the “reboot heap watch” command in TELNET. Otherwise it will always give the same numbers which are a snap shot taken at boot time. This mode is turned off at next normal reboot.
The numbers are obviously going to vary based on what your system is currently doing. If you run the CPU USAGE command several time you’ll see the numbers fluctuate. Having a max of 99% is not uncommon. You average of 60% is pretty normal.
Here is what my test processor happened to be at when I looked: (System was handling some traffic but not much.)
CPU usage = 9.71% (30 sec. average = 51.85%, 30 sec. max = 99.96%)
Here are my numbers during a reboot:
CPU usage = 96.61% (30 sec. average = 21.10%, 30 sec. max = 96.61%)
I Undersending it in reboot phase.
But if I've done a clean disk befor and I connected with the normal widows telnet the CPU Usage is at 0%
But if I connected with NetLinx Studio 3 utility the CPU Usage is always at 99% I think that is a bug in NetlixStudio 3.0
Kman88
In the second Screenshot you can see the standard windows telnet that not consume CPU.
The prohram is the same planck program in the two cases