18:00:00. Hours must be given in 24-hour format.
This option can be used when data are read from
or written to a file (options -f or -o).
-.IP -F
+.IP "-F [ MOUNT ]"
Display statistics for currently mounted filesystems. Pseudo-filesystems are
-ignored. At the end of the report,
-.B sar
+ignored. At the end of the report,
+.B sar
will display a summary of all those filesystems.
Note that filesystems statistics depend on
.B sadc
option
.B "-S XDISK"
to be collected.
+Use of the
+.B MOUNT
+parameter keyword indicates that mountpoint will be reported instead of
+filesystem device.
+
The following values are displayed:
.B MBfsfree
int i, j;
struct stats_filesystem *sfc, *sfm;
-
if (dis) {
printf("\n%-11s MBfsfree MBfsused %%fsused %%ufsused"
- " Ifree Iused %%Iused FILESYSTEM\n",
- (dispavg ? _("Summary:") : timestamp[!curr]));
+ " Ifree Iused %%Iused %s\n",
+ (dispavg ? _("Summary:") : timestamp[!curr]),
+ DISPLAY_MOUNT(a->opt_flags) ? _("MOUNTPOINT") : _("FILESYSTEM"));
}
for (i = 0; i < a->nr; i++) {
sfc->f_files - sfc->f_ffree,
sfc->f_files ? SP_VALUE(sfc->f_ffree, sfc->f_files, sfc->f_files)
: 0.0,
- sfc->fs_name);
+ DISPLAY_MOUNT(a->opt_flags) ? sfc->mountp : sfc->fs_name);
if (!dispavg) {
/* Save current filesystem in summary list */
st_filesystem_i->f_files = buf.f_files;
st_filesystem_i->f_ffree = buf.f_ffree;
strcpy(st_filesystem_i->fs_name, fs_name);
+ strcpy(st_filesystem_i->mountp, mountp);
}
}
unsigned long long f_files __attribute__ ((aligned (16)));
unsigned long long f_ffree __attribute__ ((aligned (16)));
char fs_name[MAX_FS_LEN] __attribute__ ((aligned (16)));
+ char mountp[MAX_FS_LEN] __attribute__ ((aligned (16)));
};
#define STATS_FILESYSTEM_SIZE (sizeof(struct stats_filesystem))
#define COLLECT_PARTITIONS(m) (((m) & AO_F_DISK_PART) == AO_F_DISK_PART)
+/* Output flags for option -F */
+#define AO_F_MOUNT 0x00000001
+
+#define DISPLAY_MOUNT(m) (((m) & AO_F_MOUNT) == AO_F_MOUNT)
+
/*
***************************************************************************
* Various keywords and constants.
case 'F':
SELECT_ACTIVITY(A_FILESYSTEM);
+ p = get_activity_position(act, A_FILESYSTEM, EXIT_IF_NOT_FOUND);
+ if (!*(argv[*opt] + i + 1) && argv[*opt + 1] && !strcmp(argv[*opt + 1], "MOUNT")) {
+ (*opt)++;
+ act[p]->opt_flags |= AO_F_MOUNT;
+ return 0;
+ }
break;
case 'H':
{
print_usage_title(stderr, progname);
fprintf(stderr, _("Options are:\n"
- "[ -A ] [ -B ] [ -b ] [ -C ] [ -D ] [ -d ] [ -F ] [ -H ] [ -h ] [ -p ] [ -q ]\n"
- "[ -R ] [ -r [ ALL ] ] [ -S ] [ -t ] [ -u [ ALL ] ] [ -V ] [ -v ] [ -W ]\n"
- "[ -w ] [ -y ]\n"
+ "[ -A ] [ -B ] [ -b ] [ -C ] [ -D ] [ -d ] [ -F [ MOUNTS ] ] [ -H ] [ -h ]\n"
+ "[ -p ] [ -q ] [ -R ] [ -r [ ALL ] ] [ -S ] [ -t ] [ -u [ ALL ] ] [ -V ]\n"
+ "[ -v ] [ -W ] [ -w ] [ -y ]\n"
"[ -I { <int> [,...] | SUM | ALL | XALL } ] [ -P { <cpu> [,...] | ALL } ]\n"
"[ -m { <keyword> [,...] | ALL } ] [ -n { <keyword> [,...] | ALL } ]\n"
"[ -j { ID | LABEL | PATH | UUID | ... } ]\n"
printf(_("\t-B\tPaging statistics\n"));
printf(_("\t-b\tI/O and transfer rate statistics\n"));
printf(_("\t-d\tBlock devices statistics\n"));
- printf(_("\t-F\tFilesystems statistics\n"));
+ printf(_("\t-F [ MOUNTS ]\n"));
+ printf(_("\t\tFilesystems statistics\n"));
printf(_("\t-H\tHugepages utilization statistics\n"));
printf(_("\t-I { <int> | SUM | ALL | XALL }\n"
"\t\tInterrupts statistics\n"));
printf(_("\t-q\tQueue length and load average statistics\n"));
printf(_("\t-R\tMemory statistics\n"));
printf(_("\t-r [ ALL ]\n"
- "\tMemory utilization statistics\n"));
+ "\t\tMemory utilization statistics\n"));
printf(_("\t-S\tSwap space utilization statistics\n"));
printf(_("\t-u [ ALL ]\n"
"\t\tCPU utilization statistics\n"));