diff -uNrp zabbix-1.8.2.orig/configure zabbix-1.8.2/configure
--- zabbix-1.8.2.orig/configure	2010-03-30 02:23:15.000000000 +0900
+++ zabbix-1.8.2/configure	2010-05-03 03:18:11.000000000 +0900
@@ -4563,6 +4563,140 @@ fi
 
 done
 
+if test "${ac_cv_header_zone_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for zone.h" >&5
+echo $ECHO_N "checking for zone.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zone_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zone_h" >&5
+echo "${ECHO_T}$ac_cv_header_zone_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking zone.h usability" >&5
+echo $ECHO_N "checking zone.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <zone.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking zone.h presence" >&5
+echo $ECHO_N "checking zone.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <zone.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: zone.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: zone.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zone.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: zone.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: zone.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: zone.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zone.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: zone.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zone.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: zone.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zone.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: zone.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zone.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: zone.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zone.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: zone.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for zone.h" >&5
+echo $ECHO_N "checking for zone.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_zone_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_zone_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_zone_h" >&5
+echo "${ECHO_T}$ac_cv_header_zone_h" >&6; }
+
+fi
+if test $ac_cv_header_zone_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZONE_H 1
+_ACEOF
+
+fi
+
+
 
 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
diff -uNrp zabbix-1.8.2.orig/configure.in zabbix-1.8.2/configure.in
--- zabbix-1.8.2.orig/configure.in	2010-03-30 02:22:46.000000000 +0900
+++ zabbix-1.8.2/configure.in	2010-05-03 03:18:11.000000000 +0900
@@ -54,6 +54,7 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string
   sys/timeb.h Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
   net/if_mib.h sys/user.h sys/ucontext.h libperfstat.h devstat.h \
   sys/systemcfg.h)
+AC_CHECK_HEADER(zone.h, [AC_DEFINE([HAVE_ZONE_H], 1, [Define to 1 if you have the 'zone.h'])])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
diff -uNrp zabbix-1.8.2.orig/include/config.h.in zabbix-1.8.2/include/config.h.in
--- zabbix-1.8.2.orig/include/config.h.in	2010-03-30 02:23:15.000000000 +0900
+++ zabbix-1.8.2/include/config.h.in	2010-05-03 03:18:11.000000000 +0900
@@ -39,6 +39,9 @@
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
+/* Define to 1 if you have the <zone.h> header file. */
+#undef HAVE_ZONE_H
+
 /* Define to 1 if function 'initgroups' exists. */
 #undef HAVE_FUNCTION_INITGROUPS
 
diff -uNrp zabbix-1.8.2.orig/include/sysinc.h zabbix-1.8.2/include/sysinc.h
--- zabbix-1.8.2.orig/include/sysinc.h	2010-03-30 02:22:43.000000000 +0900
+++ zabbix-1.8.2/include/sysinc.h	2010-05-03 03:18:11.000000000 +0900
@@ -417,4 +417,8 @@
 #	include <fcntl.h>
 #endif
 
+#ifdef HAVE_ZONE_H
+#	include <zone.h>
+#endif
+
 #endif
diff -uNrp zabbix-1.8.2.orig/src/libs/zbxsysinfo/solaris/proc.c zabbix-1.8.2/src/libs/zbxsysinfo/solaris/proc.c
--- zabbix-1.8.2.orig/src/libs/zbxsysinfo/solaris/proc.c	2010-03-30 02:22:44.000000000 +0900
+++ zabbix-1.8.2/src/libs/zbxsysinfo/solaris/proc.c	2010-05-03 03:34:52.000000000 +0900
@@ -179,11 +179,61 @@ int	PROC_NUM(const char *cmd, const char
 	int		fd = -1;
 	int		zbx_proc_stat;
 	zbx_uint64_t	proccount = 0;
+#if defined(HAVE_ZONE_H)
+	char    zonename[MAX_STRING_LEN];
+	zoneid_t	zoneid;
+#endif
 
 	assert(result);
 
 	init_result(result);
 
+#if defined(HAVE_ZONE_H)
+	if (num_param(param) > 5)
+		return SYSINFO_RET_FAIL;
+
+	if (0 != get_param(param, 1, procname, sizeof(procname)))
+		*procname = '\0';
+
+	if (0 != get_param(param, 2, tmp, sizeof(tmp)))
+		*tmp = '\0';
+
+	if (*tmp != '\0') {
+		usrinfo = getpwnam(tmp);
+		if (usrinfo == NULL)	/* incorrect user name */
+			return SYSINFO_RET_FAIL;
+	} else
+		usrinfo = NULL;
+
+	if (0 != get_param(param, 3, tmp, sizeof(tmp)))
+		*tmp = '\0';
+
+	if (*tmp != '\0') {
+		if (0 == strcmp(tmp, "run"))
+			zbx_proc_stat = ZBX_PROC_STAT_RUN;
+		else if (0 == strcmp(tmp, "sleep"))
+			zbx_proc_stat = ZBX_PROC_STAT_SLEEP;
+		else if (0 == strcmp(tmp, "zomb"))
+			zbx_proc_stat = ZBX_PROC_STAT_ZOMB;
+		else if (0 == strcmp(tmp, "all"))
+			zbx_proc_stat = ZBX_PROC_STAT_ALL;
+		else
+			return SYSINFO_RET_FAIL;
+	} else
+		zbx_proc_stat = ZBX_PROC_STAT_ALL;
+
+	if (0 != get_param(param, 4, proccomm, sizeof(proccomm)))
+		*proccomm = '\0';
+
+	if (0 != get_param(param, 5, zonename, sizeof(zonename)))
+		*zonename='\0';
+	if (*zonename != '\0') {
+		zoneid = getzoneidbyname(zonename);
+		if (0 > zoneid)
+			return SYSINFO_RET_FAIL;
+	}
+
+#else
 	if (num_param(param) > 4)
 		return SYSINFO_RET_FAIL;
 
@@ -219,6 +269,7 @@ int	PROC_NUM(const char *cmd, const char
 
 	if (0 != get_param(param, 4, proccomm, sizeof(proccomm)))
 		*proccomm = '\0';
+#endif
 
 	if (NULL == (dir = opendir("/proc")))
 		return SYSINFO_RET_FAIL;
@@ -253,6 +304,10 @@ int	PROC_NUM(const char *cmd, const char
 
 		if ('\0' != *proccomm && NULL == zbx_regexp_match(psinfo.pr_psargs, proccomm, NULL))
 			continue;
+#if defined(HAVE_ZONE_H)
+		if ('\0' != *zonename && zoneid != psinfo.pr_zoneid)
+			continue;
+#endif
 
 		proccount++;
 	}
