loadd - load measuring agent markus@wernig.net server that measures system load for specified services and returns them on request to external programs. ######################################################################## Copyright 2000 Markus Wernig loadd is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. loadd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with loadd; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ######################################################################## loadd checks for open sockets for services defined in /etc/services AND /etc/loadd.conf. (see there) for proper operation make sure that netstat, grep, ps and wc are executable by the user running loadd. loadd runs on port 1600 by default, but can be configured to use any other free port. there are commandline options to loadd which have the same effect as the options in /etc/loadd.conf, but a different syntax. commandline options override /etc/loadd.conf. -h [host]: bind to specific host/address - default is not to bind -p [port]: bind to port [port] - default is 1600 -s [service]: service to measure load for - no default -l [limit]: maximum allowed number of concurrent connections for [service] -a [application]: application that must be running for [service] - otherwise return maximum load, so that no connections are made -f [file]: configuration file to use. default is /etc/loadd.conf -q: quiet, no version output -D: write debug information to syslog. syslog must be configured to log *.info and *.debug -DDD: heavy debugging. this will fill your syslog file very fast, so only use it if you have the source code at hand and can analyze it. -v: display version and exit NOTE: the -s, -l, -a switches will limit load measuring to the service specified by -s [service]. it is more reliable to enter your definitions in /etc/loadd.conf. also, this will allow you to measure load for more than one service. mandatory information (provided on command line or in file): service limit to install this: # make # cp loadd /usr/local/bin # cp loadd.conf /etc IMPORTANT: edit /etc/loadd.conf according to system hints can be found there to start standalone: # /usr/local/bin/loadd -S to reload configuration: kill -HUP to start from inetd: enter this line into /etc/inetd.conf loadd dgram udp wait nobody /usr/local/bin/loadd loadd -q [-options] and this into /etc/services loadd 1600/udp restart inetd