==========================================
 memmon (memmon.pl and get_remote_data.pl)
==========================================
by Erwin Horjus <erwin.horjus@virgil.nl>

---------------
What they do
---------------

memmon.pl and get_remote_data.pl work on the client/server principal.

memmon.pl           - runs on the host you want to monitor.
get_remote_data.pl  - runs on the host where mrtg is running.

-------------------
Before you begin
-------------------

Before you Install, you need the following:

- Perl (I used 5.6)
- Net::Telnet Perl Module (I used 3.03)

-------------
Installation
-------------

The following steps apply to each machine you want to monitor.

1. Copy the memmon.pl script to the host you wish to monitor.

2. In /etc/inetd.conf, insert the line:

mem 	stream	tcp	nowait	root	<path of memmon.pl>

or

mem 	stream	tcp	nowait	root	<path of your TCP wrapper>	<path of memmon.pl>

Of course, the TCP wrapper isn't mandatory, but if you want to restrict access
to the viewing the date retreived, I really recommend you install it.

3. In your /etc/services file, put in the following line:

mem	9048/tcp

The port and portname you choose is up to you, but if you do change it from 9048, be sure
to update get_remote_data.pl and /etc/inetd.conf too (the port number is specified in the first few lines
of the script).

4. kill -HUP your inetd

5. Test it by telnetting to the host at port 9048. You should get the
following:

bash~# telnet hostname 9048
< usual connect messages >
60.1
47.9
129 day(s)
hostname

If you didn't get any output, go back and make sure you did everything
properly.

--------------------------------
Setting up memmon.pl with MRTG
--------------------------------

The memmon.pl script just runs like this:

./memmon.pl

It will figure out on which operating system it runs and executes the subroutine
accordingly.

Please look at sample.cfg to see how to setup memmon.pl with MRTG.

---
I hope this is as useful to you as it has been to me. If you have any
problems/bug reports/advice/complaints, email me.

Enjoy.