DEV Community

loading...

Using netcat as a test statsd server

langsharpe profile image Lang Sharpe ・1 min read

Netcat will listen on a port and write what it receives to stdout.

nc -u -l -p 8125
# -u UDP
# -l Listen
# -p Port
Enter fullscreen mode Exit fullscreen mode

It only works for a single line/connection. (Other versions have an option to keep listening. However, I wasn’t able to find one that ran on MacOS).

Discussion (0)

pic
Editor guide