Changes:
xxxx/xx/xx: Version 10.0.1 - Sebastien Godard (sysstat <at> orange.fr)
+ * [Ivana Varekova]: cifsiostat didn't count open files from the
+ "Posix Open" column in /proc/fs/cifs/Stats file. This is now
+ fixed.
* [Ivana Varekova]: Close file descriptor in read_uptime()
function (file rd_stats.c).
* NLS updated. Esperanto translation added.
2011/03/15: Version 10.0.0 - Sebastien Godard (sysstat <at> orange.fr)
- * [Ivana Varekova]: Fix a problem with long NFS and CIFS share
+ * [Ivana Varekova]: Fixed a problem with long NFS and CIFS share
names in cifsiostat and nfsiostat.
* [Ivana Varekova]: Added the possibility to extend the number
of slots for NFS and CIFS mount points on the fly.
char line[256];
char aux[32];
int start = 0;
+ long long unsigned aux_open;
+ long long unsigned all_open = 0;
char cifs_name[MAX_NAME_LEN];
char name_tmp[MAX_NAME_LEN];
struct cifs_stats scifs;
/* Read CIFS directory name */
if (isdigit((unsigned char) line[0]) && sscanf(line, aux , name_tmp) == 1) {
if (start) {
+ scifs.fopens = all_open;
save_stats(cifs_name, curr, &scifs);
+ all_open = 0;
}
else {
start = 1;
}
if (!strncmp(line, "Opens:", 6)) {
sscanf(line, "Opens: %llu Closes:%llu Deletes: %llu",
- &scifs.fopens, &scifs.fcloses, &scifs.fdeletes);
+ &aux_open, &scifs.fcloses, &scifs.fdeletes);
+ all_open += aux_open;
+ }
+ if (!strncmp(line, "Posix Opens:", 12)) {
+ sscanf(line, "Posix Opens: %llu", &aux_open);
+ all_open += aux_open;
}
}
}
if (start) {
+ scifs.fopens = all_open;
save_stats(cifs_name, curr, &scifs);
}