diff options
author | glebius <glebius@FreeBSD.org> | 2012-09-11 20:20:13 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-09-11 20:20:13 +0000 |
commit | d14a6db068f8bf0a1f7cca00a57c390f5149ba74 (patch) | |
tree | 5fe082740a170d3ef4eaf6a7ad1e3c6b5bcc510e /sys | |
parent | e5cce319848354c2c918f69cdc973119df7a9383 (diff) | |
download | FreeBSD-src-d14a6db068f8bf0a1f7cca00a57c390f5149ba74.zip FreeBSD-src-d14a6db068f8bf0a1f7cca00a57c390f5149ba74.tar.gz |
When synchronizing, include in the config dump amount of
bytes syncronized.
The rationale behind this is the following: for large disks the
percent synchronisation counter ticks too seldom, and monitoring
software (as well as human operator) can't tell whether
synchronisation goes on or one of disks got stuck. On an idle
server one can look into gstat and see whether synchronisation goes
on or not, but on a busy server that won't work. Also, new value
monitored can be differentiated obtaining the synchronisation speed
quite precisely.
Submitted by: Konstantin Kukushkin <dark ramtel.ru>
Reviewed by: pjd
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/mirror/g_mirror.c | 5 | ||||
-rw-r--r-- | sys/geom/raid3/g_raid3.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 3f60fd2..17271dd 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -3144,6 +3144,11 @@ g_mirror_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, sc->sc_provider->mediasize)); } sbuf_printf(sb, "</Synchronized>\n"); + if (disk->d_sync.ds_offset > 0) { + sbuf_printf(sb, "%s<BytesSynced>%jd" + "</BytesSynced>\n", indent, + (intmax_t)disk->d_sync.ds_offset); + } } sbuf_printf(sb, "%s<SyncID>%u</SyncID>\n", indent, disk->d_sync.ds_syncid); diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c index 029d255..711e9e1 100644 --- a/sys/geom/raid3/g_raid3.c +++ b/sys/geom/raid3/g_raid3.c @@ -3448,6 +3448,11 @@ g_raid3_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, (sc->sc_mediasize / (sc->sc_ndisks - 1)))); } sbuf_printf(sb, "</Synchronized>\n"); + if (disk->d_sync.ds_offset > 0) { + sbuf_printf(sb, "%s<BytesSynced>%jd" + "</BytesSynced>\n", indent, + (intmax_t)disk->d_sync.ds_offset); + } } sbuf_printf(sb, "%s<SyncID>%u</SyncID>\n", indent, disk->d_sync.ds_syncid); |