Unless I’m using the wrong terms in my search it really seems like there’s no tool for Linux that can tell me what processes used the most CPU (typically this has a high correlation with energy usage) in the last hour or 24 hours.

Basically I want something like the Android battery usage app but for Linux.

  • Onno (VK6FLAB)
    link
    fedilink
    37 days ago

    The top command will tell you what each process is using in terms of CPU and memory. You can log this to a database and analyse it as required.

    I’d be surprised if the Android battery application was anything different.

    • @BrianTheeBiscuiteerOP
      link
      17 days ago

      Any tips or how-to article that says how to push the top data to a DB? I figure scraping the output is no good because the layout is dynamic.

        • @BrianTheeBiscuiteerOP
          link
          37 days ago

          Right, I just meant I figured the data might shift horizontally between snapshots but I guess Awk can figure it out.