Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
@guckyh
Favorites0
Views
Projects0
let's simple check for ssh-port 22 this is the part of code used - then it looks if there is at least ONE line netstat -an | grep LISTEN | grep 22 result: *.22 *.* 0 0 49152 0 LISTEN *.22 *.* 0 0 49152 0 LISTEN *.11221 *.* 0 0 49152 0 LISTEN *.11222 *.* 0 0 49152 0 LISTEN *.22 *.* 0 0 49152 0 LISTEN (you get any line containing "22" not only where the PORT is 22!!
Reviewed 13 years ago