Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.3

Exit Print View

Updated: May 2019
 
 

Monitoring ZFS Pool Operations

When you issue ZFS commands that initiate background tasks to run on the data such as sending, receiving, scrubbing, or resilvering data, you can monitor the status and progress of these tasks in real time. You can specify the frequency rate in which information is displayed. You can also determine for how long the monitoring should run.

To monitor pool operations, you use the zpool monitor command. Depending on which options you use, the command provides the following information about the task. The information is provided for each individual pool.

  • Start time.

  • Current amount of data.

  • Timestamp, if appropriate on a per feature basis.

  • Amount of data at start of the task, if appropriate.

You can display information about tasks on an individual pool or on all existing pools on the system.

Use the zpool monitor command as follows:

zpool monitor -t provider [-T d|u] [pool] [interval [count]]

–t provider

Specifies one of the following providers about which the task information is displayed. For provider, you can specify one of the following:

  • send

  • receive or recv

  • scrub

  • resilver


Note -  For an updated list of providers, type the zpool help monitor command.
–T d|u

Specifies the time stamp and its display format. To display in standard date format, specify d. To display a printed representation of the internal representation of time, specify u. For more information about these display formats, see the date(1) and the time(2) man pages.

interval

Rate, in seconds, at which the displayed information is updated.

count

Number of times the command displays task-related information within the specified interval.

If count is specified, then the command updates the information for as many times as specified by count before exiting. If count is not specified, then the information is updated continuously until you press Ctrl-C.


Note -  You can also customize the information to display. With the –o option, you can filter the display fields to be included in the command output. With the –p option, you can display information in machine-parsable format. For more information, see the zpool(1M) man page.

The command output arranges the information according to specific fields:

DONE

Amount of data that has been processed so far since the zpool monitor command was issued.

OTHER

Additional information depending on the specified provider, such as the current item being processed, or the current state of the task.

PCTDONE

Percentage of data that has been processed.

POOL

Pool from which the information is retrieved.

PROVIDER

Task that is providing the information.

SPEED

Units per second, usually bytes but dependent on the unit that the provider uses.

STRTTIME

Time the provider started on the displayed task.

TAG

Distinguishes whole operations. The TAG value is unique at any one time but values can reused in subsequent operations. For example, two simultaneous send operations would have different TAG values even if both tasks operate on the same dataset.

TIMELEFT

Relative time that a specific task will be completed.

TIMESTMP

Time the monitored data snapshot is taken.

TOTAL

Estimate of total amount of data to be processed.

Example 39  Monitoring a ZFS Snapshot Stream Representation

The zfs send command creates a stream representation of a snapshot. The following example shows how to obtain information about this task. The information would be updated two times in a 5-second interval.

# zpool monitor -t send 5 2
POOL       PROVIDER PCTDONE  TOTAL   SPEED   TIMELEFT   OTHER
poolA      send     41.7     10.0G   5.93M   16m49s     poolA/fs:1/team3@all
poolB      send     53.9     10.0G   7.71M   10m13s     poolB/fs1/team3@all
poolC      send     97.9     10.0G   14.4M      14s     poolC/fs1/team1@all
poolA      send     43.5     10.0G   6.17M   15m40s     poolA/fs:1/team3@all
poolB      send     55.8     10.0G   7.95M    9m30s     poolB/fs1/team3@all
poolC      send     99.2     10.0G   14.5M       5s     poolC/fs1/team1@all
Example 40  Monitoring the Reception of a Stream

This example shows how to monitor the status and progress of a receive operation. Without a designated count, the information is continuously updated every 5 seconds. The monitoring ends when the administrator presses Ctrl-C.

# zpool monitor -t recv 5
pool           provider  pctdone  total speed timeleft   other
poolA          receive    34.0    12.0G 6.01M 22m31s     poolA/backup_all/fs2
poolA          receive    68.0    6.01G 6.01M 5m28s      poolA/backup_fs:1
poolB          receive    20.6    10.0G 3.04M 44m39s     poolB/backup_all/fs2
poolB          receive   100.0    6.01G 9.48M 1s         poolB/backup_fs1
poolB          receive    16.7    12.0G 4.16M 41m04s     poolB/pA-bkup/fs2
poolC          receive    26.2    10.0G 3.98M 31m41s     poolC/backup_all/fs2
^C
Example 41  Monitoring a Resilvering Operation

This example shows how to check the status of a resilvering operation on all the three ZFS pools on the system.

# zpool monitor -t resilver 5 4
pool       provider  pctdone  total  speed  timeleft   other
poolA      resilver   10.7    12.0G  37.7M  4m50s      (2/2)
poolB      resilver    7.1    10.0G  31.5M  5m02s      (2/2)
poolC      resilver    1.8    10.0G  42.9M  3m54s      (2/2)
poolA      resilver   13.9    12.0G  38.0M  4m38s      (2/2)
poolB      resilver    9.0    10.0G  30.4M  5m07s      (2/2)
poolC      resilver    5.3    10.0G  41.7M  3m52s      (2/2)
poolA      resilver   14.7    12.0G  36.1M  4m50s      (2/2)
poolB      resilver   10.8    10.0G  29.2M  5m12s      (2/2)
poolC      resilver    7.2    10.0G  41.0M  3m51s      (2/2)
poolA      resilver   14.7    12.0G  32.8M  5m19s      (2/2)
poolB      resilver   10.8    10.0G  29.6M  5m08s      (2/2)
poolC      resilver    7.2    10.0G  40.7M  3m53s      (2/2)
Example 42  Monitoring a Scrubbing Operation

This example shows how to monitor the progress of a scrubbing operation on poolB.

# zpool monitor -t scrub 5 poolB
pool        provider  pctdone  total  speed  timeleft
poolB       scrub      16.3    14.0G  35.3M   5m39s
poolB       scrub      16.4    14.0G  33.2M   6m00s
poolB       scrub      16.5    14.0G  31.1M   6m25s
poolB       scrub      16.5    14.0G  29.3M   6m48s
^C