1MRTG-NW-GUIDE(1)                     mrtg                     MRTG-NW-GUIDE(1)
2
3
4

NAME

6       mrtg-nw-guide - MRTG for NetWare
7

SYNOPSIS

9       This guide is intended to aid in the installation and configuration of
10       MRTG on a NetWare server.
11

OVERVIEW

13       MRTG is a relative newcomer to the NetWare platform. Earlier versions
14       of NetWare could not run MRTG natively for several reasons:
15
16       ·   Absence of NetWare OS support in the MRTG package.
17
18       ·   A NetWare server commandline length limitation.
19
20       ·   Absence of the Rateup executable (Rateup.nlm).
21
22       ·   A standard installation method.
23
24       ·   Problems with NetWare's implementation of Perl.
25
26       Support for the NetWare OS has now been fully added into MRTG, begin‐
27       ning with MRTG release 2.12.2.
28
29       Liberallly minded operating systems support a commandline length
30       approaching 1000 characters. In such environments it was an easy matter
31       to pass the sometimes high number of parameters used by MRTG's Rateup
32       executable directly on the commandline. Until NetWare 6.5, NetWare had
33       a commandline limit of 512 characters. This limitation was also removed
34       for NetWare 6.0 by Service Pack 5. For other NetWare versions and ear‐
35       lier Service Packs, this limitation remains. To permit a 'standard'
36       interface for NetWare, the Rateup executable has been modified to also
37       read its parameters from a file, and the MRTG script has been modified
38       to support this method on a NetWare platform.  (See New Rateup Switch)
39
40       A Rateup NLM is now available, along with the necessary scripts to
41       build it if required. See the  NetWare Support section of this document
42       for further details. Additionally, mrtg.pl has been revised because of
43       the unique (to NetWare) name of executables (NLM).
44
45       The absence of a specific installation procedure has caused MRTG to
46       fail in the past because the Perl script could not find or load the
47       Rateup executable. The installation method supplied here will solve
48       this problem for now.
49
50       The MRTG.pl script in the 2.12.2 (or later) version of MRTG has been
51       configured to suit all likely versions of NetWare able to use Perl5,
52       and bypasses all of the known problems with NetWare Perl running MRTG.
53

PREREQUISITES

55       You will need the following:
56
57       ·   Perl 5.8.0 for NetWare with latest Perl Updates (February, 2005 or
58           later; previous versions MAY work)
59
60       ·   NetWare 5.1 w/ SP8, NetWare 6.0 w/ SP5 or NetWare 6.5 w/ SP2.
61
62       ·   A copy of the MRTG Package (v2.12.2 at time of writting)
63
64       ·   Three .ncf files to execute the Perl scripts at the NetWare server
65           console.
66
67       ·   A copy of the Rateup NLM (Pre-built or compiled)
68
69       ·   Optionally, any NetWare supported Web Server (Netscape, Apache 1.3
70           or 2.0)
71
72       For copies of the .ncf files and Rateup NLM, see NetWare Support in
73       this document.
74

INSTALLING MRTG

76       1.  Install the latest Perl 5.8.x release on your server. See the Perl
77           documentation for details.
78
79       2.  Create the following directories:
80
81                    SYS:/Mrtg
82                    SYS:/Mrtg/bin
83                    SYS:/Mrtg/contrib    (Optional for this document)
84                    SYS:/Mrtg/doc        (Optional for this document)
85                    SYS:/Mrtg/html
86                    SYS:/Mrtg/html/images
87                    SYS:/Mrtg/html/work
88                    SYS:/Mrtg/lib
89                    SYS:/Mrtg/logs
90                    SYS:/Mrtg/translate
91
92       3.  Copy from the MRTG package the following files:
93
94                    \bin\*        to  SYS:/Mrtg/bin              All files. See Note 1.
95
96               Note 1: Add a .pl extension to the mrtg, cfgmaker and indexmaker files.
97                       The rateup.exe will NOT be needed on the NetWare server.
98
99                    \contrib\*    to  SYS:/Mrtg/contrib/         Include sub-directories
100                    \doc\*        to  SYS:/Mrtg/doc/             All files
101                    \images\*     to  SYS:/Mrtg/html/images/     All files
102                    \translate\*  to  SYS:/Mrtg/translate/       All files. See Note 2.
103
104               Note 2: For English-only language support, all \translate files EXCEPT Locales_mrtg may be deleted.
105
106                    \lib\*        to  SYS:/Mrtg/lib              Include sub-directories. See Note 3.
107
108               Note 3: This will create the SYS:/Mrtg/lib/mrtg2 and ./pod directories.
109
110       4.  Create copies of the three .ncf files and install them:
111
112                    *.ncf         to  SYS:/Mrtg/bin
113
114           See NetWare Support in this document for details on how to create
115           copies of these files.
116
117       5.  See Compiling Rateup.nlm"> in this document for details on compil‐
118           ing the Rateup NLM yourself if desired.  A prebuit verion is avail‐
119           able in the .\mrtg\bin directory where it must remain.
120

CONFIGURING MRTG

122       ·   Refer to Novell documentation on configuring and loading SNMP sup‐
123           port on your server if this is the device to be monitored.
124
125       ·   Edit sys:/mrtg/bin/MakeMrtgCfg.ncf:
126
127                     - replace ccccc with the GET community name for the SNMP device (typically 'public'),
128                     - replace ddddd with the DNS name or IP address of the device to be monitored.
129
130                     e.g    public@www.myserver.com, public@10.202.65.180
131
132                     Note 1: These are NOT mail addresses, they just look like one!
133                     Note 2: If multiple devices are to be monitored, add their entries to the same line:
134
135                     e.g  perl cfgmaker.pl public@www.myserver.com public@10.202.65.180 > sys:/mrtg/bin/mrtg.cfg
136
137           In this "Getting Started", it is 'suggested' to only monitor a sin‐
138           gle device.
139
140       ·   At the server console, run:
141
142                    sys:/mrtg/bin/MakeMrtgCfg.ncf
143
144           This will create Mrtg.cfg in sys:/mrtg/bin.
145
146       ·   Edit the Mrtg.cfg configuration file created in the previous step.
147           Note the following:
148
149           It was found, when testing MRTG on a NetWare 6.5 server using a NIC
150           Interface, that mrtg.cfg contained the following message:
151
152            ### Interface 1 >> Descr: 'Intel(R)-8255x-based-Network-Connection'...
153            ### The following interface is commented out because:
154            ### * has a speed of 0 which makes no sense
155            #
156            ...
157
158           If this occurs, edit MakeMrtgCfg.ncf and add the following parame‐
159           ter as shown:
160
161            perl sys:\mrtg\bin\cfgmaker.pl --zero-speed=nnn public@10.202.65.180 > sys:\mrtg\bin\Mrtg.cfg
162
163           where nnn is the interface speed in bits per second. For a 100
164           Megabit LAN NIC, nnn = 10000000. It will be necessary to re-execute
165           the MakeMrtgCfg.ncf script before continuing with this section.
166
167           Below line 16 (*** Global Defaults), add:
168
169            HtmlDir:  <a path>  e.g  HtmlDir:  sys:/mrtg/html
170            ImageDir: <a path>  e.g  ImageDir: sys:/mrtg/html/work
171            LogDir:   <a path>  e.g  LogDir:   sys:/mrtg/logs
172            IconDir:  <a path>  e.g  IconDir:  ./images
173
174           Note 1
175               The HtmlDir entry specifies where MRTG will create its HTML
176               pages.
177
178           Note 2
179               The ImageDir entry specifies where the created graphic icons
180               are placed.
181
182           Note 3
183               The IconDir entry specifies where the supplied MRTG icons are
184               located.  It MUST be a relative path from HtmlDir or absolute
185               URL. The value shown is recommended.
186
187       ·   At the server console run:
188
189            sys:/mrtg/bin/RunMrtg.ncf
190
191           several times. By the third time it should run without showing
192           error messages on the console screen.  This should create:
193
194           ·   A HTML page in the (HtmlDir) directory for each monitored
195               device,
196
197           ·   A .dat file in the (ImageDir) directory for each monitored
198               device,
199
200           ·   Several .png icons in the (ImageDir) directory,
201
202           ·   Some log file entries in the (LogDir) directory.
203
204           Note: If you experience a "Use of uninitialised value in split"
205           error, it will be necessary to create a 'Path' environment variable
206           at the server console; use the following example
207
208            env path="SYS:\"  (The actual value is immaterial, as long as the var itself exists.)
209
210       ·   Edit sys:/mrtg/bin/MakeMrtgIndex.ncf. Change the indicated <path>
211           shown in the following example to match the value entered for
212           (HtmlDir).
213
214            perl --noscreen sys:/mrtg/bin/indexmaker.pl sys:/mrtg/bin/Mrtg.cfg > <path>/index.html
215
216       ·   Create an index.html page linking the seperate device HTML page(s).
217           At the server console, run:
218
219            sys:/mrtg/bin/MakeMrtgIndex.ncf
220
221           This will create index.html in the (HtmlDir) directory.
222
223       ·   Optionally, configure a Web Server to permit access to the direc‐
224           tory specified in (HtmlDir) to view the MRTG graphs remotely, at,
225           for example:
226
227            http://ip_or_dns/mrtg/index.html
228
229           A sample configuration for an Apache Webserver is shown:
230
231            Alias /mrtg/ "SYS:/mrtg/html/"
232            <Directory "SYS:/mrtg/html">
233                        AllowOverride None
234                        Order allow,deny
235                        Allow from all
236            </Directory>
237
238       ·   Set the property of the directory pointed to by (ImageDir), to
239           'Purge Immediate'.
240
241       ·   Finally, read the MRTG documentation for much more detailed config‐
242           uration/usage information.
243
244       Welcome to MRTG!!
245

MAKE MRTG RUN ALL THE TIME

247       MRTG can be made to run periodically by at least two means:
248
249       ·   Using CRON Scheduling
250
251       ·   Running MRTG in Daemon Mode
252
253       CRON Scheduling
254
255       To use CRON scheduling, create a CRON Scheduler entry to execute the
256       RunMrtg.ncf file on a frequency appropriate for the server environment
257       and information desired. The following entry in the sys:\etc\crontab
258       file will execute MRTG every five minutes:
259
260        0,5,10,15,20,25,30,35,40,45,50,55 * * * * sys:\mrtg\bin\runmrtg.ncf
261
262       The CRON Scheduler (cron.nlm) can be started automatically by adding it
263       in AUTOEXEC.ncf or, manually loading it at the server console.
264
265       MRTG in Daemon Mode
266
267       Refer to the MRTG-Reference document for information about the 'RunAs‐
268       Daemon' option. Its use is outside the scope of this document.
269

TROUBLESHOOTING

271       Read the MRTG documents, Perl documents or, finally, submit questions
272       to the MRTG User forums.
273
274       For NetWare specific issues, submit questions to the Perl forum at
275       news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
276       Forums).
277

COMPILING RATEUP.NLM

279       In addition to the rateup.c and Makefile.Netware supplied with the MRTG
280       release, you will also need:
281
282       ·   Metrowerks CodeWarrior with NetWare Support OR GCC Compiler (v3.0.3
283           or later) with NlmConv Utility
284
285       ·   Novell LibC NDK (February 2004 or later)
286
287       ·   GD Graphics Library (v2.0.33 or later)
288
289       ·   LibPNG Graphics Library (v1.2.8 or later)
290
291       ·   ZLib Library (v1.2.3 or later)
292
293       ·   The get_ver.awk script
294
295       ·   A copy of the GNU build tools.    (See http://source
296           forge.net/projects/gnuwin32/)
297
298       The auxiliary libraries can be obtained from:
299
300       GD Graphics Library.   (See http://www.boutell.com/gd/ )
301
302       PNG Graphics Library.   (See http://libpng.sourceforge.net/ )
303
304       zLib Compression Library.   (See http://www.gzip.org/zlib/ )
305
306       Edit the Makefile.Netware file as required to match your installation
307       paths; search the file for the key word 'Edit'.
308

NETWARE SUPPORT

310       For copies of the NCF and get_ver.awk scripts, see Appendix.
311
312       For NetWare specific issues, submit questions to the Perl forum at
313       news://developer-forums.novell.com/novell.devsup.perl (Novell Developer
314       Forums).
315
316       To move the MRTG application to a volume other than SYS: you will need
317       to edit the NCF scripts provided plus the MRTG[.pl] script itself in
318       two places.
319

NEW RATEUP SWITCH

321       The MRTG[.pl] script, when used on a NetWare platform, uses
322       Rateup[.nlm] with the new commandline switch:
323
324            RATEUP -f filename
325
326       where the filename parameter can include a leading path element.
327
328       The file format is exactly the same as that used on the commandline by
329       other operating systems, including the leading path and name of the
330       Rateup NLM.
331

APPENDIX

333       The Appendix includes 'copies' of the following files:
334
335       ·   The NCF files used during MRTG configuration,
336
337       To create copies of these files, simply 'cut and paste' into your
338       favourite 'text editor' and save under their respective names. You
339       should remove the leading space from each line.
340
341       MakeMrtgCfg.NCF
342
343        # MakeMrtgCfg.NCF
344        # Purpose : Create the MRTG Configuration File
345        # Changed :  5/05/2005  New
346        # Located : SYS:MRTG\BIN
347        # Set For :
348        # Params  :
349
350        # Edit this file and:
351
352        # Replace ccccc with your device GET SNMP Community Name - If unsure try 'public'.
353        # Replace ddddd with your device IP (n.n.n.n) or domain name.
354
355        perl --noscreen sys:\mrtg\bin\cfgmaker.pl ccccc@ddddd > sys:\mrtg\bin\Mrtg.cfg
356
357        #
358        # End of MakeMrtgCfg.NCF
359
360       RunMrtg.NCF
361
362        # RunMrtg.NCF
363        # Purpose : Run the MRTG Application
364        # Changed :  5/05/2005  New
365        # Located : SYS:MRTG\BIN
366        # Set For :
367        # Params  :
368
369        # The paths are as per the examples recommended in "Getting Started".
370
371        perl --noscreen sys:\mrtg\bin\mrtg.pl sys:\mrtg\bin\mrtg.cfg
372
373        #
374        # End of RunMrtg.NCF
375
376       MakeMrtgIndex.NCF
377
378        # MakeMrtgIndex.NCF
379        # Purpose : Create the HTML Index File for MRTG HTML data pages
380        # Changed :  5/05/2005  New
381        # Located : SYS:MRTG\BIN
382        # Set For :
383        # Params  :
384
385        # Note: Edit this file and change the redirected output to the location
386        #       specified for HtmlDir or WorkDir. The sys:\apache2\htdocs\mrtg\index.html
387        #       is based on the examples in "Getting Started".
388
389        perl --noscreen sys:\mrtg\bin\indexmaker.pl sys:\mrtg\bin\Mrtg.cfg > sys:\mrtg\html\index.html
390
391        #
392        # End of MakeMrtgIndex.NCF
393

LICENSE

395       GNU General Public License
396

CREDITS

398       The MRTG for NetWare exists largely through the efforts of Guenter
399       Knauf and feedback from beta testers.
400

AUTHOR

402       Norm W..
403
404
405
4062.15.1                            2007-02-01                  MRTG-NW-GUIDE(1)
Impressum