diff options
author | Mikolaj Golub <trociny@FreeBSD.org> | 2013-02-25 20:09:07 +0000 |
---|---|---|
committer | Mikolaj Golub <trociny@FreeBSD.org> | 2013-02-25 20:09:07 +0000 |
commit | 2adbba660d8dd25130ba17825fbf83888b70429a (patch) | |
tree | 7c3a030feb23f647bd2528a4d8e72a4d5621913d /sbin/hastd/control.c | |
parent | 7323adac99d399e58bdec71236a0db9ee6bfb6d2 (diff) | |
download | src-2adbba660d8dd25130ba17825fbf83888b70429a.tar.gz src-2adbba660d8dd25130ba17825fbf83888b70429a.zip |
Add i/o error counters to hastd(8) and make hastctl(8) display
them. This may be useful for detecting problems with HAST disks.
Discussed with and reviewed by: pjd
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=247281
Diffstat (limited to 'sbin/hastd/control.c')
-rw-r--r-- | sbin/hastd/control.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sbin/hastd/control.c b/sbin/hastd/control.c index 925fd32645cb..3619fc61ff09 100644 --- a/sbin/hastd/control.c +++ b/sbin/hastd/control.c @@ -207,6 +207,14 @@ control_status_worker(struct hast_resource *res, struct nv *nvout, "stat_flush%u", no); nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_activemap_update"), "stat_activemap_update%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_read_error"), + "stat_read_error%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_write_error"), + "stat_write_error%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_delete_error"), + "stat_delete_error%u", no); + nv_add_uint64(nvout, nv_get_uint64(cnvin, "stat_flush_error"), + "stat_flush_error%u", no); end: if (cnvin != NULL) nv_free(cnvin); @@ -459,6 +467,16 @@ ctrl_thread(void *arg) nv_add_uint64(nvout, res->hr_stat_flush, "stat_flush"); nv_add_uint64(nvout, res->hr_stat_activemap_update, "stat_activemap_update"); + nv_add_uint64(nvout, res->hr_stat_read_error, + "stat_read_error"); + nv_add_uint64(nvout, res->hr_stat_write_error + + res->hr_stat_activemap_write_error, + "stat_write_error"); + nv_add_uint64(nvout, res->hr_stat_delete_error, + "stat_delete_error"); + nv_add_uint64(nvout, res->hr_stat_flush_error + + res->hr_stat_activemap_flush_error, + "stat_flush_error"); nv_add_int16(nvout, 0, "error"); break; case CONTROL_RELOAD: |