On Wed, Feb 6, 2013 at 7:40 AM, PAL <[email protected]> wrote:
> A few days ago I found that netstat call ate a lot of CPU time on my Amazon
> EC2 instances. After some research it turned out that the rootcheck port
> checking is not optimal:
>
>> netstat -an | grep \"^%s\" | " \
>>                  "grep \"[^0-9]%d \" > /dev/null 2>&1
>
>
> So, there is a small patch, contained a little bit of optimization (a half
> CPU usage time less expected)
>
> --
>

I don't think your patch is correct.

"netstat -ant" produces "netstat: illegal option -- t" on Solaris 10 &
11. On OpenBSD the manpage says -t does: "-t      With the -i option,
display the current value of the watchdog timer function." I don't
think this was your intent.

"netstat -anu" produces a similar error for Solaris 10 & 11, and the
OpenBSD manpage describes it as limiting the view to the AF_UNIX
address family (you've mislabeled it as UDP).


> ---
> You received this message because you are subscribed to the Google Groups
> "ossec-list" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"ossec-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to