summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2002-11-22 02:46:49 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2002-11-22 02:46:49 (GMT)
commit2898a0ebb67c42c719b5389f07158e47a163d2a8 (patch)
tree7f7aa68436bab32aa94cd02ed3fd694878680fbe
parent2f52875c5fa138dafba67b279a9ae52c539ada44 (diff)
downloadmonitoring-plugins-2898a0ebb67c42c719b5389f07158e47a163d2a8.tar.gz
get long args output to work on check_procs by putting incantations with -w ahead of others
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@224 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--configure.in124
1 files changed, 62 insertions, 62 deletions
diff --git a/configure.in b/configure.in
index e73cc26..48135ee 100644
--- a/configure.in
+++ b/configure.in
@@ -400,7 +400,6 @@ then
400fi 400fi
401 401
402AC_PATH_PROG(PATH_TO_PS,ps) 402AC_PATH_PROG(PATH_TO_PS,ps)
403dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
404dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND 403dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND
405if [ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] 404if [ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null]
406then 405then
@@ -415,6 +414,68 @@ then
415 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -weo 'rss comm'",[Verbatim command to execute for ps in check_rss]) 414 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -weo 'rss comm'",[Verbatim command to execute for ps in check_rss])
416 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) 415 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss])
417 echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'" 416 echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'"
417dnl FreeBSD
418elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null]
419then
420 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
421 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
422 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'",[])
423 EXTRAS="$EXTRAS check_nagios"
424 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'",[])
425 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
426 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'",[])
427 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
428 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[])
429 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
430 echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
431dnl BSD-like mode in RH 6.1
432elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
433then
434 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
435 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
436 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'",[])
437 EXTRAS="$EXTRAS check_nagios"
438 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'",[])
439 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
440 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'",[])
441 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
442 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'",[])
443 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
444 echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
445dnl SunOS 4.1.3:
446dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
447dnl
448elif [ps -laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null]
449then
450 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
451 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[])
452 EXTRAS="$EXTRAS check_nagios"
453 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[])
454 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww",[])
455 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s",[Format string for scanning ps output in check_procs])
456 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[])
457 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
458 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[])
459 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d",[])
460 echo " ps syntax... $PATH_TO_PS laxnwww"
461dnl Debian Linux / procps v1.2.9:
462dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
463dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
464dnl
465elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null]
466then
467 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
468 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[])
469 EXTRAS="$EXTRAS check_nagios"
470 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[])
471 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww",[])
472 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[Format string for scanning ps output in check_procs])
473 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[])
474 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[])
475 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[])
476 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
477 echo " ps syntax... $PATH_TO_PS laxnwww"
478dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs)
418elif [ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] 479elif [ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null]
419then 480then
420 AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) 481 AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf])
@@ -508,34 +569,6 @@ then
508 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'",[]) 569 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss command'",[])
509 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) 570 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
510 echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" 571 echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'"
511dnl FreeBSD
512elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null]
513then
514 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
515 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
516 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'",[])
517 EXTRAS="$EXTRAS check_nagios"
518 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'",[])
519 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
520 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'",[])
521 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
522 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[])
523 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
524 echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'"
525dnl BSD-like mode in RH 6.1
526elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
527then
528 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
529 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
530 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxno 'state user ppid comm'",[])
531 EXTRAS="$EXTRAS check_nagios"
532 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxno 'state uid ppid comm args'",[])
533 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
534 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxno 'vsz comm'",[])
535 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
536 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'",[])
537 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
538 echo " ps syntax... $PATH_TO_PS -waxco 'state comm vsz rss'"
539dnl IRIX 53 572dnl IRIX 53
540elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] 573elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
541then 574then
@@ -560,39 +593,6 @@ then
560 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[]) 593 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -el",[])
561 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) 594 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[])
562 echo " ps syntax... $PATH_TO_PS -el" 595 echo " ps syntax... $PATH_TO_PS -el"
563dnl SunOS 4.1.3:
564dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND
565dnl
566elif [ps -laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND" >/dev/null]
567then
568 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
569 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[])
570 EXTRAS="$EXTRAS check_nagios"
571 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[])
572 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -laxnwww",[])
573 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s",[Format string for scanning ps output in check_procs])
574 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[])
575 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
576 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[])
577 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %d",[])
578 echo " ps syntax... $PATH_TO_PS laxnwww"
579dnl Debian Linux / procps v1.2.9:
580dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND
581dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2]
582dnl
583elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null]
584then
585 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
586 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[])
587 EXTRAS="$EXTRAS check_nagios"
588 AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[])
589 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS laxnwww",[])
590 AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s",[Format string for scanning ps output in check_procs])
591 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS laxnwww",[])
592 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %*s %*s %*s %*s %*s %d",[])
593 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS laxnwww",[])
594 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
595 echo " ps syntax... $PATH_TO_PS laxnwww"
596dnl 596dnl
597dnl AIX 4.1: 597dnl AIX 4.1:
598dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD 598dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD