summaryrefslogtreecommitdiffstats
path: root/plugins/check_nwstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_nwstat.c')
-rw-r--r--plugins/check_nwstat.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c
index 46bc7e90..ec5d5d6c 100644
--- a/plugins/check_nwstat.c
+++ b/plugins/check_nwstat.c
@@ -14,6 +14,8 @@
14 along with this program; if not, write to the Free Software 14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 16
17 $Id$
18
17******************************************************************************/ 19******************************************************************************/
18 20
19const char *progname = "check_nwstat"; 21const char *progname = "check_nwstat";
@@ -80,9 +82,6 @@ void print_usage(void);
80 82
81 83
82 84
83
84
85
86int 85int
87main(int argc, char **argv) { 86main(int argc, char **argv) {
88 int result; 87 int result;
@@ -123,7 +122,7 @@ main(int argc, char **argv) {
123 textdomain (PACKAGE); 122 textdomain (PACKAGE);
124 123
125 if (process_arguments(argc,argv)==ERROR) 124 if (process_arguments(argc,argv)==ERROR)
126 usage(_("Could not parse arguments\n")); 125 usage(_("check_nwstat: could not parse arguments\n"));
127 126
128 /* initialize alarm signal handling */ 127 /* initialize alarm signal handling */
129 signal(SIGALRM,socket_timeout_alarm_handler); 128 signal(SIGALRM,socket_timeout_alarm_handler);
@@ -609,10 +608,10 @@ main(int argc, char **argv) {
609 608
610 if (time_sync_status==0) { 609 if (time_sync_status==0) {
611 result=STATE_CRITICAL; 610 result=STATE_CRITICAL;
612 asprintf (&output_message,_("Critical: Time not in sync with network!")); 611 asprintf (&output_message,_("CRITICAL - Time not in sync with network!"));
613 } 612 }
614 else { 613 else {
615 asprintf (&output_message,_("OK! Time in sync with network!")); 614 asprintf (&output_message,_("OK - Time in sync with network!"));
616 } 615 }
617 616
618 /* check LRU sitting time in secondss */ 617 /* check LRU sitting time in secondss */
@@ -710,7 +709,9 @@ main(int argc, char **argv) {
710 709
711 return result; 710 return result;
712} 711}
713 712
713
714
714/* process command-line arguments */ 715/* process command-line arguments */
715int process_arguments(int argc, char **argv) { 716int process_arguments(int argc, char **argv) {
716 int c; 717 int c;
@@ -896,9 +897,6 @@ int process_arguments(int argc, char **argv) {
896 897
897 898
898 899
899
900
901
902void print_help(void) 900void print_help(void)
903{ 901{
904 char *myport; 902 char *myport;
@@ -987,7 +985,6 @@ Notes:\n\
987 985
988 986
989 987
990
991void print_usage(void) 988void print_usage(void)
992{ 989{
993 printf (_("\ 990 printf (_("\