Tue Jan 9, 1996 This is Sun's rpc.rstatd ported to linux with a new feature and a new client to exploit that new feature. Author: Adam Migus (amigus@cs.mun.ca) Original: Sun MicroSystems. rpc.rstatd collects kernel information on the host machine, I have ported Sun's version of this daemon to use the proc file system. Output look similar Output look similar to mun-ruptime (found on ftp.cs.mun.ca). I have added the ability of extracting the number of users on the remote host and a new "rup" client which exploits that feature. * Both the new client and daemon remain backwardly compatible with previous versions. rpc.rstatd can be loaded from the command line but is usually executed via inetd(8). To Install: Edit the Makefile and add the option NORPCLIB if your rpc functions are built into libc (as they are on most linux machines). Also you will have to comment out the call -lrpclib. If you have a network interface other than "eth0" that appears in /proc/net/dev, like "tu0", "sl0" etc you can define it as the interface for rstatd to moniter by adding: -DNET_IFACE=\"\" to the options line in the Makefile. Append the following line to your /etc/inetd.conf rstatd/1-5 dgram rpc/udp wait root /usr/sbin/rpc.rstatd rpc.rstatd This daemon is currently implemented on all linux machine on my local campus and it working quite well, but it has only been tested for linux-1.2.8. Any bug reports, comments, etc. sent to the below address. To Install clnt.h.patch: (see below for details) In /usr/include/rpc type patch -p0 < clnt.h.patch BUGFIXES 3.03 Fixed incorrect numbers in ipackets, opackets, etc. for 1.2.13, and for 1.3.xx. Thanks for some help with the patch from: Jens Maurer (jmaurer@cck.uni-kl.de) Fixed infinite loop problem if IFACE wasn't in /proc/net/dev all the time eg. ppp0. Stat's are now reinitialized to zero as well. Thanks for the patch from: Carlos Fonseca (fonseca@acse.shef.ac.uk) I have also added a quick hack called "rsysinfo" to extract and print all the information collected by rstatd. This is also an idea of Jens Maurer who submitted code for the program as well. KNOWN BUGS (if you know how to fix them email me) When compiling there are various "incompatible pointer types" errors. These are caused by declarations/macros in /usr/include/rpc/xdr.h, and or ones in /usr/include/rpc/clnt.h. I have included a patch for clnt.h that will get rid of these errors. How ever since they are harmless installing the patch is not nessessary. With some versions of rpclib the compiled "rup" may not broadcast correctly. This is another reason why it is recommended to use built in libc rpc stuff. Adam Migus, amigus@cs.mun.ca