Update manuals for CVS and new commands
[spider.git] / html / adminmanual_en-8.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <HTML>
3 <HEAD>
4  <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20">
5  <TITLE>The DXSpider Administration Manual v1.51: Web based statistics</TITLE>
6  <LINK HREF="adminmanual_en-9.html" REL=next>
7  <LINK HREF="adminmanual_en-7.html" REL=previous>
8  <LINK HREF="adminmanual_en.html#toc8" REL=contents>
9 <link rel=stylesheet href="style.css" type="text/css" title="default stylesheet">
10 </HEAD>
11 <BODY>
12 <A HREF="adminmanual_en-9.html">Next</A>
13 <A HREF="adminmanual_en-7.html">Previous</A>
14 <A HREF="adminmanual_en.html#toc8">Contents</A>
15 <HR>
16 <H2><A NAME="s8">8.</A> <A HREF="adminmanual_en.html#toc8">Web based statistics</A></H2>
17
18 <P>From version 1.50, you can use the freeware software MRTG to produce
19 really nice graphical statistics on your web site.  For an example
20 try 
21 <A HREF="http://www.gb7mbc.net/mrtg/stats.html">http://www.gb7mbc.net/mrtg/stats.html</A>.</P>
22
23 <P>The following should help you get it all working.</P>
24
25 <P>First you need to download the latest version of MRTG from 
26 <A HREF="http://people.ee.ethz.ch/~oetiker/webtools/mrtg/">http://people.ee.ethz.ch/~oetiker/webtools/mrtg/</A>.
27 You will also need the following files..</P>
28 <P>
29 <BLOCKQUOTE><CODE>
30 <PRE>
31 libpng-1.0.14.tar.gz
32 zlib-1.1.4.tar.gz
33 gd-1.8.3.tar.gz
34 </PRE>
35 </CODE></BLOCKQUOTE>
36 </P>
37 <P>Login to your machine as the root user, put all the downloaded files 
38 in /usr/local/src/ (or wherever you prefer) and untar and compile them.  
39 All the information to compile and install these sources come with them.
40 After compilation and installation,  you will find MRTG in /usr/local/mrtg-2.</P>
41
42 <P>Now copy all the files in /usr/local/src/mrtg-2.9.22/images/ to 
43 /spider/html/mrtg/</P>
44
45 <P>You now need to make 2 symbolic links like below...</P>
46 <P>
47 <BLOCKQUOTE><CODE>
48 <PRE>
49 ln -s /usr/local/mrtg-2/bin/mrtg /usr/bin/mrtg
50 ln -s /usr/local/mrtg-2/lib/mrtg2 /usr/lib/mrtg2
51 </PRE>
52 </CODE></BLOCKQUOTE>
53 </P>
54
55 <P>Now login to the cluster with your sysop callsign and run the command 
56 "mrtg all".</P>
57
58 <P>Now you are nearly there!  Login as the sysop user and change to the
59 /spider/html/mrtg/ directory.  Now run the command <EM>indexmaker</EM> as
60 shown below...</P>
61 <P>
62 <BLOCKQUOTE><CODE>
63 <PRE>
64 indexmaker --output stats.html --columns=1 --title "MRTG statistics for GB7DJK" ../../mrtg/mrtg.cfg
65 </PRE>
66 </CODE></BLOCKQUOTE>
67 </P>
68 <P>Changing the callsign for your own cluster callsign of course!</P>
69
70 <P>And finally you need to login as the root user and create one last
71 symbolic link.  Where this points will depend on where your html
72 documents are kept.  For RedHat systems you use...</P>
73 <P>
74 <BLOCKQUOTE><CODE>
75 <PRE>
76 ln -s /home/sysop/spider/html/mrtg /home/httpd/html/mrtg
77 </PRE>
78 </CODE></BLOCKQUOTE>
79 </P>
80 <P>and for SuSE systems...</P>
81 <P>
82 <BLOCKQUOTE><CODE>
83 <PRE>
84 ln -s /home/sysop/spider/html/mrtg /usr/local/httpd/htdocs/mrtg
85 </PRE>
86 </CODE></BLOCKQUOTE>
87 </P>
88 <P>If you now point your browser to your website as below it should all
89 be happening!</P>
90 <P>
91 <BLOCKQUOTE><CODE>
92 <PRE>
93 http://www.xxx.xxx/mrtg/stats.html
94 </PRE>
95 </CODE></BLOCKQUOTE>
96 </P>
97 <P>Of course, to get the stats to update, you need to add some information
98 in the spider crontab file as below...</P>
99 <P>
100 <BLOCKQUOTE><CODE>
101 <PRE>
102 # Update stats for mrtg on website
103 00,05,10,15,20,25,30,35,40,45,50,55 * * * * run_cmd('mrtg all')
104 </PRE>
105 </CODE></BLOCKQUOTE>
106 </P>
107 <P>This will update the site every 5 minutes.</P>
108
109 <HR>
110 <A HREF="adminmanual_en-9.html">Next</A>
111 <A HREF="adminmanual_en-7.html">Previous</A>
112 <A HREF="adminmanual_en.html#toc8">Contents</A>
113 </BODY>
114 </HTML>