Hello, I have run into a problem where mon seg faults when the output of a monitor exceeds a certain size. Looks it's right around the 4 KB limit. I've written a quick-and-dirty bash script to check for free space on the hosts in a hostgroup, and it works fine when the hostgroup contains just a few hosts. But when I attempt to test with a larger hostgroup (9 or more), mon.cgi gives an Internal Server Error, and monshow simply displays a segmentation fault.
Basically the script works by ssh'ing to the servers and running df -h, then parses the output looking for a value in the Use field that is greater than or equal to a specified value. The monitor returns as output a status message about which host/partition is near capacity, and also the output of df -h for each host. I have added an option to the monitor script to suppress the df-per-host output, and if I activate this option in the mon.cf file, everything works great: I still get alerts if a server has an almost full partition, but of course the detailed output is missing. I wish to be able to use mon.cgi to quickly check the disk usage on all of the hosts, so this output is very important. I have found that when the output is over 4 KB, the problem occurs. After doing some testing, I was able to make it work by getting the output down to about 3.5 KB or so. I did this by removing the header columns (Filesystem, Size, Used, etc) and the /dev/shm entry as these rows are not critical. However my concern is that once I begin to add more hosts to the hostgroup, I will again run into this problem as the output gets larger. When running mon with debugging enabled, the debug output started listing integers, one per line in sequential order, about one per second, and never terminating or moving onto other monitors until I stopped mon. It was at this point that monshow displayed segmentation fault. My question is, is anyone aware of a limitation in the expected output of a monitor returned to mon? I briefly looked through mon's source, but didn't come across anything to give any clues. Thanks in advance ;-) -- Chris _______________________________________________ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon
