全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 1931|回复: 10
打印 上一主题 下一主题

有没有探针是可以用vnstat的数据的?

[复制链接]
跳转到指定楼层
1#
发表于 2023-6-17 10:54:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
https://github.com/cppla/ServerStatus
https://github.com/zdz/ServerStatus-Rust
找了两个,第二个倒是说可以支持VNSTAT,但是配置起来一直出错,有老哥推荐的么?
2#
发表于 2023-6-17 11:07:13 | 只看该作者
https://github.com/cokemine/ServerStatus-Hotaru
3#
 楼主| 发表于 2023-6-17 11:10:59 | 只看该作者
炒土豆丝 发表于 2023-6-17 11:07
https://github.com/cokemine/ServerStatus-Hotaru

这个似乎又缺了3网延迟。。。。
4#
发表于 2023-6-17 11:54:02 来自手机 | 只看该作者
这两个都可以吧 其他好像没了
5#
 楼主| 发表于 2023-6-17 12:13:09 | 只看该作者
hacn 发表于 2023-6-17 11:54
这两个都可以吧 其他好像没了

第二个我用 rust后者python 都出错。。。哎
6#
发表于 2023-6-17 13:24:09 来自手机 | 只看该作者
rust的没有问题啊 报错贴出来 帮你看看
7#
 楼主| 发表于 2023-6-17 13:50:34 | 只看该作者
AaronYYDS 发表于 2023-6-17 13:24
rust的没有问题啊 报错贴出来 帮你看看

● stat_server.service - ServerStatus-Rust Server
     Loaded: loaded (/etc/systemd/system/stat_server.service; disabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sat 2023-06-17 01:50:01 EDT; 6ms ago
    Process: 14016 ExecStart=/opt/ServerStatus/stat_server -c /opt/ServerStatus/config.toml (code=exited, status=203/EXEC)
   Main PID: 14016 (code=exited, status=203/EXEC)
8#
 楼主| 发表于 2023-6-17 14:01:11 | 只看该作者
AaronYYDS 发表于 2023-6-17 13:24
rust的没有问题啊 报错贴出来 帮你看看

换了python版的就一直在跑码。。。。。也是不行
9#
发表于 2023-6-17 14:38:56 | 只看该作者
licong 发表于 2023-6-17 13:50
● stat_server.service - ServerStatus-Rust Server
     Loaded: loaded (/etc/systemd/system/stat_se ...

手动执行 /opt/ServerStatus/stat_server -c /opt/ServerStatus/config.toml 看看

权限给了吗
10#
 楼主| 发表于 2023-6-17 15:28:13 | 只看该作者
AaronYYDS 发表于 2023-6-17 14:38
手动执行 /opt/ServerStatus/stat_server -c /opt/ServerStatus/config.toml 看看

权限给了吗 ...

root@ubuntu:/opt/ServerStatus# /opt/ServerStatus/stat_server -c /opt/ServerStatus/config.toml
-bash: /opt/ServerStatus/stat_server: cannot execute binary file: Exec format error
root@ubuntu:/opt/ServerStatus# bash -ex one-touch.sh ./stat_server -c config.toml
+ set -ex
+ WORKSPACE=/opt/ServerStatus
+ mkdir -p /opt/ServerStatus
+ cd /opt/ServerStatus
+ OS_ARCH=x86_64
++ sed 's/\"//g;s/,//g;s/ //g'
++ awk -F : '{print $2}'
++ head -n 1
++ grep tag_name
++ curl -m 10 -sL https://api.github.com/repos/zdz/ServerStatus-Rust/releases/latest
+ latest_version=v1.7.2
+ wget --no-check-certificate -qO server-x86_64-unknown-linux-musl.zip https://github.com/zdz/ServerStatus-Rust/releases/download/v1.7.2/server-x86_64-unknown-linux-musl.zip
+ wget --no-check-certificate -qO client-x86_64-unknown-linux-musl.zip https://github.com/zdz/ServerStatus-Rust/releases/download/v1.7.2/client-x86_64-unknown-linux-musl.zip
+ unzip -o server-x86_64-unknown-linux-musl.zip
Archive:  server-x86_64-unknown-linux-musl.zip
  inflating: stat_server            
  inflating: stat_server.service     
  inflating: config.toml            
+ unzip -o client-x86_64-unknown-linux-musl.zip
Archive:  client-x86_64-unknown-linux-musl.zip
  inflating: stat_client            
  inflating: stat_client.service     
+ mv -v stat_server.service /etc/systemd/system/stat_server.service
renamed 'stat_server.service' -> '/etc/systemd/system/stat_server.service'
+ mv -v stat_client.service /etc/systemd/system/stat_client.service
renamed 'stat_client.service' -> '/etc/systemd/system/stat_client.service'
+ systemctl daemon-reload
+ systemctl start stat_server
+ systemctl start stat_client
+ systemctl status stat_server
● stat_server.service - ServerStatus-Rust Server
     Loaded: loaded (/etc/systemd/system/stat_server.service; disabled; vendor preset: enabled)
     Active: active (running) since Sat 2023-06-17 03:27:05 EDT; 46ms ago
   Main PID: 11061 ((t_server))
      Tasks: 1 (limit: 6999)
     Memory: 48.0K
     CGroup: /system.slice/stat_server.service

Jun 17 03:27:05 ubuntu systemd[1]: Started ServerStatus-Rust Server.
Jun 17 03:27:05 ubuntu systemd[11061]: stat_server.service: Failed to execute command: Exec format error
Jun 17 03:27:05 ubuntu systemd[11061]: stat_server.service: Failed at step EXEC spawning /opt/ServerStatus/stat_server: Exec format error
+ systemctl status stat_client
● stat_client.service - ServerStatus-Rust Client
     Loaded: loaded (/etc/systemd/system/stat_client.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sat 2023-06-17 03:27:05 EDT; 1ms ago
    Process: 11065 ExecStart=/opt/ServerStatus/stat_client -a http://127.0.0.1:8080/report -u h1 -p p1 (code=exited, status=203/EXEC)
   Main PID: 11065 (code=exited, status=203/EXEC)

Jun 17 03:27:05 ubuntu systemd[1]: stat_client.service: Main process exited, code=exited, status=203/EXEC
Jun 17 03:27:05 ubuntu systemd[1]: stat_client.service: Failed with result 'exit-code'.
root@ubuntu:/opt/ServerStatus#

好像报错差不多
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-2 10:28 , Processed in 0.072999 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表