ehang-io / nps

一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.

Home Page:https://ehang.io/nps/documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npc 长时间运行后cpu占用高,重启/停止报错

bensjohn opened this issue · comments

Describe the bug
运行十天左右top显示占用300%cpu。实际nps的服务只有我一个人在用,不应该这么高

Tasks: 170 total,   1 running, 169 sleeping,   0 stopped,   0 zombie
%Cpu(s): 75.2 us,  0.1 sy,  0.0 ni, 24.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    984.1 total,    342.0 free,    277.8 used,    364.3 buff/cache
MiB Swap:    492.1 total,    436.1 free,     56.0 used.    652.7 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                 
    994 root      20   0  716360  49196   4548 S 299.3   4.9   8965:32 npc                                                                     
    165 root     -91   0       0      0      0 S   0.3   0.0  24:09.25 sdiohal_rx_thre                                                         
 622405 root      20   0    9948   3476   2740 R   0.3   0.3   0:00.18 top   

root@orangepizero2:/var/log# /usr/local/npc/npc stop
2023/06/13 19:29:31.483 [E] [npc.go:139]  Valid actions: ["start" "stop" "restart" "install" "uninstall"]
Failed to stop nps内网穿透客户端: exit status 5
root@orangepizero2:/var/log# /usr/local/npc/npc restart
2023/06/13 19:29:37.022 [E] [npc.go:139]  Valid actions: ["start" "stop" "restart" "install" "uninstall"]
Failed to restart nps内网穿透客户端: exit status 5
         

To Reproduce
长时间运行后可出现

Expected behavior
为什么占用高,以及如何重启

Screenshots or logs
npc.log有未知的ip尝试连接日志,但并发不高

Server (please complete the following information):

  • OS: centos
  • ARCH: x86_64
  • Tunnel TCP
  • Version 0.24.9
  • [root@iZwz9539thiyesewc0sk83Z log]# lsb_release -a
    LSB Version: :core-4.1-amd64:core-4.1-noarch
    Distributor ID: AlibabaCloud
    Description: Alibaba Cloud Linux release 3 (Soaring Falcon)
    Release: 3
    Codename: SoaringFalcon

Client (please complete the following information):

  • OS: ubuntu
  • ARCH: aarch64
  • Tunnel TCP
  • Version 0.24.9
  • root@orangepizero2:/var/log# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 22.04.2 LTS
    Release: 22.04
    Codename: jammy

Additional context
Add any other context about the problem here.

commented

大佬,你解决了没

我也一样,CPU直接爆了