# fiberCount ## Category Scheduler Management ## Arity **Unary** — `fiberCount `. ``` fiberCount ``` ## Description Returns the **total number of fibers** (ready + waiting) on the given scheduler. Includes fibers that are currently sleeping, awaiting handles, or ready to execute. ## How It Works Counts all fibers registered with the scheduler — both in the ready queue and the waiting (sleep/await) list. ## Usage ```sqf _total = fiberCount 1; // e.g., 42 systemChat f"Total fibers on Main: {_total}"; ``` ### Monitor scheduler load ```sqf _total = fiberCount _schedulerId; _ready = readyFiberCount _schedulerId; _waiting = waitingFiberCount _schedulerId; systemChat f"Fibers: {_total} total, {_ready} ready, {_waiting} waiting"; ``` ### Health check ```sqf if (fiberCount 1 > 1000) then { systemChat "Warning: High fiber count on Main"; }; ``` ## Thread Safety ReadOnly — approximate snapshot. Fiber count may change between the call and subsequent operations. Safe from any scheduler. ## See Also - [readyFiberCount](readyFiberCount.md) — ready fibers only - [waitingFiberCount](waitingFiberCount.md) — waiting fibers only - [schedulerLoad](schedulerLoad.md) — load percentage - [spawn](spawn.md) — creates fibers