Commit Graph

18 Commits

Author SHA1 Message Date
Andreas Kling
6fa5df783b ps: Add some options and slim down the default output style
The following options are now available:

    -e: Show every process (not just the ones on your TTY)
    -f: Full format (instead of the short format)

We should definitely support more options and formats, I just wanted to
get away from the static single style of output. :^)
2020-03-01 17:46:06 +01:00
Andreas Kling
9632388bed ps: Don't assert when coming across a zombie process
Fixes #1278.
2020-02-27 10:37:47 +01:00
Andreas Kling
ffb6056675 ps: Use pledge() and unveil() 2020-02-18 11:35:47 +01:00
Andreas Kling
d17e23bd27 LibCore: Remove leading C from filenames 2020-02-06 15:04:03 +01:00
Andreas Kling
2d39da5405 LibCore: Put all classes in the Core namespace and remove the leading C
I've been wanting to do this for a long time. It's time we start being
consistent about how this stuff works.

The new convention is:

- "LibFoo" is a userspace library that provides the "Foo" namespace.

That's it :^) This was pretty tedious to convert and I didn't even
start on LibGUI yet. But it's coming up next.
2020-02-02 15:15:30 +01:00
Andreas Kling
94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling
712ae73581 Kernel: Expose per-thread information in /proc/all
Previously it was not possible to see what each thread in a process was
up to, or how much CPU it was consuming. This patch fixes that.

SystemMonitor and "top" now show threads instead of just processes.
"ps" is gonna need some more fixing, but it at least builds for now.

Fixes #66.
2019-11-26 21:37:30 +01:00
Andreas Kling
9a6d506ac8 ps: Show "/dev/pts/0" as "pts/0" instead of "0"
Also tweak the alignment of the output a bit.
2019-11-26 15:01:46 +01:00
Robin Burchell
b12d1fbb81 ps: Widen state field to fit "Condition" and other fields
Similar to ab20c91cfb.
2019-07-18 07:23:26 +02:00
Robin Burchell
57da716be0 ps: Port to using CProcessStatisticsReader and /proc/all
Drop /proc/summary in the process.
We only needed one new field here, thankfully, so this was quite straightforward.
2019-07-18 07:23:26 +02:00
Andreas Kling
b07bbf383d Userland: Run clang-format on everything. 2019-06-07 11:49:31 +02:00
Robin Burchell
9a4ec2e92a Userland: Use CFile in ps 2019-06-02 12:55:51 +02:00
Andreas Kling
303577df16 Various stubs while trying to get an old coreutils to build. 2018-11-17 15:56:09 +01:00
Andreas Kling
3e0a0dd7ed Fix all current build warnings in the userland. 2018-11-09 10:19:33 +01:00
Andreas Kling
97726862dd Add basic symlink support.
- sys$readlink + readlink()
- Add a /proc/PID/exe symlink to the process's executable.
- Print symlink contents in ls output.
- Some work on plumbing options into VFS::open().
2018-10-28 14:11:51 +01:00
Andreas Kling
c76dc9a047 Add /proc/mm and a /bin/mm utility that just dumps it.
This shows some info about the MM. Right now it's just the zone count
and the number of free physical pages. Lots more can be added.

Also added "exit" to sh so we can nest shells and exit from them.

I also noticed that we were leaking all the physical pages, so fixed that.
2018-10-28 10:28:21 +01:00
Andreas Kling
c80a1f39ce Minor userland tweaks. 2018-10-23 13:57:17 +02:00
Andreas Kling
ed2422d7af Start adding a basic /proc filesystem and a "ps" utility. 2018-10-23 12:04:03 +02:00