路由器型号

  • 安博通ASR3000

  • 硬盘 112.46 MiB

  • 内存 224M+112M

总之至少要能存下nezha探针才行(解压后15.7M )

之前好像看到个c++写的agent,占用应该会小很多,但没star,懒得找了

我下载的是nezha-agent_linux_arm64.zip

先在哪吒面板新增服务器

wget https://github.com/nezhahq/agent/releases/download/v0.16.8/nezha-agent_linux_arm64.zip
unzip nezha-agent_linux_arm64.zip
mv nezha-agent /bin
rm nezha-agent_linux_arm64.zip
cd /etc/init.d/
vim nezha
#!/bin/sh /etc/rc.common

PROG=/bin/nezha-agent
USE_PROCD=1
START=95
STOP=01

start_service() {
 procd_open_instance nezha
 procd_set_param command "$PROG" -s ip:port -p code
 procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-0}
 procd_set_param stdout 1
 procd_set_param stderr 1
 procd_close_instance
}

stop_service(){
 service_stop "$PROG"
}

ip:port和code替换成服务器地址、哪吒面板端口、密钥

service nezha enable # 开机启动
service nezha start # 启动

不是大陆的原因应该是查IP接口走了代理

相关链接