summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-01-28 00:32:23 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-01-28 00:32:23 (GMT)
commitb2a2d26d13a130bd0302c941c78b2e0e7c480eda (patch)
treeb7f0fb445c3451b8e578edfaf2c9cc9e79ccb520
parent0716ab15017139cada7be0aa030b6283a22e6779 (diff)
downloadmonitoring-plugins-b2a2d26d13a130bd0302c941c78b2e0e7c480eda.tar.gz
ps support for Darwin / MacOSX
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@255 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--configure.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index fdc6196..919461c 100644
--- a/configure.in
+++ b/configure.in
@@ -633,6 +633,23 @@ then
633 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen",[]) 633 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS glaxen",[])
634 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[]) 634 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%*s %*s %*s %*s %*s %*s %*s %d",[])
635 echo " ps syntax... $PATH_TO_PS glaxen" 635 echo " ps syntax... $PATH_TO_PS glaxen"
636dnl MacOSX / Darwin
637dnl TODO: MacOSX has commands with spaces which will cause problems to PS_FORMAT
638dnl STAT VSZ RSS UID USER PPID UCOMM COMMAND
639dnl Ss 1308 272 0 root 0 init /sbin/init
640elif [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]
641then
642 AC_DEFINE(USE_PS_VARS,1,[Define if we use custom variable list for sscanf])
643 AC_DEFINE_UNQUOTED(PS_VARLIST,[procstat,&procuid,&procppid,procprog,&pos],[])
644 AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'",[])
645 EXTRAS="$EXTRAS check_nagios"
646 AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid ucomm command'",[])
647 AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n",[Format string for scanning ps output in check_procs])
648 AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'",[])
649 AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[])
650 AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxco 'rss command'",[])
651 AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[])
652 echo " ps syntax... $PATH_TO_PS waxo 'state vsz rss command'"
636else 653else
637 echo "** Unable to find usable ps syntax" 654 echo "** Unable to find usable ps syntax"
638fi 655fi