influxDB系列(二)--查看数据库的大小
google 搜索了好多文档,终于发现了这个靠谱的回答。
https://groups.google.com/forum/#!topic/influxdb/I5eady_Ta5Y
You can see the approximate size of the InfluxDB data directory by running the following query against the `_internal` databases `shard` measurement:
```
select sum(diskBytes) / 1024 / 1024 /1024 from _internal."monitor"."shard" where time > now() - 10s
```
```
select sum(diskBytes) / 1024 / 1024 /1024 from _internal."monitor"."shard" where time > now() - 10s
```
The result will be in gigabytes. You can also see the size per database by adding a `group by "database"`:
```
select sum(diskBytes) / 1024 / 1024 /1024 from _internal."monitor"."shard" where time > now() - 10s group by "database"
```
```
select sum(diskBytes) / 1024 / 1024 /1024 from _internal."monitor"."shard" where time > now() - 10s group by "database"
```
On Fri, Nov 18, 2016 at 5:59 AM, <veerare...@gmail.com> wrote:
I would like to check disk usage percentage on a server during a load tes.
Is there any way to capture disk usage metric in influxdb?
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups "InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+u...@googlegroups.com.
To post to this group, send email to infl...@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/8812fbce-a17f-4168-aa72-c319a0b31bc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.