Skip to content

jobs shows too high CPU usage #8919

@septatrix

Description

@septatrix

The output of jobs sometimes shows much too high CPU usage stats for background jobs.
It seems somewhat racy as for processes with normal usage it is either very high or 0%. yes seems to always show a too high result.

  • fish, version 3.4.1
  • 5.16.19-200.fc35.x86_64 (Fedora 35)
~ $ yes >/dev/null &
~ $ jobs
Job	Group	CPU	State	Command
1	1324566	99039434%	running	yes >/dev/null &
~ $ ps -p $last_pid -o %cpu,cmd
%CPU CMD
99.3 yes

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions