Skip to content
Snippets Groups Projects

check netstat

Introduction

Count number of network connections.

Syntax

> ./check_netstat -h
______________________________________________________________________

CHECK_NETSTAT 
v1.1

(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________

Count number of network connections.

SYNTAX:
check_netstat [ -w value -c value -h ]

    -w VALUE       cpu usage warning level  (default: 75)
    -c VALUE       cpu usage critical level (default: 90)
    -h or --help   show this help.

PARAMETERS:

    None.

EXAMPLE:
check_netstat -w 60 -c 80 -p 40

If there is no -w and -c then the result is always OK.

Examples

Simple call:

> ./check_netstat
OK: NETSTAT - count of connections: 27
     20 ESTABLISHED
      4 LISTEN
      3 TIME_WAIT
 |established=20;;;0; listen=4;;;0; time-wait=3;;;0;