summaryrefslogtreecommitdiffstats
path: root/plugins/check_nwstat.c
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-04-27 14:35:26 (GMT)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>2008-04-27 14:35:26 (GMT)
commited62784a0b68959fd13fe5bc53a5aef4f17fbffa (patch)
treef479a5b8ad8cac8d6dcc506ba61aa5ec3fbb5bb3 /plugins/check_nwstat.c
parent140a93ce6bce63df2d70841f2f78aa968ea997d6 (diff)
downloadmonitoring-plugins-ed62784a0b68959fd13fe5bc53a5aef4f17fbffa.tar.gz
--help output cleanup (plus removal of spaces on blank lines)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_nwstat.c')
-rw-r--r--plugins/check_nwstat.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c
index a1a3f35..3c8d5b9 100644
--- a/plugins/check_nwstat.c
+++ b/plugins/check_nwstat.c
@@ -518,14 +518,14 @@ main(int argc, char **argv) {
518 result=STATE_OK; 518 result=STATE_OK;
519 else 519 else
520 result=STATE_WARNING; 520 result=STATE_WARNING;
521 521
522 close(sd); 522 close(sd);
523 my_tcp_connect (server_address, server_port, &sd); 523 my_tcp_connect (server_address, server_port, &sd);
524 524
525 send_buffer = strdup ("S13\r\n"); 525 send_buffer = strdup ("S13\r\n");
526 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); 526 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
527 temp_buffer=strtok(recv_buffer,"\r\n"); 527 temp_buffer=strtok(recv_buffer,"\r\n");
528 528
529 asprintf (&output_message,_("Directory Services Database is %s (DS version %s)"),(result==STATE_OK)?"open":"closed",temp_buffer); 529 asprintf (&output_message,_("Directory Services Database is %s (DS version %s)"),(result==STATE_OK)?"open":"closed",temp_buffer);
530 530
531 /* check to see if logins are enabled */ 531 /* check to see if logins are enabled */
@@ -593,7 +593,7 @@ main(int argc, char **argv) {
593 return result; 593 return result;
594 594
595 max_packet_receive_buffers=atoi(recv_buffer); 595 max_packet_receive_buffers=atoi(recv_buffer);
596 596
597 percent_used_packet_receive_buffers=(unsigned long)(((double)used_packet_receive_buffers/(double)max_packet_receive_buffers)*100.0); 597 percent_used_packet_receive_buffers=(unsigned long)(((double)used_packet_receive_buffers/(double)max_packet_receive_buffers)*100.0);
598 598
599 if (vars_to_check==UPRB) { 599 if (vars_to_check==UPRB) {
@@ -607,7 +607,7 @@ main(int argc, char **argv) {
607 else if (check_warning_value==TRUE && percent_used_packet_receive_buffers >= warning_value) 607 else if (check_warning_value==TRUE && percent_used_packet_receive_buffers >= warning_value)
608 result=STATE_WARNING; 608 result=STATE_WARNING;
609 } 609 }
610 610
611 asprintf (&output_message,_("%lu of %lu (%lu%%) packet receive buffers used"),used_packet_receive_buffers,max_packet_receive_buffers,percent_used_packet_receive_buffers); 611 asprintf (&output_message,_("%lu of %lu (%lu%%) packet receive buffers used"),used_packet_receive_buffers,max_packet_receive_buffers,percent_used_packet_receive_buffers);
612 612
613 /* check SAP table entries */ 613 /* check SAP table entries */
@@ -623,9 +623,9 @@ main(int argc, char **argv) {
623 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); 623 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
624 if (result!=STATE_OK) 624 if (result!=STATE_OK)
625 return result; 625 return result;
626 626
627 sap_entries=atoi(recv_buffer); 627 sap_entries=atoi(recv_buffer);
628 628
629 if (check_critical_value==TRUE && sap_entries >= critical_value) 629 if (check_critical_value==TRUE && sap_entries >= critical_value)
630 result=STATE_CRITICAL; 630 result=STATE_CRITICAL;
631 else if (check_warning_value==TRUE && sap_entries >= warning_value) 631 else if (check_warning_value==TRUE && sap_entries >= warning_value)
@@ -811,9 +811,9 @@ main(int argc, char **argv) {
811 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); 811 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
812 if (result!=STATE_OK) 812 if (result!=STATE_OK)
813 return result; 813 return result;
814 814
815 open_files=atoi(recv_buffer); 815 open_files=atoi(recv_buffer);
816 816
817 if (check_critical_value==TRUE && open_files >= critical_value) 817 if (check_critical_value==TRUE && open_files >= critical_value)
818 result=STATE_CRITICAL; 818 result=STATE_CRITICAL;
819 else if (check_warning_value==TRUE && open_files >= warning_value) 819 else if (check_warning_value==TRUE && open_files >= warning_value)
@@ -836,9 +836,9 @@ main(int argc, char **argv) {
836 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); 836 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
837 if (result!=STATE_OK) 837 if (result!=STATE_OK)
838 return result; 838 return result;
839 839
840 abended_threads=atoi(recv_buffer); 840 abended_threads=atoi(recv_buffer);
841 841
842 if (check_critical_value==TRUE && abended_threads >= critical_value) 842 if (check_critical_value==TRUE && abended_threads >= critical_value)
843 result=STATE_CRITICAL; 843 result=STATE_CRITICAL;
844 else if (check_warning_value==TRUE && abended_threads >= warning_value) 844 else if (check_warning_value==TRUE && abended_threads >= warning_value)
@@ -860,9 +860,9 @@ main(int argc, char **argv) {
860 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); 860 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
861 if (result!=STATE_OK) 861 if (result!=STATE_OK)
862 return result; 862 return result;
863 863
864 max_service_processes=atoi(recv_buffer); 864 max_service_processes=atoi(recv_buffer);
865 865
866 close(sd); 866 close(sd);
867 my_tcp_connect (server_address, server_port, &sd); 867 my_tcp_connect (server_address, server_port, &sd);
868 868
@@ -870,9 +870,9 @@ main(int argc, char **argv) {
870 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer)); 870 result=send_tcp_request(sd,send_buffer,recv_buffer,sizeof(recv_buffer));
871 if (result!=STATE_OK) 871 if (result!=STATE_OK)
872 return result; 872 return result;
873 873
874 current_service_processes=atoi(recv_buffer); 874 current_service_processes=atoi(recv_buffer);
875 875
876 if (check_critical_value==TRUE && current_service_processes >= critical_value) 876 if (check_critical_value==TRUE && current_service_processes >= critical_value)
877 result=STATE_CRITICAL; 877 result=STATE_CRITICAL;
878 else if (check_warning_value==TRUE && current_service_processes >= warning_value) 878 else if (check_warning_value==TRUE && current_service_processes >= warning_value)
@@ -1673,7 +1673,7 @@ void print_help(void)
1673 printf (" %s\n", _(" (available from http://www.engr.wisc.edu/~drews/mrtg/)")); 1673 printf (" %s\n", _(" (available from http://www.engr.wisc.edu/~drews/mrtg/)"));
1674 printf (" %s\n", _("- Values for critical thresholds should be lower than warning thresholds")); 1674 printf (" %s\n", _("- Values for critical thresholds should be lower than warning thresholds"));
1675 printf (" %s\n", _(" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, ")); 1675 printf (" %s\n", _(" when the following variables are checked: VPF, VKF, LTCH, CBUFF, DCB, "));
1676 printf (" %s\n", _(" TCB, LRUS and LRUM.\n")); 1676 printf (" %s\n", _(" TCB, LRUS and LRUM."));
1677 1677
1678 printf (_(UT_SUPPORT)); 1678 printf (_(UT_SUPPORT));
1679} 1679}