npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-node-ping-zh

v0.3.7

Published

用于ping远程服务器的Node-RED节点,用作保活检查(中文版)

Readme

node-red-node-ping-zh

一个用于ping远程服务器的Node-RED节点,用作保活检查。

安装

使用编辑器 - 菜单 - 管理调色板 - 导入选项,或在Node-RED用户目录中运行以下命令 - 通常是 ~/.node-red

npm install node-red-node-ping-zh

注意事项

  1. Ubuntu Snap容器是严格的,不喜欢给外部命令(如ping)外部访问。要允许ping工作,必须手动添加网络观察接口

    sudo snap connect node-red:network-observe

  2. 在某些版本的Raspbian(树莓派)上,ping似乎是仅限root用户的命令。 修复方法如下

sudo setcap cap_net_raw=ep /bin/ping
sudo setcap cap_net_raw=ep /bin/ping6

使用方法

Ping一个或多个设备,并以毫秒为单位返回往返时间作为msg.payload

如果未收到响应或主机无法解析,则返回布尔值false

如有必要,msg.error将包含任何错误消息。

msg.topic包含目标主机的IP地址。

有两种模式 - 定时触发

  • 定时模式 - 这是默认模式,按定时方式ping您的设备。默认ping间隔为20秒,但可以配置。
  • 触发模式 - 此模式允许您通过输入消息触发ping。如果目标留空且msg.payload是字符串或数组,您可以按需ping一个或多个设备。

有关更多详细信息,请参阅侧边栏信息面板中的内置帮助。