Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6246265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:39:24+00:00 2026-05-24T12:39:24+00:00

I’m making a small Android application to show current total CPU usage like tab

  • 0

I’m making a small Android application to show current total CPU usage like tab Performance in Windows Task Manager.
I use “top -m 1 -n 1 -d 1” to get CPU usage, but i do not really understand the result of “top”.

The result like:

User 5%, system 15%, IOW 0%, IRQ 0%
User 5 + Nice 0 + Sys 14 + Idle 73 + IOW 0 + IRQ 0 + SIRQ 0 = 92
PID     CPU%  S   #THR    VSS    RSS    UID     Name
213     11%   R    1      900K   340K   app_16   top

CPU usage = ???
How can i calculated total CPU usage?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:39:25+00:00Added an answer on May 24, 2026 at 12:39 pm

    The accepted answer for this question is incorrect. The second line of the output is the number of threads/processes that are launched in that grouping. Your CPU usage is 20% in the above. 5% of that is from user apps and 15% from system apps. You have 73 idle threads, 14 system threads, and 5 user threads (according to the second line).

    for instance, here is a current top snapshot for my Droid.

    User 6%, System 5%, IOW 0%, IRQ 0%
    User 21 + Nice 0 + Sys 16 + Idle 270 + IOW 0 + IRQ 3 + SIRQ 0 = 310
    
      PID CPU% S  #THR     VSS     RSS PCY UID      Name
    30994   4% S    19 134912K  24140K  bg app_24   edu.vu.isis.ammo.spotreport
     1021   3% S    57 217400K  58504K  fg system   system_server
    20911   2% R     1    880K    400K  fg shell    top
     1053   0% S     1      0K      0K  fg root     tiwlan_wq
      995   0% S     2   1272K    128K  fg compass  /system/bin/akmd2
    

    According to the accepted answer, I would have 310% CPU usage, when this is actually just the number of threads. I am pretty sure I am actually using only 11% of the CPU, where the top 3 processes are using 9% of that total.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I'm making a simple page using Google Maps API 3. My first. One marker
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.