add sigar_disk_usage_get
This commit is contained in:
parent
7239440ba6
commit
07e4db1d14
|
@ -464,6 +464,10 @@ sigar_file_system_usage_get(sigar_t *sigar,
|
||||||
const char *dirname,
|
const char *dirname,
|
||||||
sigar_file_system_usage_t *fsusage);
|
sigar_file_system_usage_t *fsusage);
|
||||||
|
|
||||||
|
SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar,
|
||||||
|
const char *name,
|
||||||
|
sigar_disk_usage_t *usage);
|
||||||
|
|
||||||
SIGAR_DECLARE(int)
|
SIGAR_DECLARE(int)
|
||||||
sigar_file_system_ping(sigar_t *sigar,
|
sigar_file_system_ping(sigar_t *sigar,
|
||||||
sigar_file_system_t *fs);
|
sigar_file_system_t *fs);
|
||||||
|
|
|
@ -1535,6 +1535,12 @@ int sigar_file_system_list_get(sigar_t *sigar,
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sigar_disk_usage_get(sigar_t *sigar, const char *name,
|
||||||
|
sigar_disk_usage_t *usage)
|
||||||
|
{
|
||||||
|
return SIGAR_ENOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
int sigar_file_system_usage_get(sigar_t *sigar,
|
int sigar_file_system_usage_get(sigar_t *sigar,
|
||||||
const char *dirname,
|
const char *dirname,
|
||||||
sigar_file_system_usage_t *fsusage)
|
sigar_file_system_usage_t *fsusage)
|
||||||
|
|
|
@ -592,6 +592,12 @@ static int create_fsdev_cache(sigar_t *sigar)
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sigar_disk_usage_get(sigar_t *sigar, const char *name,
|
||||||
|
sigar_disk_usage_t *usage)
|
||||||
|
{
|
||||||
|
return SIGAR_ENOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
int sigar_file_system_usage_get(sigar_t *sigar,
|
int sigar_file_system_usage_get(sigar_t *sigar,
|
||||||
const char *dirname,
|
const char *dirname,
|
||||||
sigar_file_system_usage_t *fsusage)
|
sigar_file_system_usage_t *fsusage)
|
||||||
|
|
|
@ -1508,8 +1508,8 @@ static int get_iostat_procp(sigar_t *sigar,
|
||||||
return ENOENT;
|
return ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sigar_disk_usage_get(sigar_t *sigar, const char *name,
|
int sigar_disk_usage_get(sigar_t *sigar, const char *name,
|
||||||
sigar_disk_usage_t *usage)
|
sigar_disk_usage_t *usage)
|
||||||
{
|
{
|
||||||
SIGAR_DISK_STATS_NOTIMPL(usage); /* init */
|
SIGAR_DISK_STATS_NOTIMPL(usage); /* init */
|
||||||
|
|
||||||
|
|
|
@ -314,6 +314,12 @@ int sigar_file_system_list_get(sigar_t *sigar,
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sigar_disk_usage_get(sigar_t *sigar, const char *name,
|
||||||
|
sigar_disk_usage_t *usage)
|
||||||
|
{
|
||||||
|
return SIGAR_ENOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
#define SIGAR_FS_BLOCKS_TO_BYTES(buf, f) \
|
#define SIGAR_FS_BLOCKS_TO_BYTES(buf, f) \
|
||||||
((buf.f * (buf.f_bsize / 512)) >> 1)
|
((buf.f * (buf.f_bsize / 512)) >> 1)
|
||||||
|
|
||||||
|
|
|
@ -452,6 +452,12 @@ int sigar_file_system_list_get(sigar_t *sigar,
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sigar_disk_usage_get(sigar_t *sigar, const char *name,
|
||||||
|
sigar_disk_usage_t *usage)
|
||||||
|
{
|
||||||
|
return SIGAR_ENOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
#define SIGAR_FS_BLOCKS_TO_BYTES(buf, f) \
|
#define SIGAR_FS_BLOCKS_TO_BYTES(buf, f) \
|
||||||
(((sigar_uint64_t)buf.f * (buf.f_bsize / 512)) >> 1)
|
(((sigar_uint64_t)buf.f * (buf.f_bsize / 512)) >> 1)
|
||||||
|
|
||||||
|
|
|
@ -188,6 +188,12 @@ int sigar_file_system_list_get(sigar_t *sigar,
|
||||||
return SIGAR_OK;
|
return SIGAR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sigar_disk_usage_get(sigar_t *sigar, const char *name,
|
||||||
|
sigar_disk_usage_t *usage)
|
||||||
|
{
|
||||||
|
return SIGAR_ENOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
int sigar_file_system_usage_get(sigar_t *sigar,
|
int sigar_file_system_usage_get(sigar_t *sigar,
|
||||||
const char *dirname,
|
const char *dirname,
|
||||||
sigar_file_system_usage_t *fsusage)
|
sigar_file_system_usage_t *fsusage)
|
||||||
|
|
|
@ -1780,9 +1780,9 @@ static PERF_INSTANCE_DEFINITION *get_disk_instance(sigar_t *sigar,
|
||||||
return PdhFirstInstance(object);
|
return PdhFirstInstance(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sigar_disk_usage_get(sigar_t *sigar,
|
SIGAR_DECLARE(int) sigar_disk_usage_get(sigar_t *sigar,
|
||||||
const char *dirname,
|
const char *dirname,
|
||||||
sigar_disk_usage_t *fsusage)
|
sigar_disk_usage_t *fsusage)
|
||||||
{
|
{
|
||||||
DWORD i, err;
|
DWORD i, err;
|
||||||
PERF_OBJECT_TYPE *object =
|
PERF_OBJECT_TYPE *object =
|
||||||
|
|
Loading…
Reference in New Issue