Schlagwort: CPU Monitor

  • Analog gauge array helps evaluate compilation efficiency

    Analog gauge array helps evaluate compilation efficiency

    Reading Time: 2 minutes

    There is an old joke response in the programming industry for whenever you’re caught slacking off: “I’m waiting for the code to compile.” That still holds up, because even today’s blazing fast computers can take ages to compile. That’s true even when the compiler can run tasks across multiple CPU cores. To find out if that is as efficient as it could be, Lex built this analog gauge array that displays the utilization of each core.

    Lex created this for their own computer, which has a 12-core CPU. There is one gauge for each of those cores, plus an additional gauge for swap memory and another for RAM. The same basic idea could apply to computers that have CPUs with fewer cores — the device would just need a number of gauges equal to the number of CPU cores, plus two.

    The device contains an Arduino Mega 2560 board and it receives utilization data through serial from a PC running a custom Rust program. That program uses some resources, but it is trivial compared to everything else. The Arduino employs pulse-width modulation (PWM) to control the positions of the gauge needles. There is also a strip of WS2812B individually addressable RGB LEDs illuminating the gauges, with the colors corresponding to utilization. So high utilization will move a gauge’s needle to the right and cause it to light up red.

    [youtube https://www.youtube.com/watch?v=4J-DTbZlJ5I?feature=oembed&w=500&h=281]

    This gives Lex a quick and easy way to visualize how their computer distributes tasks across the CPU cores. That is interesting when compiling code, but it is also useful for other jobs that attempt to parallelize tasks.

    The post Analog gauge array helps evaluate compilation efficiency appeared first on Arduino Blog.

    Website: LINK

  • Monitoring CPU usage with an Arc Reactor

    Monitoring CPU usage with an Arc Reactor

    Reading Time: 2 minutes

    Monitoring CPU usage with an Arc Reactor

    Arduino TeamJune 3rd, 2020

    Iron Man Arc Reactors have brought joy to makers of all ages, whether as something cool on a movie screen, as a hacked together light assembly, or even a cosplay prop created from a DIY kit. Michael Klements decided to turn one of these kits into something more, by hooking it up to act as a CPU performance monitor for his computer.

    His handy desktop device runs a Python script on the monitored PC, which passes along CPU information over serial to an Arduino Uno. The Uno pulses the Arc Reactor in proportion to the computer load using a transistor, with higher frequency pulses indicating a heavily loaded CPU and lower frequencies for lower CPU usage. An OLED display is also implemented for numerical feedback, and everything is housed in a nice 3D-printed stand.

    [youtube https://www.youtube.com/watch?v=KsSESewvJc0?feature=oembed&w=500&h=281]

    More details, including files and code, are available in Klements’ blog post

    Website: LINK