diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-04-07 22:53:49 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-04-07 22:53:49 +0000 |
commit | 1a6c23309c5e57af28f6465610d98a6fc834c429 (patch) | |
tree | 740969fb573f9eaea4c6a0f10d0fce0fb71fea21 /configure.in | |
parent | 8fa5d6d877b9810967396dd27dc6e0b7665ec2fa (diff) | |
download | monitoring-plugins-1a6c23309c5e57af28f6465610d98a6fc834c429.tar.gz |
Souped up check_procs with different metrics
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@474 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 159 |
1 files changed, 42 insertions, 117 deletions
diff --git a/configure.in b/configure.in index 18eefe69..2a0120f5 100644 --- a/configure.in +++ b/configure.in | |||
@@ -622,13 +622,9 @@ dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | |||
622 | if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ | 622 | if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
623 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | 623 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
624 | then | 624 | then |
625 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 625 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
626 | ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid ppid comm args'" | 626 | ac_cv_ps_command="$PATH_TO_PS -weo 'stat uid ppid vsz rss pcpu comm args'" |
627 | ac_cv_ps_format="%s %d %d %s %n" | 627 | ac_cv_ps_format="%s %d %d %s %n" |
628 | ac_cv_vsz_command="$PATH_TO_PS -weo 'vsz comm'" | ||
629 | ac_cv_vsz_format="%d %s" | ||
630 | ac_cv_rss_command="$PATH_TO_PS -weo 'rss comm'" | ||
631 | ac_cv_rss_format="%d %s" | ||
632 | EXTRAS="$EXTRAS check_nagios" | 628 | EXTRAS="$EXTRAS check_nagios" |
633 | AC_MSG_RESULT([$ac_cv_ps_command]) | 629 | AC_MSG_RESULT([$ac_cv_ps_command]) |
634 | 630 | ||
@@ -636,13 +632,9 @@ dnl FreeBSD | |||
636 | elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \ | 632 | elif ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | \ |
637 | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null | 633 | egrep -i ["^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"] >/dev/null |
638 | then | 634 | then |
639 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 635 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
640 | ac_cv_ps_command="$PATH_TO_PS waxco 'state uid ppid command command'" | 636 | ac_cv_ps_command="$PATH_TO_PS waxco 'state uid ppid vsz rss pcpu command command'" |
641 | ac_cv_ps_format="%s %d %d %s %n" | 637 | ac_cv_ps_format="%s %d %d %s %n" |
642 | ac_cv_vsz_command="$PATH_TO_PS waxco 'vsz command'" | ||
643 | ac_cv_vsz_format="%d %s" | ||
644 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" | ||
645 | ac_cv_rss_format="%d %s" | ||
646 | EXTRAS="$EXTRAS check_nagios" | 638 | EXTRAS="$EXTRAS check_nagios" |
647 | AC_MSG_RESULT([$ac_cv_ps_command]) | 639 | AC_MSG_RESULT([$ac_cv_ps_command]) |
648 | 640 | ||
@@ -650,13 +642,9 @@ dnl BSD-like mode in RH 6.1 | |||
650 | elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \ | 642 | elif ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | \ |
651 | egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null | 643 | egrep -i ["^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
652 | then | 644 | then |
653 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 645 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
654 | ac_cv_ps_command="$PATH_TO_PS waxno 'state uid ppid comm args'" | 646 | ac_cv_ps_command="$PATH_TO_PS waxno 'state uid ppid vsz rss pcpu comm args'" |
655 | ac_cv_ps_format="%s %d %d %s %n" | 647 | ac_cv_ps_format="%s %d %d %s %n" |
656 | ac_cv_vsz_command="$PATH_TO_PS waxno 'vsz comm'" | ||
657 | ac_cv_vsz_format="%d %s" | ||
658 | ac_cv_rss_command="$PATH_TO_PS waxno 'rss comm'" | ||
659 | ac_cv_rss_format="%d %s" | ||
660 | EXTRAS="$EXTRAS check_nagios" | 648 | EXTRAS="$EXTRAS check_nagios" |
661 | AC_MSG_RESULT([$ac_cv_ps_command]) | 649 | AC_MSG_RESULT([$ac_cv_ps_command]) |
662 | 650 | ||
@@ -665,13 +653,9 @@ dnl F UID PID PPID CP PRI NI SZ RSS WCHAN STAT TT TIME COMMAND | |||
665 | elif ps -laxnwww 2>/dev/null | \ | 653 | elif ps -laxnwww 2>/dev/null | \ |
666 | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null | 654 | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +CP +PRI +NI +(SZ)|(VSZ)|(SIZE) +RSS +WCHAN +STAT? +TTY? +TIME +COMMAND"] >/dev/null |
667 | then | 655 | then |
668 | ac_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]" | 656 | ac_cv_ps_varlist="[&procuid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" |
669 | ac_cv_ps_command="$PATH_TO_PS -laxnwww" | 657 | ac_cv_ps_command="$PATH_TO_PS -laxnwww" |
670 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %*s %*s %*s %s %*s %*s %n%s" | 658 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %d %d %*s %s %*s %*s %n%s" |
671 | ac_cv_vsz_command="$PATH_TO_PS laxnwww" | ||
672 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %d" | ||
673 | ac_cv_rss_command="$PATH_TO_PS laxnwww" | ||
674 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %d" | ||
675 | EXTRAS="$EXTRAS check_nagios" | 659 | EXTRAS="$EXTRAS check_nagios" |
676 | AC_MSG_RESULT([$ac_cv_ps_command]) | 660 | AC_MSG_RESULT([$ac_cv_ps_command]) |
677 | 661 | ||
@@ -682,13 +666,9 @@ dnl | |||
682 | elif ps laxnwww 2>/dev/null | \ | 666 | elif ps laxnwww 2>/dev/null | \ |
683 | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null | 667 | egrep -i ["^ *F(LAGS)? +UID +PID +PPID +PRI +NI +(VSZ)|(SIZE) +RSS +WCHAN +STAT? TTY +TIME +COMMAND"] >/dev/null |
684 | then | 668 | then |
685 | ac_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]" | 669 | ac_cv_ps_varlist="[&procuid,&procppid,procstat,&procvsz,&procrss,&pos,procprog]" |
686 | ac_cv_ps_command="$PATH_TO_PS laxnwww" | 670 | ac_cv_ps_command="$PATH_TO_PS laxnwww" |
687 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s" | 671 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %d %d %*s %s %*s %*s %n%s" |
688 | ac_cv_vsz_command="$PATH_TO_PS laxnwww" | ||
689 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d" | ||
690 | ac_cv_rss_command="$PATH_TO_PS laxnwww" | ||
691 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" | ||
692 | EXTRAS="$EXTRAS check_nagios" | 672 | EXTRAS="$EXTRAS check_nagios" |
693 | AC_MSG_RESULT([$ac_cv_ps_command]) | 673 | AC_MSG_RESULT([$ac_cv_ps_command]) |
694 | 674 | ||
@@ -696,13 +676,9 @@ dnl OpenBSD (needs to come early because -exo appears to work, but does not give | |||
696 | elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ | 676 | elif ps -axo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
697 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | 677 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
698 | then | 678 | then |
699 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 679 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
700 | ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid ppid comm args'" | 680 | ac_cv_ps_command="$PATH_TO_PS -axo 'stat uid ppid vsz rss pcpu comm args'" |
701 | ac_cv_ps_format="%s %d %d %s %n" | 681 | ac_cv_ps_format="%s %d %d %s %n" |
702 | ac_cv_vsz_command="$PATH_TO_PS -axo 'vsz comm'" | ||
703 | ac_cv_vsz_format="%d %s" | ||
704 | ac_cv_rss_command="$PATH_TO_PS -axo 'rss comm'" | ||
705 | ac_cv_rss_format="%d %s" | ||
706 | EXTRAS="$EXTRAS check_nagios" | 682 | EXTRAS="$EXTRAS check_nagios" |
707 | AC_MSG_RESULT([$ac_cv_ps_command]) | 683 | AC_MSG_RESULT([$ac_cv_ps_command]) |
708 | 684 | ||
@@ -710,65 +686,45 @@ dnl AIX 4.3.3 - needs verification. This works for Tru64 - needs %*[ +] in PS_FO | |||
710 | elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ | 686 | elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ |
711 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | 687 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
712 | then | 688 | then |
713 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 689 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
714 | ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid ppid comm args'" | 690 | ac_cv_ps_command="$PATH_TO_PS -ao 'stat uid ppid vsz rss pcpu comm args'" |
715 | ac_cv_ps_format="[["%s%*[ +] %d %d %s %n"]]" | 691 | ac_cv_ps_format="[["%s%*[ +] %d %d %s %n"]]" |
716 | ac_cv_vsz_command="$PATH_TO_PS -ao 'vsz comm'" | ||
717 | ac_cv_vsz_format="%d %s" | ||
718 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss comm'" | ||
719 | ac_cv_rss_format="%d %s" | ||
720 | EXTRAS="$EXTRAS check_nagios" | 692 | EXTRAS="$EXTRAS check_nagios" |
721 | AC_MSG_RESULT([$ac_cv_ps_command]) | 693 | AC_MSG_RESULT([$ac_cv_ps_command]) |
722 | 694 | ||
723 | elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \ | 695 | elif ps -eo 's comm vsz rss user uid ppid args' 2>/dev/null | \ |
724 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null | 696 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +[VSIZE]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA]+"] >/dev/null |
725 | then | 697 | then |
726 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 698 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
727 | ac_cv_ps_command="$PATH_TO_PS -eo 's uid ppid comm args'" | 699 | ac_cv_ps_command="$PATH_TO_PS -eo 's uid ppid vsz rss pcpu comm args'" |
728 | ac_cv_ps_format="%s %d %d %s %n" | 700 | ac_cv_ps_format="%s %d %d %s %n" |
729 | ac_cv_vsz_command="$PATH_TO_PS -eo 'vsz comm'" | ||
730 | ac_cv_vsz_format="%d %s" | ||
731 | ac_cv_rss_command="$PATH_TO_PS -eo 'rss comm'" | ||
732 | ac_cv_rss_format="%d %s" | ||
733 | EXTRAS="$EXTRAS check_nagios" | 701 | EXTRAS="$EXTRAS check_nagios" |
734 | AC_MSG_RESULT([$ac_cv_ps_command]) | 702 | AC_MSG_RESULT([$ac_cv_ps_command]) |
735 | 703 | ||
736 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ | 704 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ |
737 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null | 705 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
738 | then | 706 | then |
739 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 707 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
740 | ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid comm args'" | 708 | ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'" |
741 | ac_cv_ps_format="%s %d %d %s %n" | 709 | ac_cv_ps_format="%s %d %d %s %n" |
742 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | ||
743 | ac_cv_vsz_format="%d %s" | ||
744 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | ||
745 | ac_cv_rss_format="%d %s" | ||
746 | EXTRAS="$EXTRAS check_nagios" | 710 | EXTRAS="$EXTRAS check_nagios" |
747 | AC_MSG_RESULT([$ac_cv_ps_command]) | 711 | AC_MSG_RESULT([$ac_cv_ps_command]) |
748 | 712 | ||
749 | elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \ | 713 | elif ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | \ |
750 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null | 714 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
751 | then | 715 | then |
752 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 716 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
753 | ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid ppid comm args'" | 717 | ac_cv_ps_command="$PATH_TO_PS -Ao 'status uid ppid vsz rss pcpu comm args'" |
754 | ac_cv_ps_format="%s %d %d %s %n" | 718 | ac_cv_ps_format="%s %d %d %s %n" |
755 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | ||
756 | ac_cv_vsz_format="%d %s" | ||
757 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | ||
758 | ac_cv_rss_format="%d %s" | ||
759 | EXTRAS="$EXTRAS check_nagios" | 719 | EXTRAS="$EXTRAS check_nagios" |
760 | AC_MSG_RESULT([$ac_cv_ps_command]) | 720 | AC_MSG_RESULT([$ac_cv_ps_command]) |
761 | 721 | ||
762 | elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \ | 722 | elif ps -Ao 'state comm vsz rss uid user ppid args' 2>/dev/null | \ |
763 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null | 723 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
764 | then | 724 | then |
765 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 725 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
766 | ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid ppid comm args'" | 726 | ac_cv_ps_command="$PATH_TO_PS -Ao 'state uid ppid vsz rss pcpu comm args'" |
767 | ac_cv_ps_format="%s %d %d %s %n" | 727 | ac_cv_ps_format="%s %d %d %s %n" |
768 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | ||
769 | ac_cv_vsz_format="%d %s" | ||
770 | ac_cv_rss_command="$PATH_TO_PS -Ao 'rss comm'" | ||
771 | ac_cv_rss_format="%d %s" | ||
772 | EXTRAS="$EXTRAS check_nagios" | 728 | EXTRAS="$EXTRAS check_nagios" |
773 | AC_MSG_RESULT([$ac_cv_ps_command]) | 729 | AC_MSG_RESULT([$ac_cv_ps_command]) |
774 | 730 | ||
@@ -776,13 +732,9 @@ dnl wonder who takes state instead of stat | |||
776 | elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \ | 732 | elif ps -ao 'state command vsz rss user ppid args' 2>/dev/null | \ |
777 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null | 733 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
778 | then | 734 | then |
779 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 735 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
780 | ac_cv_ps_command="$PATH_TO_PS -ao 'state uid ppid command args'" | 736 | ac_cv_ps_command="$PATH_TO_PS -ao 'state uid ppid vsz rss pcpu command args'" |
781 | ac_cv_ps_format="%s %d %d %s %n" | 737 | ac_cv_ps_format="%s %d %d %s %n" |
782 | ac_cv_vsz_command="$PATH_TO_PS -ao 'vsz command'" | ||
783 | ac_cv_vsz_format="%d %s" | ||
784 | ac_cv_rss_command="$PATH_TO_PS -ao 'rss command'" | ||
785 | ac_cv_rss_format="%d %s" | ||
786 | EXTRAS="$EXTRAS check_nagios" | 738 | EXTRAS="$EXTRAS check_nagios" |
787 | AC_MSG_RESULT([$ac_cv_ps_command]) | 739 | AC_MSG_RESULT([$ac_cv_ps_command]) |
788 | 740 | ||
@@ -790,13 +742,9 @@ dnl IRIX 53 | |||
790 | elif ps -el 2>/dev/null | \ | 742 | elif ps -el 2>/dev/null | \ |
791 | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null | 743 | egrep -i ["^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+"] >/dev/null |
792 | then | 744 | then |
793 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" | 745 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&pos,procprog]" |
794 | ac_cv_ps_command="$PATH_TO_PS -el" | 746 | ac_cv_ps_command="$PATH_TO_PS -el" |
795 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" | 747 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %d %d %*s %*s %*s %n%s" |
796 | ac_cv_vsz_command="$PATH_TO_PS -el" | ||
797 | ac_cv_vsz_format="%*s %*s %*s %*s %d" | ||
798 | ac_cv_rss_command="$PATH_TO_PS -el" | ||
799 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | ||
800 | AC_MSG_RESULT([$ac_cv_ps_command]) | 748 | AC_MSG_RESULT([$ac_cv_ps_command]) |
801 | 749 | ||
802 | dnl IRIX 63 | 750 | dnl IRIX 63 |
@@ -806,10 +754,6 @@ then | |||
806 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" | 754 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" |
807 | ac_cv_ps_command="$PATH_TO_PS -el" | 755 | ac_cv_ps_command="$PATH_TO_PS -el" |
808 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" | 756 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" |
809 | ac_cv_vsz_command="$PATH_TO_PS -el" | ||
810 | ac_cv_vsz_format="%*s %*s %*s %*s %d" | ||
811 | ac_cv_rss_command="$PATH_TO_PS -el" | ||
812 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | ||
813 | AC_MSG_RESULT([$ac_cv_ps_command]) | 757 | AC_MSG_RESULT([$ac_cv_ps_command]) |
814 | 758 | ||
815 | dnl AIX 4.1: | 759 | dnl AIX 4.1: |
@@ -821,39 +765,28 @@ then | |||
821 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" | 765 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" |
822 | ac_cv_ps_command="$PATH_TO_PS -el" | 766 | ac_cv_ps_command="$PATH_TO_PS -el" |
823 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s" | 767 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s" |
824 | ac_cv_vsz_command="$PATH_TO_PS -el" | ||
825 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | ||
826 | ac_cv_rss_command="$PATH_TO_PS -el" | ||
827 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %*s %*s %d" | ||
828 | AC_MSG_RESULT([$ac_cv_ps_command]) | 768 | AC_MSG_RESULT([$ac_cv_ps_command]) |
829 | 769 | ||
830 | dnl AIX? | 770 | dnl AIX? |
831 | elif ps glaxen 2>/dev/null | \ | 771 | elif ps glaxen 2>/dev/null | \ |
832 | egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null | 772 | egrep -i ["^ *F +UID +PID +PPID +PRI +NI +VSZ +RSS +WCHAN +STAT +TTY +TIME +COMMAND"] >/dev/null |
833 | then | 773 | then |
834 | ac_cv_ps_varlist="[&procuid,&procppid,procstat,&pos,procprog]" | 774 | ac_cv_ps_varlist="[&procuid,&procppid,&procvsz,&procrss,procstat,&pos,procprog]" |
835 | ac_cv_ps_command="$PATH_TO_PS glaxen" | 775 | ac_cv_ps_command="$PATH_TO_PS glaxen" |
836 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %*s %*s %*s %s %*s %*s %n%s" | 776 | ac_cv_ps_format="%*s %d %*s %d %*s %*s %d %d %*s %s %*s %*s %n%s" |
837 | ac_cv_vsz_command="$PATH_TO_PS glaxen" | ||
838 | ac_cv_vsz_format="%*s %*s %*s %*s %*s %*s %d" | ||
839 | ac_cv_rss_command="$PATH_TO_PS glaxen" | ||
840 | ac_cv_rss_format="%*s %*s %*s %*s %*s %*s %*s %d" | ||
841 | AC_MSG_RESULT([$ac_cv_ps_command]) | 777 | AC_MSG_RESULT([$ac_cv_ps_command]) |
842 | 778 | ||
843 | dnl MacOSX / Darwin | 779 | dnl MacOSX / Darwin |
844 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT | 780 | dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT |
845 | dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND | 781 | dnl Some truncation will happen in UCOMM column |
846 | dnl Ss 1308 272 0 root 0 init /sbin/init | 782 | dnl STAT VSZ RSS UID PPID %CPU UCOMM COMMAND |
847 | elif ps waxo 'state vsz rss uid user ppid ucomm command' 2>/dev/null | \ | 783 | dnl Ss 52756 22496 501 1 6.9 Window Manager /System/Library/CoreServices/WindowServer -daemon |
848 | egrep -i ["^STAT +VSZ +RSS +UID +USER +PPID +UCOMM +COMMAND"] >/dev/null | 784 | elif ps wwaxo 'state vsz rss uid ppid pcpu ucomm command' 2>/dev/null | \ |
785 | egrep -i ["^STAT +VSZ +RSS +UID +PPID +%CPU +UCOMM +COMMAND"] >/dev/null | ||
849 | then | 786 | then |
850 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,procprog,&pos]" | 787 | ac_cv_ps_command="$PATH_TO_PS wwaxo 'state vsz rss uid ppid pcpu ucomm command'" |
851 | ac_cv_ps_command="$PATH_TO_PS waxo 'state uid ppid ucomm command'" | 788 | ac_cv_ps_varlist="[procstat,&procvsz,&procrss,&procuid,&procppid,&procpcpu,procprog,&pos]" |
852 | ac_cv_ps_format="%s %d %d %s %n" | 789 | ac_cv_ps_format="%s %d %d %d %d %f %s %n" |
853 | ac_cv_vsz_command="$PATH_TO_PS waxco 'vsz command'" | ||
854 | ac_cv_vsz_format="%d %s" | ||
855 | ac_cv_rss_command="$PATH_TO_PS waxco 'rss command'" | ||
856 | ac_cv_rss_format="%d %s" | ||
857 | EXTRAS="$EXTRAS check_nagios" | 790 | EXTRAS="$EXTRAS check_nagios" |
858 | AC_MSG_RESULT([$ac_cv_ps_command]) | 791 | AC_MSG_RESULT([$ac_cv_ps_command]) |
859 | 792 | ||
@@ -864,12 +797,12 @@ then | |||
864 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" | 797 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&pos,procprog]" |
865 | ac_cv_ps_command="$PATH_TO_PS -Al" | 798 | ac_cv_ps_command="$PATH_TO_PS -Al" |
866 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" | 799 | ac_cv_ps_format="%*s %s %d %*s %d %*s %*s %*s %*s %*s %*s %*s %*s %*s %n%s" |
867 | if ps -Ao 'vsz comm' 2>/dev/null | \ | 800 | #if ps -Ao 'vsz comm' 2>/dev/null | \ |
868 | egrep -i ["^ *VSZ +COMMAND"] >/dev/null | 801 | # egrep -i ["^ *VSZ +COMMAND"] >/dev/null |
869 | then | 802 | #then |
870 | ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" | 803 | # ac_cv_vsz_command="$PATH_TO_PS -Ao 'vsz comm'" |
871 | ac_cv_vsz_format="%*s %d" | 804 | # ac_cv_vsz_format="%*s %d" |
872 | fi | 805 | #fi |
873 | AC_MSG_RESULT([$ac_cv_ps_command]) | 806 | AC_MSG_RESULT([$ac_cv_ps_command]) |
874 | 807 | ||
875 | else | 808 | else |
@@ -882,14 +815,6 @@ AC_DEFINE_UNQUOTED(PS_COMMAND,"$ac_cv_ps_command", | |||
882 | [Verbatim command to execute for ps in check_procs]) | 815 | [Verbatim command to execute for ps in check_procs]) |
883 | AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format", | 816 | AC_DEFINE_UNQUOTED(PS_FORMAT,"$ac_cv_ps_format", |
884 | [Format string for scanning ps output in check_procs]) | 817 | [Format string for scanning ps output in check_procs]) |
885 | AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$ac_cv_vsz_command", | ||
886 | [Verbatim command to execute for ps in check_vsz]) | ||
887 | AC_DEFINE_UNQUOTED(VSZ_FORMAT,"$ac_cv_vsz_format", | ||
888 | [Format string for scanning ps output in check_vsz]) | ||
889 | AC_DEFINE_UNQUOTED(RSS_COMMAND,"$ac_cv_rss_command", | ||
890 | [Verbatim command to execute for ps in check_rss]) | ||
891 | AC_DEFINE_UNQUOTED(RSS_FORMAT,"$ac_cv_rss_format", | ||
892 | [Format string for scanning ps output in check_rss]) | ||
893 | 818 | ||
894 | AC_PATH_PROG(PATH_TO_DF,df) | 819 | AC_PATH_PROG(PATH_TO_DF,df) |
895 | AC_PATH_PROG(PATH_TO_BDF,bdf) | 820 | AC_PATH_PROG(PATH_TO_BDF,bdf) |