Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • P procps
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • procps-ng
  • procps
  • Issues
  • #186
Closed
Open
Issue created Jan 16, 2021 by Yuannan@yuannan

ps aux gives higher CPU usage than possible

This is a downstream bug in neofetch that I recently just noticed. I've isolated it down to this line.

image

cpu_usage="$(ps aux | awk 'BEGIN {sum=0} {sum+=$3}; END {print sum}')"

image

While ps should give higher than 100% usage for multi-threaded applications it's impossible to get more than 1600 (16 thread CPU). I've seen threads saying that it is okay since apps can be multi-threaded and therefore leading to more than 100% but I've not seen threads reporting more than (core_count x 100%) so this could be an unreported issue leading back years.

System: Arch linux on kernel Linux 5.10.7-zen1-1-zen ps from procps-ng 3.3.16

Assignee
Assign to
Time tracking