add some iostat related debug msgs

This commit is contained in:
Doug MacEachern 2007-09-27 23:28:13 +00:00
parent 53a95a5de5
commit 45fd67e2aa
1 changed files with 16 additions and 0 deletions

View File

@ -1464,6 +1464,7 @@ static int create_fsdev_cache(sigar_t *sigar)
sigar_file_system_list_t fslist; sigar_file_system_list_t fslist;
int i, j; int i, j;
int status; int status;
int debug = SIGAR_LOG_IS_DEBUG(sigar);
sigar->fsdev = sigar_cache_new(15); sigar->fsdev = sigar_cache_new(15);
@ -1491,6 +1492,12 @@ static int create_fsdev_cache(sigar_t *sigar)
continue; continue;
} }
device[len] = '\0'; device[len] = '\0';
if (debug) {
sigar_log_printf(sigar, SIGAR_LOG_DEBUG, "[fsdev] name=%s, dev=%s",
fsp->dev_name, device);
}
while (strnEQ(ptr, "../", 3)) { while (strnEQ(ptr, "../", 3)) {
ptr += 3; ptr += 3;
} }
@ -1524,6 +1531,15 @@ static int create_fsdev_cache(sigar_t *sigar)
fs_kstat->partition = partition; fs_kstat->partition = partition;
ent = sigar_cache_get(sigar->fsdev, FSDEV_ID(sb)); ent = sigar_cache_get(sigar->fsdev, FSDEV_ID(sb));
ent->value = fs_kstat; ent->value = fs_kstat;
if (debug) {
sigar_log_printf(sigar, SIGAR_LOG_DEBUG,
"[fsdev] map %s -> %s%d,%c",
fsp->dir_name,
fs_kstat->module,
fs_kstat->instance,
fs_kstat->partition);
}
} }
break; break;
} }