Whamcloud - gitweb
EX-6685 lipe: Add collection of files sizes statistics
authorVitaliy Kuznetsov <vkuznetsov@ddn.com>
Tue, 29 Aug 2023 15:38:59 +0000 (19:38 +0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 1 Sep 2023 13:19:25 +0000 (13:19 +0000)
commitcff404e9546474bb4c92094478c4e0e3ce4fb78f
treebf0eaf5a94a302def270bf2b8204ac3b72d13494
parentaa00fdfbffcd83dab66a424857ea01a6daeef3ad
EX-6685 lipe: Add collection of files sizes statistics

Add the ability to collect files sizes statistics to lipe_scan3
and lipe_find3.

This improvement adds an additional "collect-fsize-stats" option
to generate a file size statistics report for the conditions
specified in the search request. For example, you can collect
statistics on files for a specific user, on a specific modification
time, size, and other available parameters in files.

collect-fsize-stats is added as a new output policy and excludes
other output options (such as print-file-fid ) when this option
is specified. All calculations are made in KB, as this reduces
the potential volume of output data and makes it easier to work
with them through other programs.

Statistics are printed in 3 formats, .out for easy reading, JSON
and in YAML format. The template formatted output of the reports
themselves was copied from fsstats, but works on the lipe engine.

The report itself consists of the following tables showing
statistics on file sizes:
- Files Size;
- Capacity used;
- Equal overhead;
- Positive overhead;
- Negative overhead;
- Directory size;
- Time since creation;
- Time since last modification;
- Time since last metadata modification;
- Time since last access;
- Filename length;
- Storage size by user;
- Storage size by group;
- Storage size by project ID;
- Stripe count;
- Stripe size;
- Mirror count.

Each of the tables has the following structure:

- Header (Stats name);
- Description of the table for each column (from 0 to 8);
- General values relative to table values and stats type;
- Table with 8 columns.

Also generates time-based reports for each user.
Types:
- Time since creation;
- Time since last modification;
- Time since last metadata modification;
- Time since last access;

Each of the tables has the following structure:
- User info
- Header (Stats name);
- Table with 6 or 7 columns.

The files sizes report file can be generated in 4 output
options (out,yaml,json,csv). To specify the desired type of
report, you need to specify the extension from the available
ones (out, yaml, json, csv) in the file name (For example:
report_name.json). If you want to receive reports of all
types, you must specify the extension ".all" (For example:
report_name.all). In this case, reports of all types
will be generated.

Test-Parameters: trivial testlist=sanity-lipe-scan3
Signed-off-by: Vitaliy Kuznetsov <vkuznetsov@ddn.com>
Change-Id: Ied75497e9a53fe5545a0963560ca0638b4f48c76
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50713
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lipe/man/lipe_find3.1
lipe/src/lipe_find3/lf3_lexer.l
lipe/src/lipe_scan3/Makefile.am
lipe/src/lipe_scan3/lipe-scan3-notes.txt
lipe/src/lipe_scan3/ls3_debug.h
lipe/src/lipe_scan3/ls3_main.c
lipe/src/lipe_scan3/ls3_stats.c [new file with mode: 0644]
lipe/src/lipe_scan3/ls3_stats.h [new file with mode: 0644]
lipe/src/lipe_scan3/tests/lipe.scm
lustre/tests/sanity-lipe-scan3.sh