Netstat output to file

broken image
broken image
broken image

Third element (result) is optional, the actual result. Second element (msg) is a string containing error message, or 'OK' if status is 200. You need to invoke 'netstat' on your own.įirst element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). This function only parses program's output. This function is not exported by default, but exportable.Īrguments ('*' denotes required arguments):

broken image

Since different flavors provide different fields and same-named fields might contain data in different format, and also not all kinds of possible output from a single flavor are supported, please see the sample parse output for each flavor (in corresponding Parse::Netstat::* per-flavor module) you want to use and adjust accordingly. Use -flavor to select which flavor you want. This program support several flavors of netstat. My $res = parse_netstat(output => join('', `netstat -anp`), flavor=>'linux') FUNCTIONS parse_netstat SYNOPSIS use Parse::Netstat qw(parse_netstat) This document describes version 0.14 of Parse::Netstat (from Perl distribution Parse-Netstat), released on. Parse::Netstat - Parse the output of 'netstat' command VERSION