def netstat(name):
    '''
    Retrieve the netstat information of the given process name.

    CLI Example:

    .. code-block:: bash

        salt '*' ps.netstat apache2
    '''
    sanitize_name = six.text_type(name)
    netstat_infos = __salt__['cmd.run']("netstat -nap")
    found_infos = []
    ret = []
    for info in netstat_infos.splitlines():
        if info.find(sanitize_name) != -1:
            found_infos.append(info)
    ret.extend([sanitize_name, found_infos])
    return ret
Retrieve the netstat information of the given process name.

    CLI Example:

    .. code-block:: bash

        salt '*' ps.netstat apache2