xymon

Check-in [3f9fb296fd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:trunk: Merge inode checks for Solaris, *BSD, OSX from 4.3.10, and last-minute fixes from 4.3.10 up to rev. 7164 (4.3.10 release) git-svn-id: http://svn.code.sf.net/p/xymon/code/trunk@7166 44351d6e-118b-4698-b696-ce33095ecaa4
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | master
Files: files | file ages | folders
SHA3-256: 3f9fb296fd491a5eb58b33cca8e8b5203ca6fb8e556b656b9e185d80534a7d1d
User & Date: storner@users.sf.net 2012-08-08 10:17:27
Context
2012-11-30
06:22
FreeBSD client: Memory patch for FreeBSD 8.0+, from Mark Felder git-svn-id: http://svn.code.sf.net/p/xymon/code/trunk@7175 44351d6e-118b-4698-b696-ce33095ecaa4 check-in: e47e615f01 user: storner@users.sf.net tags: trunk, master
2012-08-08
10:17
trunk: Merge inode checks for Solaris, *BSD, OSX from 4.3.10, and last-minute fixes from 4.3.10 up to rev. 7164 (4.3.10 release) git-svn-id: http://svn.code.sf.net/p/xymon/code/trunk@7166 44351d6e-118b-4698-b696-ce33095ecaa4 check-in: 3f9fb296fd user: storner@users.sf.net tags: trunk, master
2012-08-02
20:47
AIX inode check: Missed header change when switching to SYSV df command git-svn-id: http://svn.code.sf.net/p/xymon/code/trunk@7160 44351d6e-118b-4698-b696-ce33095ecaa4 check-in: 54c36042de user: storner@users.sf.net tags: trunk, master
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to build/Makefile.rules.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18



#####################
# Build targets
#####################

CFLAGS += -I. -I$(BUILDTOPDIR)/include

ifeq ($(CLIENTONLY),yes)
	BUILDTARGETS = client
	CFLAGS += -DCLIENTONLY=1
ifeq ($(LOCALCLIENT),yes)
	CLIENTTARGETS = lib-client common-client build-build xymond-client
	INSTALLTARGETS = install-client install-localclient install-clientmsg







|







4
5
6
7
8
9
10
11
12
13
14
15
16
17
18



#####################
# Build targets
#####################

CFLAGS += -I$(BUILDTOPDIR)/include

ifeq ($(CLIENTONLY),yes)
	BUILDTARGETS = client
	CFLAGS += -DCLIENTONLY=1
ifeq ($(LOCALCLIENT),yes)
	CLIENTTARGETS = lib-client common-client build-build xymond-client
	INSTALLTARGETS = install-client install-localclient install-clientmsg

Changes to client/xymonclient-darwin.sh.

7
8
9
10
11
12
13





14
15
16
17
18
19
20
#                                                                            #
# This program is released under the GNU General Public License (GPL),       #
# version 2. See the file "COPYING" for details.                             #
#                                                                            #
#----------------------------------------------------------------------------#
#
# $Id$






echo "[date]"
date
echo "[uname]"
uname -a
echo "[uptime]"
uptime







>
>
>
>
>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#                                                                            #
# This program is released under the GNU General Public License (GPL),       #
# version 2. See the file "COPYING" for details.                             #
#                                                                            #
#----------------------------------------------------------------------------#
#
# $Id$

# Use LANG=C, since some locales have different numeric delimiters
# causing the Xymon load-average calculation to fail
LANG=C
export LANG

echo "[date]"
date
echo "[uname]"
uname -a
echo "[uptime]"
uptime

Changes to client/xymonclient-freebsd.sh.

22
23
24
25
26
27
28








29
30
31
32
33
34
35
who
echo "[df]"
# The sed stuff is to make sure lines are not split into two.
df -H -tnonfs,nullfs,cd9660,procfs,devfs,linprocfs,fdescfs | sed -e '/^[^ 	][^ 	]*$/{
N
s/[ 	]*\n[ 	]*/ /
}'








echo "[mount]"
mount
echo "[meminfo]"
$XYMONHOME/bin/freebsd-meminfo
echo "[swapinfo]"
swapinfo -k
if test `uname -r | cut -d. -f1` -ge 8







>
>
>
>
>
>
>
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
who
echo "[df]"
# The sed stuff is to make sure lines are not split into two.
df -H -tnonfs,nullfs,cd9660,procfs,devfs,linprocfs,fdescfs | sed -e '/^[^ 	][^ 	]*$/{
N
s/[ 	]*\n[ 	]*/ /
}'
echo "[inode]"
# The sed stuff is to make sure lines are not split into two.
df -i -tnonfs,nullfs,cd9660,procfs,devfs,linprocfs,fdescfs | sed -e '/^[^ 	][^ 	]*$/{
N
s/[ 	]*\n[ 	]*/ /
}' | awk '
NR<2{printf "%-20s %10s %10s %10s %10s %s\n", $1, "itotal", $6, $7, $8, $9} 
NR>=2{printf "%-20s %10d %10d %10d %10s %s\n", $1, $6+$7, $6, $7, $8, $9}'
echo "[mount]"
mount
echo "[meminfo]"
$XYMONHOME/bin/freebsd-meminfo
echo "[swapinfo]"
swapinfo -k
if test `uname -r | cut -d. -f1` -ge 8

Changes to client/xymonclient-openbsd.sh.

16
17
18
19
20
21
22
23
24
25
26







27
28
29
30
31
32
33
echo "[uname]"
uname -a
echo "[uptime]"
uptime
echo "[who]"
who
echo "[df]"
df -P -tnonfs,kernfs,procfs,cd9660 | sed -e '/^[^ 	][^ 	]*$/{
N
s/[ 	]*\n[ 	]*/ /
}'







echo "[mount]"
mount
echo "[meminfo]"
$XYMONHOME/bin/openbsd-meminfo
echo "[swapctl]"
/sbin/swapctl -s
echo "[ifconfig]"







|



>
>
>
>
>
>
>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
echo "[uname]"
uname -a
echo "[uptime]"
uptime
echo "[who]"
who
echo "[df]"
df -k -tnonfs,kernfs,procfs,cd9660 | sed -e '/^[^ 	][^ 	]*$/{
N
s/[ 	]*\n[ 	]*/ /
}'
echo "[inode]"
df -i -tnonfs,kernfs,procfs,cd9660 | sed -e '/^[^       ][^     ]*$/{
N
s/[     ]*\n[   ]*/ /
}' | awk '
NR<2{printf "%-20s %10s %10s %10s %10s %s\n", $1, "itotal", $6, $7, $8, $9} 
NR>=2{printf "%-20s %10d %10d %10d %10s %s\n", $1, $6+$7, $6, $7, $8, $9}'
echo "[mount]"
mount
echo "[meminfo]"
$XYMONHOME/bin/openbsd-meminfo
echo "[swapctl]"
/sbin/swapctl -s
echo "[ifconfig]"

Changes to client/xymonclient-sunos.sh.

29
30
31
32
33
34
35











36
37
38
39
40
41
42
FSTYPES=`/bin/df -n -l|cut -d: -f2 | awk '{print $1}'|egrep -v "^${ROOTFSTYPE}|^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs|^lofs"|sort|uniq`
set $FSTYPES
while test "$1" != ""; do
  /bin/df -F $1 -k | grep -v " /var/run" | tail +2
  shift
done












echo "[mount]"
mount
echo "[prtconf]"
/usr/sbin/prtconf
echo "[memory]"
vmstat 1 2 | tail -1
echo "[swap]"







>
>
>
>
>
>
>
>
>
>
>







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FSTYPES=`/bin/df -n -l|cut -d: -f2 | awk '{print $1}'|egrep -v "^${ROOTFSTYPE}|^proc|^fd|^mntfs|^ctfs|^devfs|^objfs|^nfs|^lofs"|sort|uniq`
set $FSTYPES
while test "$1" != ""; do
  /bin/df -F $1 -k | grep -v " /var/run" | tail +2
  shift
done

# This only works for ufs filesystems
echo "[inode]"
(if test -x /usr/ucb/df
then
   /usr/ucb/df -i
else
   df -o i 2>/dev/null
fi) | awk '
NR<2{printf "%-20s %10s %10s %10s %10s %s\n", $1, "itotal", $2, $3, $4, $5}
NR>=2{printf "%-20s %10d %10d %10d %10s %s\n", $1, $2+$3, $2, $3, $4, $5}'

echo "[mount]"
mount
echo "[prtconf]"
/usr/sbin/prtconf
echo "[memory]"
vmstat 1 2 | tail -1
echo "[swap]"

Changes to docs/install.html.

239
240
241
242
243
244
245

246
247
248
249
250
251
252
...
570
571
572
573
574
575
576




577
578
579
580
	<li><a href="#commonfedora17">Fedora Linux 17</a></li>
	<li><a href="#commondebian6">Debian 6 (Squeeze)</a></li>
	<li><a href="#commonubuntu1204">Ubuntu 12.04 LTS (Precise Pangolin)</a></li>
	<li><a href="#commonfreebsd">FreeBSD 7, 8 and 9</a></li>
	<li><a href="#commonopenbsd">OpenBSD 4, 5</a></li>
	<li><a href="#commonsolaris10x86csw">Solaris 10/x86 (using OpenCSW)</a></li>
	<li><a href="#commonsolaris10x86sfw">Solaris 10/x86 (using Sun Freeware)</a></li>

</ul>

<h4><a name="commonrhel6">Red Hat Enterprise Linux 6 / CentOS 6</a></h4>
<p>RHEL6 has all of the necessary tools except fping included in the core distribution.</p>
<pre><tt>groupadd xymon
useradd -g xymon -m xymon

................................................................................
make
make install
</tt></pre>
<p>The SunFreeware libraries are installed in /usr/local/lib, which is <em>NOT</em> searched by default by the Solaris runtime linker. You must either set LD_LIBRARY_PATH globally to include /usr/local/lib, or you can use the &quot;crle&quot; utility to add /usr/local/lib to the set of directories searched by default. Typically this means running this command:</p>
<pre><tt>	crle -c /var/ld/ld.config -l /usr/lib:/usr/lib/secure:/usr/local/lib </tt></pre></p>
<p>The latter method using &quot;crle&quot; is the recommended method, since LD_LIBRARY_PATH settings can be difficult to setup so they work for all invocations of the Xymon binaries.</p>






</body>
</html>








>







 







>
>
>
>




239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
...
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
	<li><a href="#commonfedora17">Fedora Linux 17</a></li>
	<li><a href="#commondebian6">Debian 6 (Squeeze)</a></li>
	<li><a href="#commonubuntu1204">Ubuntu 12.04 LTS (Precise Pangolin)</a></li>
	<li><a href="#commonfreebsd">FreeBSD 7, 8 and 9</a></li>
	<li><a href="#commonopenbsd">OpenBSD 4, 5</a></li>
	<li><a href="#commonsolaris10x86csw">Solaris 10/x86 (using OpenCSW)</a></li>
	<li><a href="#commonsolaris10x86sfw">Solaris 10/x86 (using Sun Freeware)</a></li>
	<li><a href="#commonmacosx">Mac OSX</a></li>
</ul>

<h4><a name="commonrhel6">Red Hat Enterprise Linux 6 / CentOS 6</a></h4>
<p>RHEL6 has all of the necessary tools except fping included in the core distribution.</p>
<pre><tt>groupadd xymon
useradd -g xymon -m xymon

................................................................................
make
make install
</tt></pre>
<p>The SunFreeware libraries are installed in /usr/local/lib, which is <em>NOT</em> searched by default by the Solaris runtime linker. You must either set LD_LIBRARY_PATH globally to include /usr/local/lib, or you can use the &quot;crle&quot; utility to add /usr/local/lib to the set of directories searched by default. Typically this means running this command:</p>
<pre><tt>	crle -c /var/ld/ld.config -l /usr/lib:/usr/lib/secure:/usr/local/lib </tt></pre></p>
<p>The latter method using &quot;crle&quot; is the recommended method, since LD_LIBRARY_PATH settings can be difficult to setup so they work for all invocations of the Xymon binaries.</p>

<h4><a name="commonmacosx">Mac OSX 10.6, 10.7 and 10.8</a></h4>
<p>Xymon is available for OSX 10.6, 10.7 and 10.8 through the <a href="http://www.macports.org/">macports project</a>.</p>

<p>The ports can be found here:<a href="http://www.macports.org/ports.php?by=name&substr=xymon">http://www.macports.org/ports.php?by=name&amp;substr=xymon</a>, and there's a page on <a href="https://trac.macports.org/wiki/howto/SetupXymonServer">how to make xymon server on a Mac</a>.</p>

</body>
</html>

Changes to lib/Makefile.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
XYMONLIBS = $(XYMONLIB)
XYMONCOMMLIB = libxymoncomm.a
XYMONCOMMLIBS = $(XYMONCOMMLIB) $(ZLIBLIBS) $(SSLLIBS) $(NETLIBS) $(LIBRTDEF)
XYMONTIMELIB = libxymontime.a
XYMONTIMELIBS = $(XYMONTIMELIB) $(LIBRTDEF)


CFLAGS += -I. -I../include 

all: test-endianness $(XYMONLIB) $(XYMONCOMMLIB) $(XYMONTIMELIB) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB) loadhosts stackio availability md5 sha1 rmd160 locator

client: test-endianness $(XYMONCLIENTLIB) $(XYMONCLIENTCOMMLIB) $(XYMONTIMELIB)

test-endianness: test-endianness.c
	$(CC) $(CFLAGS) -o $@ $<







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
XYMONLIBS = $(XYMONLIB)
XYMONCOMMLIB = libxymoncomm.a
XYMONCOMMLIBS = $(XYMONCOMMLIB) $(ZLIBLIBS) $(SSLLIBS) $(NETLIBS) $(LIBRTDEF)
XYMONTIMELIB = libxymontime.a
XYMONTIMELIBS = $(XYMONTIMELIB) $(LIBRTDEF)


CFLAGS += -I../include 

all: test-endianness $(XYMONLIB) $(XYMONCOMMLIB) $(XYMONTIMELIB) $(XYMONCLIENTCOMMLIB) $(XYMONCLIENTLIB) loadhosts stackio availability md5 sha1 rmd160 locator

client: test-endianness $(XYMONCLIENTLIB) $(XYMONCLIENTCOMMLIB) $(XYMONTIMELIB)

test-endianness: test-endianness.c
	$(CC) $(CFLAGS) -o $@ $<

Changes to rpm/xymon.spec.

149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
%attr(755, root, root) /etc/init.d/xymon
%attr(644, root, root) /etc/logrotate.d/xymon
%attr(-, root, root) /usr/lib/xymon
%attr(-, root, root) /usr/bin/*
%attr(-, xymon, xymon) /var/lib/xymon
%attr(775, xymon, apache) %dir /var/lib/xymon/www/rep
%attr(775, xymon, apache) %dir /var/lib/xymon/www/snap
%attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu.css

%attr(755, xymon, xymon) %dir /usr/lib/xymon/client/ext
%attr(664, xymon, apache) %config /etc/xymon/critical.cfg
%attr(664, xymon, apache) %config /etc/xymon/critical.cfg.bak
%attr(4750, root, xymon) /usr/lib/xymon/server/bin/fping4
%attr(4750, root, xymon) /usr/lib/xymon/server/bin/fping6
%attr(750, root, xymon) /usr/lib/xymon/client/bin/logfetch
%attr(750, root, xymon) /usr/lib/xymon/client/bin/clientupdate







|
>







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
%attr(755, root, root) /etc/init.d/xymon
%attr(644, root, root) /etc/logrotate.d/xymon
%attr(-, root, root) /usr/lib/xymon
%attr(-, root, root) /usr/bin/*
%attr(-, xymon, xymon) /var/lib/xymon
%attr(775, xymon, apache) %dir /var/lib/xymon/www/rep
%attr(775, xymon, apache) %dir /var/lib/xymon/www/snap
%attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu-grey.css
%attr(644, root, root) %config /var/lib/xymon/www/menu/xymonmenu-blue.css
%attr(755, xymon, xymon) %dir /usr/lib/xymon/client/ext
%attr(664, xymon, apache) %config /etc/xymon/critical.cfg
%attr(664, xymon, apache) %config /etc/xymon/critical.cfg.bak
%attr(4750, root, xymon) /usr/lib/xymon/server/bin/fping4
%attr(4750, root, xymon) /usr/lib/xymon/server/bin/fping6
%attr(750, root, xymon) /usr/lib/xymon/client/bin/logfetch
%attr(750, root, xymon) /usr/lib/xymon/client/bin/clientupdate

Changes to xymond/client/freebsd.c.

20
21
22
23
24
25
26

27
28
29
30
31
32
33
..
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62
63
64
65
66

67
68
69
70
71
72
73
	char *uptimestr;
	char *clockstr;
	char *msgcachestr;
	char *whostr;
	char *psstr;
	char *topstr;
	char *dfstr;

	char *meminfostr;
	char *swapinfostr;
	char *vmtotalstr;
	char *msgsstr;
	char *netstatstr;
	char *ifstatstr;
	char *portsstr;
................................................................................
	uptimestr = getdata("uptime");
	clockstr = getdata("clockstr");
	msgcachestr = getdata("msgcache");
	whostr = getdata("who");
	psstr = getdata("ps");
	topstr = getdata("top");
	dfstr = getdata("df");

	meminfostr = getdata("meminfo");
	swapinfostr = getdata("swapinfo");
	msgsstr = getdata("msgs");
	netstatstr = getdata("netstat");
	ifstatstr = getdata("ifstat");
	portsstr = getdata("ports");
	vmstatstr = getdata("vmstat");
	vmtotalstr = getdata("vmtotal");

	unix_cpu_report(hostname, clienttype, os, hinfo, fromline, timestr, uptimestr, clockstr, msgcachestr, 
			whostr, 0, psstr, 0, topstr);
	unix_disk_report(hostname, clienttype, os, hinfo, fromline, timestr, "Avail", "Capacity", "Mounted", dfstr);

	unix_procs_report(hostname, clienttype, os, hinfo, fromline, timestr, "COMMAND", NULL, psstr);
	unix_ports_report(hostname, clienttype, os, hinfo, fromline, timestr, 3, 4, 5, portsstr);

	msgs_report(hostname, clienttype, os, hinfo, fromline, timestr, msgsstr);
	file_report(hostname, clienttype, os, hinfo, fromline, timestr);
	linecount_report(hostname, clienttype, os, hinfo, fromline, timestr);








>







 







>












>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
	char *uptimestr;
	char *clockstr;
	char *msgcachestr;
	char *whostr;
	char *psstr;
	char *topstr;
	char *dfstr;
	char *inodestr;
	char *meminfostr;
	char *swapinfostr;
	char *vmtotalstr;
	char *msgsstr;
	char *netstatstr;
	char *ifstatstr;
	char *portsstr;
................................................................................
	uptimestr = getdata("uptime");
	clockstr = getdata("clockstr");
	msgcachestr = getdata("msgcache");
	whostr = getdata("who");
	psstr = getdata("ps");
	topstr = getdata("top");
	dfstr = getdata("df");
	inodestr = getdata("inode");
	meminfostr = getdata("meminfo");
	swapinfostr = getdata("swapinfo");
	msgsstr = getdata("msgs");
	netstatstr = getdata("netstat");
	ifstatstr = getdata("ifstat");
	portsstr = getdata("ports");
	vmstatstr = getdata("vmstat");
	vmtotalstr = getdata("vmtotal");

	unix_cpu_report(hostname, clienttype, os, hinfo, fromline, timestr, uptimestr, clockstr, msgcachestr, 
			whostr, 0, psstr, 0, topstr);
	unix_disk_report(hostname, clienttype, os, hinfo, fromline, timestr, "Avail", "Capacity", "Mounted", dfstr);
	unix_inode_report(hostname, clienttype, os, hinfo, fromline, timestr, "ifree", "%iused", "Mounted", inodestr);
	unix_procs_report(hostname, clienttype, os, hinfo, fromline, timestr, "COMMAND", NULL, psstr);
	unix_ports_report(hostname, clienttype, os, hinfo, fromline, timestr, 3, 4, 5, portsstr);

	msgs_report(hostname, clienttype, os, hinfo, fromline, timestr, msgsstr);
	file_report(hostname, clienttype, os, hinfo, fromline, timestr);
	linecount_report(hostname, clienttype, os, hinfo, fromline, timestr);

Changes to xymond/client/openbsd.c.

20
21
22
23
24
25
26

27
28
29
30
31
32
33
..
42
43
44
45
46
47
48

49
50
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
	char *uptimestr;
	char *clockstr;
	char *msgcachestr;
	char *whostr;
	char *psstr;
	char *topstr;
	char *dfstr;

	char *meminfostr;
	char *msgsstr;
	char *netstatstr;
	char *ifstatstr;
	char *portsstr;
	char *vmstatstr;

................................................................................
	uptimestr = getdata("uptime");
	clockstr = getdata("clock");
	msgcachestr = getdata("msgcache");
	whostr = getdata("who");
	psstr = getdata("ps");
	topstr = getdata("top");
	dfstr = getdata("df");

	meminfostr = getdata("meminfo");
	msgsstr = getdata("msgs");
	netstatstr = getdata("netstat");
	ifstatstr = getdata("ifstat");
	portsstr = getdata("ports");
	vmstatstr = getdata("vmstat");

	unix_cpu_report(hostname, clienttype, os, hinfo, fromline, timestr, uptimestr, clockstr, msgcachestr, 
			whostr, 0, psstr, 0, topstr);
	unix_disk_report(hostname, clienttype, os, hinfo, fromline, timestr, "Avail", "Capacity", "Mounted", dfstr);

	unix_procs_report(hostname, clienttype, os, hinfo, fromline, timestr, "COMMAND", NULL, psstr);
	unix_ports_report(hostname, clienttype, os, hinfo, fromline, timestr, 3, 4, 5, portsstr);

	msgs_report(hostname, clienttype, os, hinfo, fromline, timestr, msgsstr);
	file_report(hostname, clienttype, os, hinfo, fromline, timestr);
	linecount_report(hostname, clienttype, os, hinfo, fromline, timestr);








>







 







>










>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
	char *uptimestr;
	char *clockstr;
	char *msgcachestr;
	char *whostr;
	char *psstr;
	char *topstr;
	char *dfstr;
	char *inodestr;
	char *meminfostr;
	char *msgsstr;
	char *netstatstr;
	char *ifstatstr;
	char *portsstr;
	char *vmstatstr;

................................................................................
	uptimestr = getdata("uptime");
	clockstr = getdata("clock");
	msgcachestr = getdata("msgcache");
	whostr = getdata("who");
	psstr = getdata("ps");
	topstr = getdata("top");
	dfstr = getdata("df");
	inodestr = getdata("inode");
	meminfostr = getdata("meminfo");
	msgsstr = getdata("msgs");
	netstatstr = getdata("netstat");
	ifstatstr = getdata("ifstat");
	portsstr = getdata("ports");
	vmstatstr = getdata("vmstat");

	unix_cpu_report(hostname, clienttype, os, hinfo, fromline, timestr, uptimestr, clockstr, msgcachestr, 
			whostr, 0, psstr, 0, topstr);
	unix_disk_report(hostname, clienttype, os, hinfo, fromline, timestr, "Avail", "Capacity", "Mounted", dfstr);
	unix_inode_report(hostname, clienttype, os, hinfo, fromline, timestr, "ifree", "%iused", "Mounted", inodestr);
	unix_procs_report(hostname, clienttype, os, hinfo, fromline, timestr, "COMMAND", NULL, psstr);
	unix_ports_report(hostname, clienttype, os, hinfo, fromline, timestr, 3, 4, 5, portsstr);

	msgs_report(hostname, clienttype, os, hinfo, fromline, timestr, msgsstr);
	file_report(hostname, clienttype, os, hinfo, fromline, timestr);
	linecount_report(hostname, clienttype, os, hinfo, fromline, timestr);

Changes to xymond/client/solaris.c.

24
25
26
27
28
29
30

31
32
33
34
35
36
37
..
45
46
47
48
49
50
51

52
53
54
55
56
57
58
..
59
60
61
62
63
64
65

66
67
68
69
70
71
72
	char *psstr;
	char *topstr;
	char *prtconfstr;
	char *memorystr;
	char *swapstr;
	char *swapliststr;
	char *dfstr;

	char *msgsstr;
	char *netstatstr;
	char *ifstatstr;
	char *portsstr;
	char *vmstatstr;
	char *iostatdiskstr;

................................................................................
	uptimestr = getdata("uptime");
	clockstr = getdata("clock");
	msgcachestr = getdata("msgcache");
	whostr = getdata("who");
	psstr = getdata("ps");
	topstr = getdata("top");
	dfstr = getdata("df");

	prtconfstr = getdata("prtconf");
	memorystr = getdata("memory");
	swapstr = getdata("swap");
	swapliststr = getdata("swaplist");
	msgsstr = getdata("msgs");
	netstatstr = getdata("netstat");
	ifstatstr = getdata("ifstat");
................................................................................
	portsstr = getdata("ports");
	vmstatstr = getdata("vmstat");
	iostatdiskstr = getdata("iostatdisk");

	unix_cpu_report(hostname, clienttype, os, hinfo, fromline, timestr, uptimestr, clockstr, msgcachestr, 
			whostr, 0, psstr, 0, topstr);
	unix_disk_report(hostname, clienttype, os, hinfo, fromline, timestr, "avail", "capacity", "Mounted", dfstr);

	unix_procs_report(hostname, clienttype, os, hinfo, fromline, timestr, "CMD", "COMMAND", psstr);
	unix_ports_report(hostname, clienttype, os, hinfo, fromline, timestr, 0, 1, 6, portsstr);

	msgs_report(hostname, clienttype, os, hinfo, fromline, timestr, msgsstr);
	file_report(hostname, clienttype, os, hinfo, fromline, timestr);
	linecount_report(hostname, clienttype, os, hinfo, fromline, timestr);








>







 







>







 







>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
..
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
	char *psstr;
	char *topstr;
	char *prtconfstr;
	char *memorystr;
	char *swapstr;
	char *swapliststr;
	char *dfstr;
	char *inodestr;
	char *msgsstr;
	char *netstatstr;
	char *ifstatstr;
	char *portsstr;
	char *vmstatstr;
	char *iostatdiskstr;

................................................................................
	uptimestr = getdata("uptime");
	clockstr = getdata("clock");
	msgcachestr = getdata("msgcache");
	whostr = getdata("who");
	psstr = getdata("ps");
	topstr = getdata("top");
	dfstr = getdata("df");
	inodestr = getdata("inode");
	prtconfstr = getdata("prtconf");
	memorystr = getdata("memory");
	swapstr = getdata("swap");
	swapliststr = getdata("swaplist");
	msgsstr = getdata("msgs");
	netstatstr = getdata("netstat");
	ifstatstr = getdata("ifstat");
................................................................................
	portsstr = getdata("ports");
	vmstatstr = getdata("vmstat");
	iostatdiskstr = getdata("iostatdisk");

	unix_cpu_report(hostname, clienttype, os, hinfo, fromline, timestr, uptimestr, clockstr, msgcachestr, 
			whostr, 0, psstr, 0, topstr);
	unix_disk_report(hostname, clienttype, os, hinfo, fromline, timestr, "avail", "capacity", "Mounted", dfstr);
	unix_inode_report(hostname, clienttype, os, hinfo, fromline, timestr, "ifree", "%iused", "Mounted", inodestr);
	unix_procs_report(hostname, clienttype, os, hinfo, fromline, timestr, "CMD", "COMMAND", psstr);
	unix_ports_report(hostname, clienttype, os, hinfo, fromline, timestr, 0, 1, 6, portsstr);

	msgs_report(hostname, clienttype, os, hinfo, fromline, timestr, msgsstr);
	file_report(hostname, clienttype, os, hinfo, fromline, timestr);
	linecount_report(hostname, clienttype, os, hinfo, fromline, timestr);

Changes to xymond/rrd/do_memory.c.

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
	if ((actval >= 0) && (actval <= 100)) {
		setupfn2("%s.%s.rrd", "memory", "actual");
		snprintf(rrdvalues, sizeof(rrdvalues), "%d:%d", (int)tstamp, actval);
		create_and_update_rrd(hostname, testname, classname, pagepaths, memory_params, memory_tpl);
	}
}

/* bb-xsnmp.pl memory update - Marco Avissano */
void do_memory_rrd_update_router(time_t tstamp, char *hostname, char *testname, char *classname, char *pagepaths, int procval, int ioval, int fastval)
{
	if (memory_tpl == NULL) memory_tpl = setup_template(memory_params);

	if ((procval >= 0) && (procval <= 100)) { 
		setupfn2("%s.%s.rrd", "memory", "processor");
		snprintf(rrdvalues, sizeof(rrdvalues), "%d:%d", (int)tstamp, procval);







|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
	if ((actval >= 0) && (actval <= 100)) {
		setupfn2("%s.%s.rrd", "memory", "actual");
		snprintf(rrdvalues, sizeof(rrdvalues), "%d:%d", (int)tstamp, actval);
		create_and_update_rrd(hostname, testname, classname, pagepaths, memory_params, memory_tpl);
	}
}

/* bb-xsnmp.pl memory update - Marco Avvisano */
void do_memory_rrd_update_router(time_t tstamp, char *hostname, char *testname, char *classname, char *pagepaths, int procval, int ioval, int fastval)
{
	if (memory_tpl == NULL) memory_tpl = setup_template(memory_params);

	if ((procval >= 0) && (procval <= 100)) { 
		setupfn2("%s.%s.rrd", "memory", "processor");
		snprintf(rrdvalues, sizeof(rrdvalues), "%d:%d", (int)tstamp, procval);

Changes to xymond/xymond_client.c.

648
649
650
651
652
653
654







655
656
657
658
659
660
661
662

663
664
665
666
667
668
669
			addtobuffer(dfstr_filtered, bol);
			addtobuffer(dfstr_filtered, "\n");
		}
		if (nl) { *nl = '\n'; bol = nl+1; } else bol = NULL;
	}

	if ((capacol == -1) && (mntcol == -1)) {







		/* If this happens, we havent found our headers so no filesystems have been processed */
		inodecolor = COL_YELLOW;
		sprintf(msgline, "&red Expected strings (%s and %s) not found in df output\n", 
			capahdr, mnthdr);
		addtobuffer(monmsg, msgline);

		errprintf("Host %s (%s) sent incomprehensible inode report - missing columnheaders '%s' and '%s'\n%s\n",
			  hostname, osname(os), capahdr, mnthdr, dfstr);

	}

	/* Check for filesystems that must (not) exist */
	while ((iname = check_inode_count(&icount, &imin, &imax, &icolor, &group)) != NULL) {
		char limtxt[1024];

		*limtxt = '\0';







>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
>







648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
			addtobuffer(dfstr_filtered, bol);
			addtobuffer(dfstr_filtered, "\n");
		}
		if (nl) { *nl = '\n'; bol = nl+1; } else bol = NULL;
	}

	if ((capacol == -1) && (mntcol == -1)) {
		if (strlen(dfstr) == 0) {
			/* Empty inode report, happens on Solaris when all filesystems are ZFS */
			inodecolor = COL_GREEN;
			sprintf(msgline, "&green No filesystems reporting inode data\n");
			addtobuffer(monmsg, msgline);
		}
		else {
			/* If this happens, we havent found our headers so no filesystems have been processed */
			inodecolor = COL_YELLOW;
			sprintf(msgline, "&red Expected strings (%s and %s) not found in df output\n", 
				capahdr, mnthdr);
			addtobuffer(monmsg, msgline);
	
			errprintf("Host %s (%s) sent incomprehensible inode report - missing columnheaders '%s' and '%s'\n%s\n",
				  hostname, osname(os), capahdr, mnthdr, dfstr);
		}
	}

	/* Check for filesystems that must (not) exist */
	while ((iname = check_inode_count(&icount, &imin, &imax, &icolor, &group)) != NULL) {
		char limtxt[1024];

		*limtxt = '\0';