From: Ton Voon Date: Sun, 8 Jun 2003 22:22:06 +0000 (+0000) Subject: Support for OpenBSD 3.2 & 3.3 ps (Julien Touche) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e0ba1803822af74bdd85c1a0f413b56ec6225342;p=nagiosplug.git Support for OpenBSD 3.2 & 3.3 ps (Julien Touche) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@539 f882894a-f735-0410-b71e-b25c423dba1c --- diff --git a/configure.in b/configure.in index a7f3d1f..9c4265f 100644 --- a/configure.in +++ b/configure.in @@ -618,8 +618,19 @@ dnl #### Process table test AC_PATH_PROG(PATH_TO_PS,ps) AC_MSG_CHECKING(for ps syntax) +dnl For OpenBSD 3.2 & 3.3. Must come before ps -weo +dnl STAT UCOMM VSZ RSS USER PPID COMMAND +if ps -axwo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ + egrep -i ["^ *STAT +UCOMM +VSZ +RSS +USER +UID +PPID +COMMAND"] > /dev/null +then + ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" + ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid ppid vsz rss pcpu comm args'" + ac_cv_ps_format="%s %d %d %d %d %f %s %n" + EXTRAS="$EXTRAS check_nagios" + AC_MSG_RESULT([$ac_cv_ps_command]) + dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND -if ps -weo 'stat comm vsz rss user uid ppid args' 2>/dev/null | \ +elif 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 then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"