<br><font size=2><tt>Hello,</tt></font>
<br>
<br><font size=2><tt>I got very good feedbacks on the reports. Thank you
for these ! </tt></font>
<br><font size=2><tt>Now, I'm going to explain how it works. You got two
parts. On one hand, some shell scripts will generate the rrd graphs and
save them as PNG. In other hand, a php page will do the reports with the
(GREAT) help of the libfpdf. </tt></font>
<br>
<br><font size=2><tt>Before I go further, I want to say that I created
a directory called 'pdf' into @HOBBITSERVERHOME/www/ In addition, I make
an 'images', 'graphrrd', 'export' directories. In conclusion, I got the
'pdf' directory organized like this :</tt></font>
<br>
<br><font size=2><tt>[hobbit@psi200 pdf]$ ls -al</tt></font>
<br><font size=2><tt>total 164</tt></font>
<br><font size=2><tt>drwxr-xr-x    6 hobbit hobbit  4096
mai  2 14:52 .</tt></font>
<br><font size=2><tt>drwxr-xr-x   30 hobbit hobbit  4096 mai
 2 15:25 ..</tt></font>
<br><font size=2><tt>drwxr-xr-x    5 hobbit hobbit  4096
avr 30 23:59 export</tt></font>
<br><font size=2><tt>drwxrwxr-x  157 hobbit hobbit  4096 avr
28 19:20 graphrrd</tt></font>
<br><font size=2><tt>drwxrwxr-x    2 hobbit hobbit  4096
mar 22 18:31 images</tt></font>
<br><font size=2><tt>-rwxrwxr-x    1 hobbit hobbit  5251
mar 22 15:52 pdf.php</tt></font>
<br><font size=2><tt>-rwxrwxr-x    1 hobbit hobbit 52241 avr
21 19:53 rapport.php</tt></font>
<br><font size=2><tt>-rwxrwxr-x    1 hobbit hobbit 11125 avr
11 16:17 rapportredac.php</tt></font>
<br><font size=2><tt>-rwxrwxr-x    1 hobbit hobbit  7459
avr 10 15:31 rapports_annuels.php</tt></font>
<br><font size=2><tt>-rwxrwxr-x    1 hobbit hobbit  8814
avr 10 15:30 rapports_mensuels.php</tt></font>
<br><font size=2><tt>drwxrwxr-x    2 hobbit hobbit  4096
mai  2 12:34 scripts</tt></font>
<br>
<br><font size=2><tt>export : directory where all reports generated automatically
go.</tt></font>
<br><font size=2><tt>graphrrd : directory where all PNG graphs generated
automatically go.</tt></font>
<br><font size=2><tt>images : directory where all images to include in
the pdf go. I'm giving you some images in images.zip</tt></font>
<br><font size=2><tt>scripts : directory to stock scripts which generate
the PNG graphs.</tt></font>
<br>
<br>
<br><font size=2><tt>Ok, let's go !</tt></font>
<br><font size=2><tt>1) first part : shell scripts (rrdscripts.zip). Decompress
the scripts into your 'pdf' directory and edit them to modify the destination
of PNGs graphs. Once done, launch master.sh and look at the results. For
one server, you must have 4 graphs BY test. Actually, I'm graphing 6 tests
- cputil, load, memory, iowait, network (don't work for linux at the moment
!!) and run-queue. You can add more tests if you want ! For example, you
will have : </tt></font>
<br>
<br><font size=2><tt>graphrrd/myserver/</tt></font>
<br><font size=2><tt>load.myserver-[day/week/month/year].png</tt></font>
<br><font size=2><tt>mem.myserver-[day/week/month/year].png</tt></font>
<br><font size=2><tt>...</tt></font>
<br>
<br><font size=2><tt>Now, you can do a cron to launch master.sh every hour
to update your graphs. </tt></font>
<br><font size=2><tt>Thanks to ED (ed.zehome.com) for his site and his
explanation of rrdtool. I used examples from his site into the scripts...</tt></font>
<br>
<br><font size=2><tt>2) Second part, the php pages (pdfreports.zip). Put
these files directly into the pdf directory. You have five files :</tt></font>
<br>
<br><font size=2><tt>- pdf.php --> contains the main form with hobbit's
look ! You may add this page to your hobbit's menu. Simply type in the
text field a server name and got your *beautiful* report :)</tt></font>
<br><font size=2><tt>- rapport.php --> contains all the php code. So,
the file pdf.php calls this file when a name is submitted. Within this
script you can define </tt></font>
<br>
<br><font size=2><tt>- rapportredac.php --> contains a form with several
textareas. You have to put a server name, check a box if the server is
overloaded, underloaded or 'normally loaded'. Then, all text in the textareas
will go under graphs in the pdf report. You can easily build analysis for
your boss or team... Like pdf.php, this page calls rapport.php.</tt></font>
<br>
<br><font size=2><tt>- rapports_mensuels (monthly) and rapports_annuels
(annual - sorry for french) : you can execute these scripts to have reports
- for all servers - automatically generated and put into a directory. Like
'master.sh' you can do a cron to have reports each end of month. These
two scripts even check the last day of month and send a mail when reports
are generated. </tt></font>
<br>
<br><font size=2><tt>If all is correct you will have a pdf report with
your graphs in it when you click on 'rapport !' on the pdf.php page. That's
all !</tt></font>
<br><font size=2><tt>You have to edit them by hand to modify and adapt
to your configuration. I'm sorry the code isn't very clean at all ! Moreover,
you will have a lot of french text in the files. I'm beginning to rewrite
comments into english.</tt></font>
<br><font size=2><tt>Feel free to make comments and/or modifications to
the scripts. </tt></font>
<br>
<br><font size=2><tt>I hope, these reports will satisfy your needs. I'm
sorry for the shorts explanations but I got another project which take
all my time... So, I will try my best to answer questions, if you have
some !</tt></font>
<br><font size=2><tt>Best regards,</tt></font>
<br>
<br><font size=2><tt>Thomas Seglard</tt></font>
<br>
<br><FONT SIZE=3><BR>
<BR>
Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et etabli a l'intention exclusive de ses destinataires.<BR>
Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est<BR>
interdite, sauf autorisation expresse.<BR>
L'internet ne permettant pas d'assurer l'integrite de ce message, CNP Assurances et ses filiales declinent toute responsabilite<BR>
au titre de ce message, s'il a ete altere, deforme ou falsifie.<BR>
<BR>
*****<BR>
<BR>
This message and any attachments (the "message") are confidential and intended solely for the addressees.<BR>
Any unauthorised use or dissemination is prohibited.<BR>
E-mails are susceptible to alteration.<BR>
Neither CNP Assurances nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.<BR>
</FONT>