mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:15:08 +00:00
Add "times scheduled" field to /proc/summary
This commit is contained in:
parent
44045b258c
commit
e4bfcd2346
2 changed files with 4 additions and 7 deletions
|
@ -24,13 +24,14 @@ bool ProcFileSystem::initialize()
|
|||
auto stringImpl = StringImpl::createUninitialized(tasks.size() * 128, buffer);
|
||||
memset(buffer, 0, stringImpl->length());
|
||||
char* ptr = buffer;
|
||||
ptr += ksprintf(ptr, "PID OWNER STATE NAME\n");
|
||||
ptr += ksprintf(ptr, "PID OWNER STATE NSCHED NAME\n");
|
||||
for (auto* task : tasks) {
|
||||
ptr += ksprintf(ptr, "%w %w:%w %b %s\n",
|
||||
ptr += ksprintf(ptr, "%w %w:%w %b %w %s\n",
|
||||
task->pid(),
|
||||
task->uid(),
|
||||
task->gid(),
|
||||
task->state(),
|
||||
task->timesScheduled(),
|
||||
task->name().characters());
|
||||
}
|
||||
ptr += ksprintf(ptr, "kmalloc: alloc: %u / free: %u\n", sum_alloc, sum_free);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue