svn commit: r247867 - stable/9/sbin/hastctl
Mikolaj Golub
trociny at FreeBSD.org
Wed Mar 6 06:58:12 UTC 2013
Author: trociny
Date: Wed Mar 6 06:58:11 2013
New Revision: 247867
URL: http://svnweb.freebsd.org/changeset/base/247867
Log:
MFC r247281, r247345:
r247281:
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
r247345:
Fix casting.
Modified:
stable/9/sbin/hastctl/hastctl.c
Directory Properties:
stable/9/sbin/hastctl/ (props changed)
Modified: stable/9/sbin/hastctl/hastctl.c
==============================================================================
--- stable/9/sbin/hastctl/hastctl.c Wed Mar 6 06:57:18 2013 (r247866)
+++ stable/9/sbin/hastctl/hastctl.c Wed Mar 6 06:58:11 2013 (r247867)
@@ -342,15 +342,21 @@ control_status(struct nv *nv)
(intmax_t)nv_get_uint64(nv, "dirty%u", ii));
printf(" statistics:\n");
printf(" reads: %ju\n",
- (uint64_t)nv_get_uint64(nv, "stat_read%u", ii));
+ (uintmax_t)nv_get_uint64(nv, "stat_read%u", ii));
printf(" writes: %ju\n",
- (uint64_t)nv_get_uint64(nv, "stat_write%u", ii));
+ (uintmax_t)nv_get_uint64(nv, "stat_write%u", ii));
printf(" deletes: %ju\n",
- (uint64_t)nv_get_uint64(nv, "stat_delete%u", ii));
+ (uintmax_t)nv_get_uint64(nv, "stat_delete%u", ii));
printf(" flushes: %ju\n",
- (uint64_t)nv_get_uint64(nv, "stat_flush%u", ii));
+ (uintmax_t)nv_get_uint64(nv, "stat_flush%u", ii));
printf(" activemap updates: %ju\n",
- (uint64_t)nv_get_uint64(nv, "stat_activemap_update%u", ii));
+ (uintmax_t)nv_get_uint64(nv, "stat_activemap_update%u", ii));
+ printf(" local errors: "
+ "read: %ju, write: %ju, delete: %ju, flush: %ju\n",
+ (uintmax_t)nv_get_uint64(nv, "stat_read_error%u", ii),
+ (uintmax_t)nv_get_uint64(nv, "stat_write_error%u", ii),
+ (uintmax_t)nv_get_uint64(nv, "stat_delete_error%u", ii),
+ (uintmax_t)nv_get_uint64(nv, "stat_flush_error%u", ii));
}
return (ret);
}
More information about the svn-src-stable-9
mailing list