好好爱自己!

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
```

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"
```

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.
posted @   立志做一个好的程序员  阅读(3359)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
历史上的今天:
2015-07-07 PHP的json_encode中文被转码的问题

不断学习创作,与自己快乐相处

点击右上角即可分享
微信分享提示