diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-02-18 05:38:28 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-02-18 05:38:28 +0000 |
commit | d854505371f42b69f7e5dc495911dfaf1c09f87d (patch) | |
tree | af7c309834f390e6b2156a2b672a5fd6ac84c594 /configure.in | |
parent | 8d461952d4a7ade739313692a6fca78dee68ed1c (diff) | |
download | monitoring-plugins-d854505371f42b69f7e5dc495911dfaf1c09f87d.tar.gz |
remainder of ps fix for UnixWare, and move [] in if/elif to indicate m4 quoting instead of test invocation
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@337 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 98 |
1 files changed, 51 insertions, 47 deletions
diff --git a/configure.in b/configure.in index dc5f2812..896912bc 100644 --- a/configure.in +++ b/configure.in | |||
@@ -410,7 +410,7 @@ fi | |||
410 | 410 | ||
411 | AC_PATH_PROG(PATH_TO_PS,ps) | 411 | AC_PATH_PROG(PATH_TO_PS,ps) |
412 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | 412 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND |
413 | 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] | 413 | 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 |
414 | then | 414 | then |
415 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 415 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) |
416 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 416 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) |
@@ -424,7 +424,7 @@ then | |||
424 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) | 424 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) |
425 | echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'" | 425 | echo " ps syntax... $PATH_TO_PS -weo 'stat comm vsz rss user ppid args'" |
426 | dnl FreeBSD | 426 | dnl FreeBSD |
427 | elif [ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" >/dev/null] | 427 | elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null |
428 | then | 428 | then |
429 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 429 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
430 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 430 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) |
@@ -438,7 +438,7 @@ then | |||
438 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 438 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
439 | echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" | 439 | echo " ps syntax... $PATH_TO_PS -Ao 'state command vsz rss'" |
440 | dnl BSD-like mode in RH 6.1 | 440 | dnl BSD-like mode in RH 6.1 |
441 | 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] | 441 | 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 |
442 | then | 442 | then |
443 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 443 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
444 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 444 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) |
@@ -454,7 +454,7 @@ then | |||
454 | dnl SunOS 4.1.3: | 454 | dnl SunOS 4.1.3: |
455 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | 455 | dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND |
456 | dnl | 456 | dnl |
457 | 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] | 457 | 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 |
458 | then | 458 | then |
459 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 459 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
460 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) | 460 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) |
@@ -471,7 +471,7 @@ dnl Debian Linux / procps v1.2.9: | |||
471 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND | 471 | dnl FLAGS UID PID PPID PRI NI SIZE RSS WCHAN STA TTY TIME COMMAND |
472 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] | 472 | dnl 100 0 1 0 0 0 776 76 c0131c8c S ffff 0:11 init [2] |
473 | dnl | 473 | dnl |
474 | 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] | 474 | 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 |
475 | then | 475 | then |
476 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 476 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
477 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) | 477 | AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS laxnwww",[]) |
@@ -485,7 +485,7 @@ then | |||
485 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) | 485 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) |
486 | echo " ps syntax... $PATH_TO_PS laxnwww" | 486 | echo " ps syntax... $PATH_TO_PS laxnwww" |
487 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) | 487 | dnl OpenBSD (needs to come early because -exo appears to work, but does not give all procs) |
488 | 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] | 488 | 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 |
489 | then | 489 | then |
490 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 490 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) |
491 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 491 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) |
@@ -499,7 +499,7 @@ then | |||
499 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) | 499 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[Format string for scanning ps output in check_rss]) |
500 | echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'" | 500 | echo " ps syntax... $PATH_TO_PS -axo 'stat comm vsz rss user ppid args'" |
501 | dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT | 501 | dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FORMAT |
502 | elif [ps -ao '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] | 502 | elif ps -ao '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 |
503 | then | 503 | then |
504 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 504 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) |
505 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 505 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) |
@@ -512,7 +512,7 @@ then | |||
512 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'",[]) | 512 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -ao 'rss comm'",[]) |
513 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 513 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
514 | echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'" | 514 | echo " ps syntax... $PATH_TO_PS -ao 'stat comm vsz rss user ppid args'" |
515 | elif [ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+" >/dev/null] | 515 | elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
516 | then | 516 | then |
517 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 517 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) |
518 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 518 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) |
@@ -525,7 +525,7 @@ then | |||
525 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'",[]) | 525 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'",[]) |
526 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 526 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
527 | echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" | 527 | echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'" |
528 | elif [ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] | 528 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
529 | then | 529 | then |
530 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) | 530 | AC_DEFINE(USE_PS_VARS,1,[Define if 'ps' will be parsed with sscanf]) |
531 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) | 531 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[Variable list for sscanf of 'ps' output]) |
@@ -538,7 +538,7 @@ then | |||
538 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) | 538 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) |
539 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 539 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
540 | echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" | 540 | echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" |
541 | elif [ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] | 541 | elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
542 | then | 542 | then |
543 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 543 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
544 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) | 544 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) |
@@ -551,7 +551,7 @@ then | |||
551 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) | 551 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) |
552 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 552 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
553 | echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" | 553 | echo " ps syntax... $PATH_TO_PS -Ao 'status comm vsz rss'" |
554 | elif [ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] | 554 | elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
555 | then | 555 | then |
556 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 556 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
557 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) | 557 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos]) |
@@ -565,7 +565,7 @@ then | |||
565 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 565 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
566 | echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" | 566 | echo " ps syntax... $PATH_TO_PS -Ao 'state comm vsz rss'" |
567 | dnl wonder who takes state instead of stat | 567 | dnl wonder who takes state instead of stat |
568 | elif [ps -ao 'state command vsz rss user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] | 568 | elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
569 | then | 569 | then |
570 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 570 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
571 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 571 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) |
@@ -579,7 +579,7 @@ then | |||
579 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 579 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
580 | echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" | 580 | echo " ps syntax... $PATH_TO_PS -ao 'state command vsz rss'" |
581 | dnl IRIX 53 | 581 | dnl IRIX 53 |
582 | 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] | 582 | 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 |
583 | then | 583 | then |
584 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 584 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
585 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | 585 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) |
@@ -591,7 +591,7 @@ then | |||
591 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) | 591 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) |
592 | echo " ps syntax... $PATH_TO_PS -el" | 592 | echo " ps syntax... $PATH_TO_PS -el" |
593 | dnl IRIX 63 | 593 | dnl IRIX 63 |
594 | elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] | 594 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +ADDR +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null |
595 | then | 595 | then |
596 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 596 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
597 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | 597 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) |
@@ -606,7 +606,7 @@ dnl | |||
606 | dnl AIX 4.1: | 606 | dnl AIX 4.1: |
607 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD | 607 | dnl F S UID PID PPID C PRI NI ADDR SZ RSS WCHAN TTY TIME CMD |
608 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper | 608 | dnl 303 A 0 0 0 120 16 -- 1c07 20 24 - 0:45 swapper |
609 | elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null] | 609 | elif ps -el 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +ADDR +SZ +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null |
610 | then | 610 | then |
611 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 611 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
612 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | 612 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) |
@@ -618,7 +618,7 @@ then | |||
618 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) | 618 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %*s %*s %d",[]) |
619 | echo " ps syntax... $PATH_TO_PS -el" | 619 | echo " ps syntax... $PATH_TO_PS -el" |
620 | dnl AIX? | 620 | dnl AIX? |
621 | elif [ps glaxen 2>/dev/null | egrep -i "^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND" >/dev/null] | 621 | elif ps glaxen 2>/dev/null | egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null |
622 | then | 622 | then |
623 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 623 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
624 | AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) | 624 | AC_DEFINE_UNQUOTED(PS_VARLIST,[&procuid,&procppid,procstat,&pos,procprog],[]) |
@@ -633,7 +633,7 @@ dnl MacOSX / Darwin | |||
633 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT | 633 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT |
634 | dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND | 634 | dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND |
635 | dnl Ss 1308 272 0 root 0 init /sbin/init | 635 | dnl Ss 1308 272 0 root 0 init /sbin/init |
636 | elif [ps waxo 'state vsz rss uid user ppid ucomm command' 2>/dev/null | egrep -i "^STAT +VSZ +RSS +UID +USER +PPID +UCOMM +COMMAND" >/dev/null] | 636 | elif ps waxo 'state vsz rss uid user ppid ucomm command' 2>/dev/null | egrep -i ["^STAT +VSZ +RSS +UID +USER +PPID +UCOMM +COMMAND"] >/dev/null |
637 | then | 637 | then |
638 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | 638 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) |
639 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) | 639 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[]) |
@@ -646,6 +646,19 @@ then | |||
646 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[]) | 646 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[]) |
647 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) | 647 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) |
648 | echo " ps syntax... $PATH_TO_PS waxo 'state vsz rss command'" | 648 | echo " ps syntax... $PATH_TO_PS waxo 'state vsz rss command'" |
649 | dnl UnixWare | ||
650 | elif ps -Al 2>/dev/null | egrep -i ["^ *F +S +UID +PID +PPID +CLS +PRI +NI +C +ADDR +SZ +WCHAN +TTY +TIME +COMD"] >/dev/null | ||
651 | then | ||
652 | AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf]) | ||
653 | AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,&pos,procprog],[]) | ||
654 | AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS -Al",[]) | ||
655 | AC_DEFINE_UNQUOTED(PS_FORMAT,"%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s",[Format string for scanning ps output in check_procs]) | ||
656 | if ps -Ao 'vsz comm' 2>/dev/null | egrep -i ["^ *VSZ +COMMAND"] >/dev/null | ||
657 | then | ||
658 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS -Ao 'vsz comm'",[]) | ||
659 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%*s %d",[]) | ||
660 | fi | ||
661 | echo " ps syntax... $PATH_TO_PS -Al" | ||
649 | else | 662 | else |
650 | echo "** Unable to find usable ps syntax" | 663 | echo "** Unable to find usable ps syntax" |
651 | fi | 664 | fi |
@@ -654,25 +667,25 @@ AC_ARG_WITH(df_command,--with-df-command=<syntax> sets syntax for df,DF_COMMAND= | |||
654 | if test -n "$DF_COMMAND" | 667 | if test -n "$DF_COMMAND" |
655 | then | 668 | then |
656 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) | 669 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$DF_COMMAND",[path and args for df command]) |
657 | elif [df -Pk 2>/dev/null | egrep -i "^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*" >/dev/null] | 670 | elif df -Pk 2>/dev/null | egrep -i ["^(/dev/|[a-zA-Z]:)[a-z0-9/\\]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/\\]*"] >/dev/null |
658 | then | 671 | then |
659 | AC_PATH_PROG(PATH_TO_DF,df) | 672 | AC_PATH_PROG(PATH_TO_DF,df) |
660 | AC_MSG_RESULT(" df syntax... $PATH_TO_DF -Pk") | 673 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -Pk]) |
661 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk",[path and args for df command]) | 674 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -Pk",[path and args for df command]) |
662 | elif [df -k 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] | 675 | elif df -k 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
663 | then | 676 | then |
664 | AC_PATH_PROG(PATH_TO_DF,df) | 677 | AC_PATH_PROG(PATH_TO_DF,df) |
665 | AC_MSG_RESULT(" df syntax... $PATH_TO_DF -k") | 678 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF -k]) |
666 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k",[path and args for df command]) | 679 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF -k",[path and args for df command]) |
667 | elif [df 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] | 680 | elif df 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
668 | then | 681 | then |
669 | AC_PATH_PROG(PATH_TO_DF,df) | 682 | AC_PATH_PROG(PATH_TO_DF,df) |
670 | AC_MSG_RESULT(" df syntax... $PATH_TO_DF") | 683 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) |
671 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) | 684 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) |
672 | elif [bdf 2>/dev/null | egrep -i "^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*" >/dev/null] | 685 | elif bdf 2>/dev/null | egrep -i ["^/dev/[a-z0-9/]+ +[0-9]+ +[0-9]+ +[0-9]+ +[0-9]+% +/[a-z0-9/]*"] >/dev/null |
673 | then | 686 | then |
674 | AC_PATH_PROG(PATH_TO_DF,bdf) | 687 | AC_PATH_PROG(PATH_TO_DF,bdf) |
675 | AC_MSG_RESULT(" df syntax... $PATH_TO_DF") | 688 | AC_MSG_RESULT([ df syntax... $PATH_TO_DF]) |
676 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) | 689 | AC_DEFINE_UNQUOTED(DF_COMMAND,"$PATH_TO_DF",[path and args for df command]) |
677 | else | 690 | else |
678 | AC_MSG_WARN("unable to find usable df syntax") | 691 | AC_MSG_WARN("unable to find usable df syntax") |
@@ -688,43 +701,43 @@ then | |||
688 | then | 701 | then |
689 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 702 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) |
690 | fi | 703 | fi |
691 | elif [ "z$ac_cv_uname_s" == "zUnixWare" && ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 704 | elif [[ "z$ac_cv_uname_s" = "zUnixWare" ]] && ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
692 | then | 705 | then |
693 | PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" | 706 | PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" |
694 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 707 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) |
695 | echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>" | 708 | echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>" |
696 | elif [ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 709 | elif ping -n -U -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
697 | then | 710 | then |
698 | PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" | 711 | PING_COMMAND="$PATH_TO_PING -n -U -c %d %s" |
699 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 712 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) |
700 | echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>" | 713 | echo " ping syntax... $PATH_TO_PING -n -U -c <count> <host>" |
701 | elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 714 | elif ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
702 | then | 715 | then |
703 | PING_COMMAND="$PATH_TO_PING -n -c %d %s" | 716 | PING_COMMAND="$PATH_TO_PING -n -c %d %s" |
704 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 717 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) |
705 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" | 718 | echo " ping syntax... $PATH_TO_PING -n -c <count> <host>" |
706 | elif [ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 719 | elif ping -n 127.0.0.1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
707 | then | 720 | then |
708 | PING_COMMAND="$PATH_TO_PING -n %s -c %d" | 721 | PING_COMMAND="$PATH_TO_PING -n %s -c %d" |
709 | echo " ping syntax... $PATH_TO_PING -n <host> -c <count>" | 722 | echo " ping syntax... $PATH_TO_PING -n <host> -c <count>" |
710 | elif [ping 127.0.0.1 -n 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 723 | elif ping 127.0.0.1 -n 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
711 | then | 724 | then |
712 | PING_COMMAND="$PATH_TO_PING %s -n %d" | 725 | PING_COMMAND="$PATH_TO_PING %s -n %d" |
713 | echo " ping syntax... $PATH_TO_PING <host> -n <count>" | 726 | echo " ping syntax... $PATH_TO_PING <host> -n <count>" |
714 | elif [ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 727 | elif ping -n -s 127.0.0.1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
715 | then | 728 | then |
716 | PING_COMMAND="$PATH_TO_PING -n -s %s 56 %d" | 729 | PING_COMMAND="$PATH_TO_PING -n -s %s 56 %d" |
717 | echo " ping syntax... $PATH_TO_PING -n -s <host> 56 <count>" | 730 | echo " ping syntax... $PATH_TO_PING -n -s <host> 56 <count>" |
718 | elif [ping -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 731 | elif ping -n -h 127.0.0.1 -s 56 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
719 | then | 732 | then |
720 | PING_COMMAND="$PATH_TO_PING -n -h %s -s 56 -c %d" | 733 | PING_COMMAND="$PATH_TO_PING -n -h %s -s 56 -c %d" |
721 | echo " ping syntax... $PATH_TO_PING -n -h <host> -s 56 -c <count>" | 734 | echo " ping syntax... $PATH_TO_PING -n -h <host> -s 56 -c <count>" |
722 | elif [ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 735 | elif ping -n -s 56 -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
723 | then | 736 | then |
724 | PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s" | 737 | PING_COMMAND="$PATH_TO_PING -n -s 56 -c %d %s" |
725 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 738 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) |
726 | echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>" | 739 | echo " ping syntax... $PATH_TO_PING -n -s 56 -c <count> <host>" |
727 | elif [ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] | 740 | elif ping -n -c 1 127.0.0.1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null |
728 | then | 741 | then |
729 | PING_COMMAND="$PATH_TO_PING -n -c %d %s" | 742 | PING_COMMAND="$PATH_TO_PING -n -c %d %s" |
730 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) | 743 | AC_DEFINE_UNQUOTED(PING_PACKETS_FIRST,"$PING_COMMAND",[Define if packet count must precede host]) |
@@ -737,32 +750,23 @@ AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND",[path and args for ping command] | |||
737 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) | 750 | AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) |
738 | if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" | 751 | if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" |
739 | then | 752 | then |
740 | AC_MSG_CHECKING("nslookup syntax") | 753 | if nslookup -sil 127.0.0.1 2>&1 | grep ["Invalid option: sil"] >/dev/null |
741 | if [nslookup -sil 127.0.0.1 2>&1 | grep "Invalid option: sil" >/dev/null] | ||
742 | then | 754 | then |
743 | AC_MSG_RESULT("$PATH_TO_NSLOOKUP") | 755 | AC_MSG_RESULT([ nslookup syntax... $PATH_TO_NSLOOKUP]) |
744 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP",[path and args for nslookup]) | 756 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP",[path and args for nslookup]) |
745 | else | 757 | else |
746 | AC_MSG_RESULT("$PATH_TO_NSLOOKUP -sil") | 758 | AC_MSG_RESULT([ nslookup syntax... $PATH_TO_NSLOOKUP -sil]) |
747 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil",[path and args for nslookup]) | 759 | AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$PATH_TO_NSLOOKUP -sil",[path and args for nslookup]) |
748 | fi | 760 | fi |
749 | EXTRAS="$EXTRAS check_dns" | 761 | EXTRAS="$EXTRAS check_dns" |
750 | else | 762 | else |
751 | AC_MSG_WARN("nslookup command not found") | 763 | AC_MSG_WARN([nslookup command not found]) |
752 | fi | 764 | fi |
753 | 765 | ||
754 | AC_PATH_PROG(PATH_TO_HOST,host) | 766 | AC_PATH_PROG(PATH_TO_HOST,host) |
755 | if test -n "$ac_cv_path_PATH_TO_HOST" | 767 | if test -n "$ac_cv_path_PATH_TO_HOST" |
756 | then | 768 | then |
757 | AC_MSG_CHECKING("host syntax") | ||
758 | if [host 127.0.0.1 2>&1 | grep -v "ommand not found" > /dev/null] | ||
759 | then | ||
760 | AC_MSG_RESULT("$PATH_TO_HOST") | ||
761 | AC_DEFINE_UNQUOTED(HOST_COMMAND,"$PATH_TO_HOST",[path to host binary]) | ||
762 | fi | ||
763 | EXTRAS="$EXTRAS check_dns" | 769 | EXTRAS="$EXTRAS check_dns" |
764 | else | ||
765 | AC_MSG_WARN("host command not found") | ||
766 | fi | 770 | fi |
767 | 771 | ||
768 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) | 772 | AC_PATH_PROG(PATH_TO_UPTIME,uptime) |