Icod.ProcPs 1.1.3

dotnet tool install --global Icod.ProcPs --version 1.1.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Icod.ProcPs --version 1.1.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Icod.ProcPs&version=1.1.3
                    
nuke :add-package Icod.ProcPs --version 1.1.3
                    

Icod.ProcPs

Icod.ProcPs

PR Staging build Main Release validation

Icod.ProcPs is a managed .NET implementation of a selected set of tools from procps-ng 4.0.6.

Current release status

Version 1.1.3 is a CI/CD and packaging-maintenance release. It does not change the intended runtime behavior of the ProcPs commands; the version bump records a substantial revision of how the repository validates, packages, and publishes the suite.

The release pipeline now follows an explicit validation ladder: local build.cmd and build.sh use Debug, pull requests elevate to Staging, pushes to main elevate to the authoritative six-platform Release validation gate, and tags contained in main publish Release artifacts. Redundant automatic distribution-validation runs have been removed, while the full six-platform distribution verifier remains available for explicit diagnostics.

For tagged releases, package and archive production can proceed independently. NuGet.org publication no longer waits for unrelated archive jobs, and the exact .nupkg produced by the release package stage is inspected, installed from an isolated local NuGet source, and exercised before publication. Distribution packing reuses already validated build output, RID archive production restores once before publishing its command set, and package metadata is read from MSBuild instead of being inferred from repository-name conventions.

Version 1.1.2 restored normal Windows uptime operation when Unix load averages are unavailable. That behavior is retained in 1.1.3: standard uptime reports the observations Windows can faithfully provide and omits the load-average clause rather than synthesizing values, while uptime --raw remains intentionally strict.

The repository provides familiar process- and system-observation commands such as ps, pgrep, pkill, free, uptime, vmstat, w, watch, slabtop, hugetop, tload, top, and sysctl, while factoring common ProcPs behavior into the reusable Icod.ProcPs.Shared library.

The implementation targets .NET 10 and C# 13 and is designed for Windows, Linux, and macOS. Linux /proc remains the authoritative source for Linux procps-ng semantics; Windows and macOS use native operating-system facilities where equivalent information can be represented faithfully. Unsupported data is reported as unavailable rather than synthesized from unrelated metrics.

Included commands

Command Purpose
free Display physical-memory and swap usage.
pgrep Find processes by name, regular expression, identity, ownership, session, terminal, and other attributes.
pkill Signal processes selected with the same matching grammar used by pgrep.
pidwait Wait for processes selected by the shared ProcPs matching engine.
pidof Find process identifiers for running programs.
pwdx Report the current working directory of one or more processes.
pmap Report process memory maps and Linux smaps detail.
ps Report a snapshot of current processes, including ProcPs-style selection, formatting, sorting, personalities, and thread views.
slabtop Display Linux slab-cache information in real time or as a one-shot report.
hugetop Display Linux huge-page pools and per-process hugetlb usage in real time or as a one-shot report.
tload Display a scrolling terminal graph of system load averages.
top Display dynamic process and system activity in batch or interactive mode.
uptime Report system uptime, user count, and load averages.
vmstat Report virtual-memory, CPU, process, paging, disk, and system activity.
w Show logged-in users and what their sessions are doing.
watch Execute a command periodically and display its output fullscreen.
sysctl Read and write Linux runtime kernel parameters through /proc/sys.

Each executable directory contains its own man-page-style README.md describing the implemented command-line profile, exit statuses, platform behavior, and known limitations.

Icod.ProcPs.Shared

Icod.ProcPs.Shared is the suite-specific class library used by the commands in this repository.

It provides the common ProcPs model and behavior for:

  • process enumeration and stable process identity;
  • Linux /proc parsing;
  • Windows and macOS native process providers;
  • process selection and reporting;
  • the shared pgrep / pkill / pidwait matching grammar;
  • executable, root, and current-working-directory observations;
  • process memory maps;
  • huge-page pool and per-process hugetlb observations;
  • CPU, memory, swap, load-average, uptime, and session observations;
  • vmstat counters and sampling calculations;
  • account, terminal, namespace, cgroup, container, and security observations where the host can expose them faithfully; and
  • provenance and observation-fidelity metadata so callers can distinguish exact, equivalent, approximated, unavailable, and unsupported data.

Cross-suite process-control abstractions are supplied by Icod.Processes, while monotonic elapsed-time and periodic scheduling primitives are supplied by Icod.Timing. Icod.ProcPs.Shared owns its observation-fidelity policy and a neutral process-pattern contract. The pgrep, pkill, and pidwait executables reference Icod.CommandFramework.RegularExpressions directly and adapt its managed GNU/POSIX ERE provider to that contract.

Interactive full-screen commands use Icod.DCurses over Icod.Terminal and Icod.TermInfo; ProcPs command code owns application policy rather than native terminal modes, escape tables, or screen-refresh mechanics.

tload is intentionally output-only. It uses Icod.Terminal and Icod.TermInfo directly for output-terminal geometry and cursor positioning without taking ownership of terminal input or a curses presentation.

Platform model

The project is cross-platform, but it does not pretend that every operating system exposes Linux /proc semantics.

Linux

Linux is the reference platform for procps-ng compatibility. The implementation uses procfs and related kernel interfaces for process detail, memory maps, memory and swap information, load averages, CPU activity, uptime, login sessions, namespaces, cgroups, signal state, disk statistics, paging counters, slab information, huge-page pools, per-process hugetlb accounting, and other Linux-specific observations.

Windows

Windows support uses native and .NET process APIs, Tool Help, Terminal Services, GetPerformanceInfo, page-file enumeration, GetSystemTimes, GetTickCount64, and other documented Windows facilities.

Linux-only concepts are not fabricated. For example, Windows does not receive a synthetic Unix load average, and process memory maps remain unsupported until a provider can expose a sufficiently complete neutral address-space model.

macOS

macOS support uses Darwin libproc, POSIX APIs, Mach VM/CPU statistics, getloadavg(), kern.boottime, utmpx, and related native facilities.

As on Windows, Linux-only fields and report modes remain explicitly unavailable when there is no defensible native equivalent.

Compatibility philosophy

The goal is useful procps-ng compatibility without sacrificing correctness on non-Linux hosts.

The project therefore follows several rules:

  1. Preserve procps-ng command syntax and output behavior where the required underlying information exists.
  2. Keep process identity reuse-aware so a recycled PID is not silently treated as the original process.
  3. Preserve provenance and fidelity for observed values.
  4. Prefer an explicit unsupported/unavailable result to a plausible-looking but semantically incorrect value.
  5. Keep neutral process-control mechanics in Icod.Processes, neutral timing mechanics in Icod.Timing, ProcPs-specific observation policy in Icod.ProcPs.Shared, and GNU/POSIX regular-expression implementation dependencies in the command projects that actually require them.

This means that some commands or modes are naturally more portable than others. For example, ps, pgrep, pkill, free, and uptime-related observations can use substantial native support on multiple operating systems, while full pmap semantics and operational sysctl behavior are inherently tied to Linux interfaces.

Building

The repository requires a .NET 10 SDK.

On Windows:

build.cmd

On Unix-like hosts:

./build.sh

Or build the solution directly:

dotnet restore Icod.ProcPs.sln
dotnet build Icod.ProcPs.sln -c Debug --no-restore
dotnet test Icod.ProcPs.sln -c Debug --no-build --no-restore

The solution defines Debug, Staging, and Release configurations.

Continuous integration

Validation intentionally escalates with the source lifecycle:

  • local build.cmd and build.sh use Debug;
  • pull requests use Staging on Windows, Linux, and macOS, with the Linux job also packing and validating the exact Staging NuGet artifact;
  • pushes to main use Release distribution verification on Windows, Linux, and macOS on both x64 and ARM64; and
  • pushed v* tags contained in main build and publish Release artifacts.

Release builds treat compiler warnings as errors except for documentation warning CS1591. The six-platform distribution-validation workflow remains available for explicit manual diagnostic runs without duplicating normal PR or main validation.

Project layout

Icod.ProcPs/
├── Icod.ProcPs.Shared/    shared ProcPs library
├── free/
├── hugetop/
├── pgrep/
├── pidof/
├── pidwait/
├── pkill/
├── pmap/
├── ps/
├── pwdx/
├── slabtop/
├── sysctl/
├── tload/
├── top/
├── uptime/
├── vmstat/
├── w/
├── watch/
├── tests/                 command and shared-library tests
├── Icod.ProcPs.sln
├── build.cmd
└── build.sh

Documentation

Every executable has a dedicated README.md intended to function much like a manual page. Public, protected, and internal API surfaces in the source are also documented with XML documentation comments so generated API documentation can describe the reusable library and command entry points.

For architecture and provider details, see Icod.ProcPs.Shared/README.md.

Licensing

The executable tools in this repository use the repository LICENSE, with a copy included alongside each tool and packaged with that executable's documentation.

Icod.ProcPs.Shared intentionally has its own licensing terms. The shared library project declares LGPL-3.0-or-later; see Icod.ProcPs.Shared/LICENSE for the complete license text applicable to that library.

Upstream inspiration

These programs are inspired by and modeled on the corresponding utilities in procps-ng 4.0.6. Individual tool READMEs contain more specific historical author credits for the upstream commands.

Migrated to .Net by Timothy J. Bruce uniblab@hotmail.com.

Copyright (c) 2026 Timothy J. Bruce

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.1.3 0 9/2/2026
1.1.2 0 9/2/2026
1.1.1 33 9/1/2026
1.1.0 39 9/1/2026
1.0.1 56 8/27/2026

1.1.3 refines the repository CI/CD and packaging pipeline. Pull requests now validate Staging builds, main performs the authoritative Release distribution gate, tag publication validates and publishes the exact Release package artifact, redundant workflow/build work is removed, and workflow/package metadata handling is simplified without changing command behavior.