#!/bin/sh echo netstat --wide --all --numeric --tcp --udp # make sure all output goes to stdout: netstat sends stuff # like "warning, got bogus tcp line." to stderr. we don't want # to cause an extra email to get sent when called from cron. # we want both IPs and resolved names. for now, settle for --numeric. netstat --wide --all --numeric --tcp --udp 2>&1 echo