Code Monkey home page Code Monkey logo

Comments (6)

brunobraga avatar brunobraga commented on July 18, 2024

Thanks!

Can you check these files for me in your box?

/proc/meminfo
/proc/stat

These are the basis for the CPU/Mem output in the screen.

from termsaver.

Zzyzx-Wolfe avatar Zzyzx-Wolfe commented on July 18, 2024

Sure thing!

pi@pi3:~ $ cat /proc/meminfo
MemTotal:         880548 kB
MemFree:          313208 kB
MemAvailable:     565880 kB
Buffers:           46276 kB
Cached:           271636 kB
SwapCached:            0 kB
Active:           339648 kB
Inactive:         181696 kB
Active(anon):     208640 kB
Inactive(anon):    21612 kB
Active(file):     131008 kB
Inactive(file):   160084 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        102396 kB
SwapFree:         102396 kB
Dirty:               120 kB
Writeback:             4 kB
AnonPages:        203452 kB
Mapped:           111732 kB
Shmem:             26816 kB
Slab:              27232 kB
SReclaimable:      13272 kB
SUnreclaim:        13960 kB
KernelStack:        3192 kB
PageTables:         4836 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      542668 kB
Committed_AS:    1380084 kB
VmallocTotal:    1179648 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
CmaTotal:           8192 kB
CmaFree:            6796 kB
pi@pi3:~ $ cat /proc/stat
cpu  17539 0 2606 13493 13735 0 68 0 0 0
cpu0 3143 0 639 4330 3579 0 67 0 0 0
cpu1 6418 0 617 1559 3325 0 1 0 0 0
cpu2 3317 0 784 4257 3531 0 0 0 0 0
cpu3 4661 0 566 3347 3300 0 0 0 0 0
intr 313342 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 64929 0 0 0 0 0 74 13568 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9365 0 0 0 0 0 0 0 2161 0 0 152793 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 403 5080 0 0 0 0 3649 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2161 0 0
ctxt 253311
btime 1502457307
processes 2882
procs_running 4
procs_blocked 0
softirq 101573 2054 28534 23 931 0 0 23085 14146 0 32800
pi@pi3:~ $

from termsaver.

Zzyzx-Wolfe avatar Zzyzx-Wolfe commented on July 18, 2024

I should add that it doesn't fail immediately. I'll get the CPU and MEM monitor charts working fully as expected and it'll randomly throw the zero division error some random amount of time later. I haven't noticed anything specific that occurs when the error happens, but it has happened multiple times.

from termsaver.

brunobraga avatar brunobraga commented on July 18, 2024

hum... interesting. I haven't experienced that before, but adding some triage to error or zero values returned from proc files. Keen to help out? If so, feel free to fork this code and submit a pull request. Otherwise I will add to the to-do list :-)

from termsaver.

Zzyzx-Wolfe avatar Zzyzx-Wolfe commented on July 18, 2024

I'm certainly willing to help out, but I'm afraid I don't have as much as experience with version control or OSS projects as I should. If you can give me a bit more guidance, I can sure try and help!

from termsaver.

brunobraga avatar brunobraga commented on July 18, 2024

Hi @Zzyzx-Wolfe ,
FYI, still need to test this on a linux box (made it work for MacOS).
Basically this implements a 0% usage, which seems to be the issue in the division by zero.
I did some other adjustments, so will pull back to the master branch once tested.
Cheers,

from termsaver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.