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

  • SEARCH
  • Home
  • 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 8105239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:06:38+00:00 2026-06-06T00:06:38+00:00

this is my first time asking a question here. I tried to be well

  • 0

this is my first time asking a question here. I tried to be well researched, so I apologize in advance if I overlooked a post for this question before. I’m looking to see if I can get the usage statistics for my app while it’s running. I’m running some relatively high performance programs, and I’m interested in seeing how well the computing is being distributed between the cores (and displaying this information in the program itself).

Again, sorry if this post is riddled with ignorance!

  • 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-06-06T00:06:40+00:00Added an answer on June 6, 2026 at 12:06 am

    You can check the number of CPU cores by looking at the files under the directory – /sys/devices/system/cpu/. This is also possible on non-rooted phones. Here is a function that can give you the number of cores on the device –

        public int getNumOfCpus() {
    
        class CPUFilter implements FileFilter {
            @Override
            public boolean accept(File pathname) {
                // Check if filename is "cpu0", "cpu1,...
                if (Pattern.matches("cpu[0-9]", pathname.getName())) {
                    return true;
                }
                return false;
            }
        }
    
        try {
            // Get directory containing CPU info
            File dir = new File("/sys/devices/system/cpu/");
            File[] files = dir.listFiles(new CPUFilter());
            // Return the number of cores 
            return files.length;
        } catch (Exception e) {
            e.printStackTrace();
            return 1;
        }
    
    }
    

    You can then get the CPU utilization per core by modifying function mentioned in the answer here – Get Memory Usage in Android

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

Sidebar

Related Questions

Well this is not the first time im asking these question here but I
Hi this is the first time I am asking a question here. I have
this is my first time asking a question here so apologies if I am
this is my first time asking a question here so I hope I am
This is the first time i'm asking a question here at stack overflow so
First time asking a question here so thanks in advance for your time. I
This is my first time asking a question, please be gentle! I have a
This is my first time asking my question at stackoverflow. I'm working on a
I'm asking this question because it isn't the first time I saw this coding
First time asking a question here. Usually I can find my answer without having

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.