GithubHelp home page GithubHelp logo

About CPUTimes about gopsutil HOT 4 CLOSED

shirou avatar shirou commented on June 10, 2024
About CPUTimes

from gopsutil.

Comments (4)

shirou avatar shirou commented on June 10, 2024

original python psutil returns cpu-total-sum if percpu is false. And gopsutil also returns cpu-total-sum if percpu is false. if you find a bug, please let me know with what architecture you use.

Thank you.

from gopsutil.

upccup avatar upccup commented on June 10, 2024

@shirou Thank you for your reply i use it in ubuntu14.4 with golang
Through your code I understand it is that you get the first piece of CPU state when the parameter is the value false instead of all or a combination of all of the CPU and CPU state I'm not sure whether you do it for all the CPU state reaction

from gopsutil.

shirou avatar shirou commented on June 10, 2024

/proc/stat on Linux is like this.

cpu  8396257 168024 2066813 4683926935 373796 2084 106614 182508 0 0
cpu0 2093478 128915 943679 2343735446 323843 545 8658 97828 0 0
cpu1 6302778 39108 1123134 2340191488 49953 1539 97956 84679 0 0

The first line is a total of all cpu times. So, if percpu is False, we need only first line, I think.

from gopsutil.

upccup avatar upccup commented on June 10, 2024

@shirou I get it . I was wrong to thank you very much

from gopsutil.

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.