Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-2057 ofd: implement jobstats and few fixes
[fs/lustre-release.git]
/
lustre
/
ofd
/
lproc_ofd.c
diff --git
a/lustre/ofd/lproc_ofd.c
b/lustre/ofd/lproc_ofd.c
index
3fbfd1e
..
c40774b
100644
(file)
--- a/
lustre/ofd/lproc_ofd.c
+++ b/
lustre/ofd/lproc_ofd.c
@@
-464,6
+464,8
@@
static struct lprocfs_vars lprocfs_ofd_obd_vars[] = {
{ "capa", lprocfs_ofd_rd_capa,
lprocfs_ofd_wr_capa, 0 },
{ "capa_count", lprocfs_ofd_rd_capa_count, 0, 0 },
+ { "job_cleanup_interval", lprocfs_rd_job_interval,
+ lprocfs_wr_job_interval, 0},
{ 0 }
};
@@
-618,4
+620,19
@@
static ssize_t ofd_per_nid_stats_seq_write(struct file *file, const char *buf,
}
LPROC_SEQ_FOPS(ofd_per_nid_stats);
+
+void ofd_stats_counter_init(struct lprocfs_stats *stats)
+{
+ LASSERT(stats && stats->ls_num == LPROC_OFD_STATS_LAST);
+ lprocfs_counter_init(stats, LPROC_OFD_STATS_READ,
+ LPROCFS_CNTR_AVGMINMAX, "read", "bytes");
+ lprocfs_counter_init(stats, LPROC_OFD_STATS_WRITE,
+ LPROCFS_CNTR_AVGMINMAX, "write", "bytes");
+ lprocfs_counter_init(stats, LPROC_OFD_STATS_SETATTR,
+ 0, "setattr", "reqs");
+ lprocfs_counter_init(stats, LPROC_OFD_STATS_PUNCH,
+ 0, "punch", "reqs");
+ lprocfs_counter_init(stats, LPROC_OFD_STATS_SYNC,
+ 0, "sync", "reqs");
+}
#endif /* LPROCFS */