summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 72d0789)
raw | patch | inline | side by side (parent: 72d0789)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 6 Apr 2004 16:02:13 +0000 (16:02 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Tue, 6 Apr 2004 16:02:13 +0000 (16:02 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@864 f882894a-f735-0410-b71e-b25c423dba1c
configure.in | patch | blob | history | |
plugins/check_procs.c | patch | blob | history |
diff --git a/configure.in b/configure.in
index f6c33dc625eff41e2dffa9eb8c325d305ec69041..3173d6d49eeb470b409c8d600c20b56061bc1340 100644 (file)
--- a/configure.in
+++ b/configure.in
ac_cv_ps_cols=7
AC_MSG_RESULT([$ac_cv_ps_command - with no RSS])
+dnl Solaris 2.6
elif ps -Ao 's comm vsz rss uid user ppid args' 2>/dev/null | \
egrep -i ["^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+"] >/dev/null
then
ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos]"
ac_cv_ps_command="$PATH_TO_PS -Ao 's uid ppid vsz rss pcpu comm args'"
- ac_cv_ps_format="%s %d %d %d %d %f %s %n"
+ # There must be no space between the %s and %n due to a wierd problem in sscanf where
+ # it will return %n as longer than the line length
+ ac_cv_ps_format="%s %d %d %d %d %f %s%n"
ac_cv_ps_cols=8
AC_MSG_RESULT([$ac_cv_ps_command])
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index edb33acaa05ab857b307c05783eb11d35e7ca928..402daa53161e6b12c8051f58771b94167f6ecc88 100644 (file)
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
/* Zombie processes do not give a procprog command */
if ( cols == (expected_cols - 1) && strstr(procstat, zombie) ) {
cols = expected_cols;
- /* Set some value for procargs for the strip command further below
- Seen to be a problem on some Solaris 7 and 8 systems */
- input_buffer[pos] = '\n';
- input_buffer[pos+1] = 0x0;
}
if ( cols >= expected_cols ) {
resultsum = 0;