如果我的服务器有未计量的 100mbps,我如何检查我的带宽现在饱和了多少?

发布于 2024-12-02 07:38:32 字数 229 浏览 2 评论 0原文

我正在设计一个可在多个上传服务器上运行的 PHP 应用程序 我基本上想做的是使用 Cronjob 从每个子服务器获取报告,并给我: 1- 驱动器上还剩多少空间以及 2- 该服务器的带宽有多少是饱和的(例如,如果一台服务器以全带宽运行,现在使用另一台服务器)

我在 linux 上使用 df 解决的第一个问题,但是如何获得当前带宽饱和度以在我的服务器中使用PHP 应用程序?我应该在linux中使用哪个命令?

谢谢

I'm designing a PHP application that works on several upload servers
What I basically want to do, is to use a Cronjob that fetches reports from each sub-server, and gives me:
1- How much space is left on the drive and
2- How much the bandwidth for that server is saturated (e.g. if a server is running at full bandwidth, use another now)

The first problem I solved with df on linux, but how do I get the current bandwidth saturation to be used in my PHP app? Which command should I use in linux?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

内心荒芜 2024-12-09 07:38:32

您可以在执行命令时捕获 shell_exec() 的输出,但是我想您已经为 df 做到了这一点。

至于带宽,这是描述的这里。您可以直接在 PHP 中读取这些文件。

You can capture the output of shell_exec() while executing a command, but I figure you already do that for df.

As for the bandwidth, this is described here. You could read those files directly in PHP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文