Commit Graph

13 Commits

Author SHA1 Message Date
Brian Gianforcaro
cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
Andreas Kling
e6579e7029 ps: Port to LibMain :^) 2021-11-23 15:44:59 +01:00
Peter Elliott
7283b0b214 Utilities: Show PGID and SID in ps -f 2021-10-17 22:18:48 +02:00
Mahmoud Mandour
ac7c83689b ps: Sort using input order in case of -q
Now the output of `ps -q <list>` is sorted according to the order the
user specified.
2021-08-28 15:08:00 +04:30
Mahmoud Mandour
259ecb3d11 ps: Select specific processes by their PIDs
This adds a `-q` option, which expects a comma-separated list of PIDs as
a value. On using it, only the processes associated with the supplied
PIDs are output.
2021-08-28 15:08:00 +04:30
Tom
7e77a2ec40 Everywhere: Improve CPU usage calculation
As threads come and go, we can't simply account for how many time
slices the threads at any given point may have been using. We need to
also account for threads that have since disappeared. This means we
also need to track how many time slices we have expired globally.

However, because this doesn't account for context switches outside of
the system timer tick values may still be under-reported. To solve this
we will need to track more accurate time information on each context
switch.

This also fixes top's cpu usage calculation which was still based on
the number of context switches.

Fixes #6473
2021-07-18 22:08:26 +02:00
Gunnar Beutner
bc174b0fd0 Utilities: Make sure columns for ps are properly aligned
This updates ps so that it calculates the ideal column width instead
of relying on hard-coded values. Previously the STATE column was too
small to fit the state for "FinalizerTask".
2021-06-03 17:53:59 +02:00
Linus Groh
f5c35fccca Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
Linus Groh
1eb048bed0 Userland: Remove a bunch of unused includes
As reported by CLion.
2021-05-31 18:01:53 +01:00
Andreas Kling
873eb47d2b ps: Sort output by PID :^) 2021-05-23 11:26:19 +02:00
Andreas Kling
a1e133cc6b LibCore: Make ProcessStatisticsReader return results in a Vector
The HashMap API was overkill and made using this less ergonomic than
it should be.
2021-05-23 11:10:15 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
ececac65c2 Userland: Move command-line utilities to Userland/Utilities/ 2021-01-12 12:04:09 +01:00