diff options
-rw-r--r-- | configure.in | 5 | ||||
-rw-r--r-- | plugins/check_procs.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/configure.in b/configure.in index f6c33dc..3173d6d 100644 --- a/configure.in +++ b/configure.in | |||
@@ -737,12 +737,15 @@ then | |||
737 | ac_cv_ps_cols=7 | 737 | ac_cv_ps_cols=7 |
738 | AC_MSG_RESULT([$ac_cv_ps_command - with no RSS]) | 738 | AC_MSG_RESULT([$ac_cv_ps_command - with no RSS]) |
739 | 739 | ||
740 | dnl Solaris 2.6 | ||
740 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ | 741 | elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \ |
741 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null | 742 | egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null |
742 | then | 743 | then |
743 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" | 744 | ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]" |
744 | ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'" | 745 | ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'" |
745 | ac_cv_ps_format="%s %d %d %d %d %f %s %n" | 746 | # There must be no space between the %s and %n due to a wierd problem in sscanf where |
747 | # it will return %n as longer than the line length | ||
748 | ac_cv_ps_format="%s %d %d %d %d %f %s%n" | ||
746 | ac_cv_ps_cols=8 | 749 | ac_cv_ps_cols=8 |
747 | AC_MSG_RESULT([$ac_cv_ps_command]) | 750 | AC_MSG_RESULT([$ac_cv_ps_command]) |
748 | 751 | ||
diff --git a/plugins/check_procs.c b/plugins/check_procs.c index edb33ac..402daa5 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c | |||
@@ -155,10 +155,6 @@ main (int argc, char **argv) | |||
155 | /* Zombie processes do not give a procprog command */ | 155 | /* Zombie processes do not give a procprog command */ |
156 | if ( cols == (expected_cols - 1) && strstr(procstat, zombie) ) { | 156 | if ( cols == (expected_cols - 1) && strstr(procstat, zombie) ) { |
157 | cols = expected_cols; | 157 | cols = expected_cols; |
158 | /* Set some value for procargs for the strip command further below | ||
159 | Seen to be a problem on some Solaris 7 and 8 systems */ | ||
160 | input_buffer[pos] = '\n'; | ||
161 | input_buffer[pos+1] = 0x0; | ||
162 | } | 158 | } |
163 | if ( cols >= expected_cols ) { | 159 | if ( cols >= expected_cols ) { |
164 | resultsum = 0; | 160 | resultsum = 0; |