diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-22 02:46:49 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-22 02:46:49 (GMT) |
commit | 2898a0ebb67c42c719b5389f07158e47a163d2a8 (patch) | |
tree | 7f7aa68436bab32aa94cd02ed3fd694878680fbe | |
parent | 2f52875c5fa138dafba67b279a9ae52c539ada44 (diff) | |
download | monitoring-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.in | 124 |
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 | |||
400 | fi | 400 | fi |
401 | 401 | ||
402 | AC_PATH_PROG(PATH_TO_PS,ps) | 402 | AC_PATH_PROG(PATH_TO_PS,ps) |
403 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) | ||
404 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | 403 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND |
405 | if [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] | 404 | if [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] |
406 | then | 405 | then |
@@ -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'" |
417 | dnl FreeBSD | ||
418 | elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] | ||
419 | then | ||
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'" | ||
431 | dnl BSD-like mode in RH 6.1 | ||
432 | elif [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] | ||
433 | then | ||
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'" | ||
445 | dnl SunOS 4.1.3: | ||
446 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | ||
447 | dnl | ||
448 | elif [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] | ||
449 | then | ||
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" | ||
461 | dnl Debian Linux / procps v1.2.9: | ||
462 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND | ||
463 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] | ||
464 | dnl | ||
465 | elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null] | ||
466 | then | ||
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" | ||
478 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) | ||
418 | elif [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] | 479 | elif [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] |
419 | then | 480 | then |
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'" |
511 | dnl FreeBSD | ||
512 | elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] | ||
513 | then | ||
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'" | ||
525 | dnl BSD-like mode in RH 6.1 | ||
526 | elif [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] | ||
527 | then | ||
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'" | ||
539 | dnl IRIX 53 | 572 | dnl IRIX 53 |
540 | elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] | 573 | elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] |
541 | then | 574 | then |
@@ -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" |
563 | dnl SunOS 4.1.3: | ||
564 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | ||
565 | dnl | ||
566 | elif [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] | ||
567 | then | ||
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" | ||
579 | dnl Debian Linux / procps v1.2.9: | ||
580 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND | ||
581 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] | ||
582 | dnl | ||
583 | elif [ps laxnwww 2>/dev/null | egrep -i "^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND" >/dev/null] | ||
584 | then | ||
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" | ||
596 | dnl | 596 | dnl |
597 | dnl AIX 4.1: | 597 | dnl AIX 4.1: |
598 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD | 598 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD |