Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

File statistics for volumes

How Data ONTAP provides file statistics  Top

The filestats command quickly displays a summary of file statistics within a volume on a filer by reading file information from a snapshot that you specify.

Information obtained by the filestats command  Top

The output from the filestats command gives you a list containing the following information about files from a snapshot in a volume:

The filestats command syntax  Top

The filestats command has the following syntax:

filestats [-g] [-u] [ages ages] [sizes sizes] [timetype 
{a,m,c,cr}][style {readable,table,html}]volume volume_name snapshot 
snapshot_name

The volume and snapshot arguments are required.

volume_name is the name of the volume.

snapshot_name is the name of the snapshot.

Use the ages, timetype, sizes, and style options when you want to list specific file information from a volume. For more information about filestats options, see Options for the filestats command.

Getting a file statistics summary  Top

To use the filestats command, complete the following step.

Step

Action

1

Enter the following command:

filestats volume volume_name snapshot snapshot_name

volume_name is the name of the volume.

snapshot_name is the name of the snapshot.

Example with no options specified  Top

The following example shows sample output from the filestats command, without any options, for the hourly.1 snapshot on vol0. Output of this option includes a breakdown of files by size, age, user ID, and group ID, and the cumulative number of inodes for each value:


 
tpubs-cf2> filestats volume vol0 snapshot hourly.1
VOL=vol0 SNAPSHOT=hourly.1
INODES=274528 COUNTED_INODES=875 TOTAL_BYTES=458354190 
TOTAL_KB=143556

 

 
FILE SIZE         CUMULATIVE COUNT       CUMULATIVE TOTAL KB
1K                465                    1576
10K               832                    3356
100K              853                    3980
1M                856                    4660
10M               864                    32808
100M              875                    143524
1G                875                    143254
MAX               875                    143254

 
AGE(ATIME)        CUMULATIVE COUNT       CUMULATIVE TOTAL KB
0                 0                      0
30D               841                    132780
60D               850                    132932
90D               859                    143464
120D              875                    143528
MAX               875                    143528

 
UID               COUNT                  TOTAL KB
#0                873                    143528
#20041            2                      0

 
GID               COUNT                  TOTAL KB
#0                851                    41556
#30               21                     1972
#1                3                      0

Note
The # character preceding user IDs or group IDs in the UID and GID sections of the filestats command output indicates that the IDs cannot be found in the /etc/passwd and /etc/hosts files on the filer.

Using file statistics for snapshot management  Top

File statistics help you determine when to schedule snapshots by enabling you to see when most file activity takes place on a volume. Using the filestats command also helps you determine snapshot disk consumption.

Example with ages option specified  Top

Enter the filestats command with the ages option to display a daily breakdown of file changes in a volume, as shown in the following example:

filestats ages 1D,2D,3D,4D,5D,6D,7D,8D,9D,10D,11D,12D,
13D,14D volume vol0 snapshot hourly.0

Example of determining volume capacity  Top

You can also use the filestats command to determine when most activity occurs on a volume during a given day so that you can effectively schedule hourly snapshots.

The following example shows how you can use the filestats command to determine when most file changes occur in a volume within a 24-hour period:


 
filestats ages 1H,2H,3H,4H,5H,6H,7H,8H,9H,10H,11H,12H,
13H,14H,15H,16H,17H,18H,19H,20H,21H,22H,23H,24H volume vol0 snapshot hourly.0

If hourly.0 was taken at 8 a.m. and most file changes took place between 7H and 9H, which corresponds to 3 p.m. and 5 p.m. in this example, you can schedule more snapshots during these hours and fewer throughout the rest of the day. Scheduling more snapshots before or during increased file activity decreases the time between file changes and snapshots.

For information about managing snapshots, see the Data Protection Guide.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments