# ndctl−wait−scrub(1)

[NAME](#name)\
[SYNOPSIS](#synopsis)\
[DESCRIPTION](#description)\
[EXAMPLE](#example)\
[OPTIONS](#options)\
[COPYRIGHT](#copyright)\
[SEE ALSO](#see-also)

## NAME

ndctl−wait−scrub − wait for an Address Range Scrub (ARS) operation to complete

## SYNOPSIS

*ndctl wait−scrub* \[\<bus-id> \<bus-id2> .. \<bus-idN>] \[\<options>]

## DESCRIPTION

NVDIMM Address Range Scrub is a capability provided by platform firmware that allows for the discovery of memory errors by system software. It enables system software to pre−emptively avoid accesses that could lead to uncorrectable memory error handling events, and it otherwise allows memory errors to be enumerated.

The kernel provides a POLL(2) capable sysfs file (*scrub*) to indicate the state of ARS. The *scrub* file maintains a running count of ARS runs that have taken place. While a current run is in progress a *+* character is emitted along with the current count. The *ndctl wait−scrub* operation waits for *scrub*, across all specified buses, to indicate not in−progress at least once.

## EXAMPLE

Wait for scrub on all nvdimm buses in the system. The json listing report at the end only includes the buses that support ARS operations.

```
# ndctl wait-scrub
[
 {
   "provider":"nfit_test.1",
   "dev":"ndbus3",
   "scrub_state":"active"
 },
 {
   "provider":"nfit_test.0",
   "dev":"ndbus2",
   "scrub_state":"active"
 }
]
```

When specifying an individual bus, or if there is only one bus in the system, the command reports whether ARS support is available.

```
# ndctl start−scrub e820
error starting scrub: Operation not supported
```

## OPTIONS

−v, −−verbose

Emit debug messages for the ARS wait process

## COPYRIGHT

Copyright (c) 2016 − 2019, Intel Corporation. License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

## SEE ALSO

[ndctl−start−scrub(1)](https://docs.pmem.io/ndctl-user-guide/v68/ndctl-man-pages/ndctl-start-scrub), *ACPI* <http://www.uefi.org/sites/default/files/resources/ACPI%206_2_A_Sept29.pdf> 6.2 Specification Section 9.20.7.2 Address Range Scrubbing (ARS) Overview"


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pmem.io/ndctl-user-guide/v68/ndctl-man-pages/untitled-2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
