diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2004-12-30 14:19:37 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2004-12-30 14:19:37 +0000 |
commit | 69bf92d20a81c0f68db2992e077921654ba63a1b (patch) | |
tree | d4c4fbc49dfea386f8e04ac602cbb6dfac583ea0 /configure.in | |
parent | 7df9bd7bab72af4f300eef9dc509a226924de58b (diff) | |
download | monitoring-plugins-69bf92d20a81c0f68db2992e077921654ba63a1b.tar.gz |
Get ps command for FreeBSD 4 (Tomasz Pilat)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1068 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 76e0ca9d..005a22af 100644 --- a/configure.in +++ b/configure.in | |||
@@ -594,6 +594,18 @@ then | |||
594 | ac_cv_ps_cols=8 | 594 | ac_cv_ps_cols=8 |
595 | AC_MSG_RESULT([$ac_cv_ps_command]) | 595 | AC_MSG_RESULT([$ac_cv_ps_command]) |
596 | 596 | ||
597 | dnl Some *BSDs have different format for ps. This is mainly to catch FreeBSD 4. | ||
598 | dnl Limitation: Only first 16 chars returned for ucomm field | ||
599 | dnl Must come before ps -weo | ||
600 | elif ps -axwo 'stat uid ppid vsz rss pcpu ucomm command' 2>/dev/null | \ | ||
601 | egrep -i ["^ *STAT +UID +PPID +VSZ +RSS +%CPU +UCOMM +COMMAND"] > /dev/null | ||
602 | then | ||
603 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | ||
604 | ac_cv_ps_command="$PATH_TO_PS -axwo 'stat uid ppid vsz rss pcpu ucomm command'" | ||
605 | ac_cv_ps_format="%s %d %d %d %d %f %s %n" | ||
606 | ac_cv_ps_cols=8 | ||
607 | AC_MSG_RESULT([$ac_cv_ps_command]) | ||
608 | |||
597 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND | 609 | dnl STAT UCOMM VSZ RSS USER UID PPID COMMAND |
598 | elif ps -weo 'stat comm vsz rss user uid ppid etime args' 2>/dev/null | \ | 610 | elif ps -weo 'stat comm vsz rss user uid ppid etime args' 2>/dev/null | \ |
599 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null | 611 | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE]+ +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[ELAPSD]+ +[RGSCOMDNA]+"] >/dev/null |