|
@@ -203,7 +203,7 @@ main(int argc, char **argv) {
|
|
|
|
|
|
|
|
/* check CPU load */
|
|
/* check CPU load */
|
|
|
if (vars_to_check==LOAD1 || vars_to_check==LOAD5 || vars_to_check==LOAD15) {
|
|
if (vars_to_check==LOAD1 || vars_to_check==LOAD5 || vars_to_check==LOAD15) {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
switch(vars_to_check) {
|
|
switch(vars_to_check) {
|
|
|
case LOAD1:
|
|
case LOAD1:
|
|
|
temp_buffer = strdup ("1");
|
|
temp_buffer = strdup ("1");
|
|
@@ -249,7 +249,7 @@ main(int argc, char **argv) {
|
|
|
temp_buffer,
|
|
temp_buffer,
|
|
|
utilization,
|
|
utilization,
|
|
|
warning_value,
|
|
warning_value,
|
|
|
- critical_value);
|
|
|
|
|
|
|
+ critical_value);
|
|
|
|
|
|
|
|
/* check number of user connections */
|
|
/* check number of user connections */
|
|
|
} else if (vars_to_check==CONNS) {
|
|
} else if (vars_to_check==CONNS) {
|
|
@@ -457,7 +457,7 @@ main(int argc, char **argv) {
|
|
|
critical_value);
|
|
critical_value);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/* check % free space on volume */
|
|
/* check % free space on volume */
|
|
|
} else if (vars_to_check==VPF) {
|
|
} else if (vars_to_check==VPF) {
|
|
|
|
|
|
|
@@ -568,11 +568,11 @@ main(int argc, char **argv) {
|
|
|
result=STATE_WARNING;
|
|
result=STATE_WARNING;
|
|
|
asprintf (&output_message,_("Warning - NRM Status is suspect!"));
|
|
asprintf (&output_message,_("Warning - NRM Status is suspect!"));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
asprintf (&output_message,_("OK - NRM Status is good!"));
|
|
asprintf (&output_message,_("OK - NRM Status is good!"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/* check packet receive buffers */
|
|
/* check packet receive buffers */
|
|
|
} else if (vars_to_check==UPRB || vars_to_check==PUPRB) {
|
|
} else if (vars_to_check==UPRB || vars_to_check==PUPRB) {
|
|
@@ -827,7 +827,7 @@ main(int argc, char **argv) {
|
|
|
open_files,
|
|
open_files,
|
|
|
warning_value,
|
|
warning_value,
|
|
|
critical_value);
|
|
critical_value);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/* check # of abended threads (Netware > 5.x only) */
|
|
/* check # of abended threads (Netware > 5.x only) */
|
|
|
} else if (vars_to_check==ABENDS) {
|
|
} else if (vars_to_check==ABENDS) {
|
|
@@ -914,7 +914,7 @@ main(int argc, char **argv) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/* check LRU sitting time in secondss */
|
|
/* check LRU sitting time in secondss */
|
|
|
} else if (vars_to_check==LRUS) {
|
|
} else if (vars_to_check==LRUS) {
|
|
|
|
|
|
|
@@ -977,7 +977,7 @@ main(int argc, char **argv) {
|
|
|
total_cache_buffers,
|
|
total_cache_buffers,
|
|
|
warning_value,
|
|
warning_value,
|
|
|
critical_value);
|
|
critical_value);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
} else if (vars_to_check==DSVER) {
|
|
} else if (vars_to_check==DSVER) {
|
|
|
|
|
|
|
|
close(sd);
|
|
close(sd);
|
|
@@ -1005,7 +1005,7 @@ main(int argc, char **argv) {
|
|
|
|
|
|
|
|
recv_buffer[sizeof(recv_buffer)-1]=0;
|
|
recv_buffer[sizeof(recv_buffer)-1]=0;
|
|
|
recv_buffer[strlen(recv_buffer)-1]=0;
|
|
recv_buffer[strlen(recv_buffer)-1]=0;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
asprintf (&output_message,_("Up %s"),recv_buffer);
|
|
asprintf (&output_message,_("Up %s"),recv_buffer);
|
|
|
|
|
|
|
|
} else if (vars_to_check==NLM) {
|
|
} else if (vars_to_check==NLM) {
|
|
@@ -1024,7 +1024,7 @@ main(int argc, char **argv) {
|
|
|
} else {
|
|
} else {
|
|
|
result=STATE_CRITICAL;
|
|
result=STATE_CRITICAL;
|
|
|
asprintf (&output_message,_("Module %s is not loaded"),nlm_name);
|
|
asprintf (&output_message,_("Module %s is not loaded"),nlm_name);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
} else if (vars_to_check==NRMP) {
|
|
} else if (vars_to_check==NRMP) {
|
|
|
|
|
|
|
@@ -1313,7 +1313,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
|
|
|
|
|
int option = 0;
|
|
int option = 0;
|
|
|
static struct option longopts[] =
|
|
static struct option longopts[] =
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
{"port", required_argument,0,'p'},
|
|
{"port", required_argument,0,'p'},
|
|
|
{"timeout", required_argument,0,'t'},
|
|
{"timeout", required_argument,0,'t'},
|
|
|
{"critical", required_argument,0,'c'},
|
|
{"critical", required_argument,0,'c'},
|
|
@@ -1498,7 +1498,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nrmm_name = strdup (optarg+4);
|
|
nrmm_name = strdup (optarg+4);
|
|
|
if (!strcmp(nrmm_name,""))
|
|
if (!strcmp(nrmm_name,""))
|
|
|
nrmm_name = strdup ("AVAILABLE_CACHE_MEMORY");
|
|
nrmm_name = strdup ("AVAILABLE_CACHE_MEMORY");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
else if (strncmp(optarg,"NRMS",4)==0) {
|
|
else if (strncmp(optarg,"NRMS",4)==0) {
|
|
@@ -1506,7 +1506,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nrms_name = strdup (optarg+4);
|
|
nrms_name = strdup (optarg+4);
|
|
|
if (!strcmp(nrms_name,""))
|
|
if (!strcmp(nrms_name,""))
|
|
|
nrms_name = strdup ("USED_SWAP_SPACE");
|
|
nrms_name = strdup ("USED_SWAP_SPACE");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
else if (strncmp(optarg,"NSS1",4)==0) {
|
|
else if (strncmp(optarg,"NSS1",4)==0) {
|
|
@@ -1514,7 +1514,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nss1_name = strdup (optarg+4);
|
|
nss1_name = strdup (optarg+4);
|
|
|
if (!strcmp(nss1_name,""))
|
|
if (!strcmp(nss1_name,""))
|
|
|
nss1_name = strdup ("CURRENTBUFFERCACHESIZE");
|
|
nss1_name = strdup ("CURRENTBUFFERCACHESIZE");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
else if (strncmp(optarg,"NSS2",4)==0) {
|
|
else if (strncmp(optarg,"NSS2",4)==0) {
|
|
@@ -1522,7 +1522,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nss2_name = strdup (optarg+4);
|
|
nss2_name = strdup (optarg+4);
|
|
|
if (!strcmp(nss2_name,""))
|
|
if (!strcmp(nss2_name,""))
|
|
|
nss2_name = strdup ("CACHEHITS");
|
|
nss2_name = strdup ("CACHEHITS");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
else if (strncmp(optarg,"NSS3",4)==0) {
|
|
else if (strncmp(optarg,"NSS3",4)==0) {
|
|
@@ -1530,7 +1530,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nss3_name = strdup (optarg+4);
|
|
nss3_name = strdup (optarg+4);
|
|
|
if (!strcmp(nss3_name,""))
|
|
if (!strcmp(nss3_name,""))
|
|
|
nss3_name = strdup ("CACHEGITPERCENT");
|
|
nss3_name = strdup ("CACHEGITPERCENT");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
else if (strncmp(optarg,"NSS4",4)==0) {
|
|
else if (strncmp(optarg,"NSS4",4)==0) {
|
|
@@ -1538,7 +1538,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nss4_name = strdup (optarg+4);
|
|
nss4_name = strdup (optarg+4);
|
|
|
if (!strcmp(nss4_name,""))
|
|
if (!strcmp(nss4_name,""))
|
|
|
nss4_name = strdup ("CURRENTOPENCOUNT");
|
|
nss4_name = strdup ("CURRENTOPENCOUNT");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
else if (strncmp(optarg,"NSS5",4)==0) {
|
|
else if (strncmp(optarg,"NSS5",4)==0) {
|
|
@@ -1546,7 +1546,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nss5_name = strdup (optarg+4);
|
|
nss5_name = strdup (optarg+4);
|
|
|
if (!strcmp(nss5_name,""))
|
|
if (!strcmp(nss5_name,""))
|
|
|
nss5_name = strdup ("CACHEMISSES");
|
|
nss5_name = strdup ("CACHEMISSES");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1555,7 +1555,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nss6_name = strdup (optarg+4);
|
|
nss6_name = strdup (optarg+4);
|
|
|
if (!strcmp(nss6_name,""))
|
|
if (!strcmp(nss6_name,""))
|
|
|
nss6_name = strdup ("PENDINGWORKSCOUNT");
|
|
nss6_name = strdup ("PENDINGWORKSCOUNT");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1564,7 +1564,7 @@ int process_arguments(int argc, char **argv) {
|
|
|
nss7_name = strdup (optarg+4);
|
|
nss7_name = strdup (optarg+4);
|
|
|
if (!strcmp(nss7_name,""))
|
|
if (!strcmp(nss7_name,""))
|
|
|
nss7_name = strdup ("CACHESIZE");
|
|
nss7_name = strdup ("CACHESIZE");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|