nproc

    Print the number of Linux processing units.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    14 hours ago
    Downloads
    9

    #nproc

    Print the number of Linux processing units.

    #Usage

    moonx cli/nproc --all

    #Common options

    OptionDescription
    --allCount configured CPUs, ignoring quotas and OpenMP.
    --ignore VALUEExclude N processors, retaining at least one.
    --helpShow help.
    --versionShow the version.

    #Notes

    The default follows the current process affinity, OpenMP thread settings and the CPU quota hierarchy on a standard cgroup v2 mount. Realtime scheduling policies ignore quotas. --all counts configured CPU directories from sysfs. Nonstandard cgroup v2 mounts are rejected.

    See the compatibility guide for the supported profile.

    Source Files