next up previous contents
Next: 3.9 Gredi Up: 3 Aplikativne naloge Previous: 3.7 Torzijske vzmeti

3.8 Statisticna obdelava kontrole vstopa

Za statistiko prehoda vrat se lahko generira datoteka v obliki HTML, ki se dnevno osvezuje. Racunalnik belezi vse dogodke v ASCII datoteki, ki jo s poljubnim programom interpretiramo in napisemo datoteko v formatu HTML, tako da jo lahko streznik prikaze. Program je mozno napisati v poljubnem jeziku, saj gre le za branje in pisanje datoteke. Statisticne grafe za dnevni, tedenski in mesecni prehod in variacije je potrebno izdelati v jeziku HTML in sestavljanjem slikic (bar) v binarni obliki. Primer za taksno generiranje je program Analog za statistiko WWW strani. Pomoc in informacije: Janez Krek.

Primer vhodne datoteke je naslednji:

....
Mar 12 15:54:40 : Computer: door open from leon@achilles.
Mar 12 15:57:18 : Keyboard: used INSIDE keyboard, typed code 4.
Mar 12 15:59:06 : Keyboard: used OUTSIDE keyboard, typed code 2.
Mar 12 16:01:22 : Keyboard: used INSIDE keyboard, typed code 4.
Mar 12 16:53:48 : Key 00000034C843 (dr. Joze DUHOVNIK - 8): Entrance.
Mar 12 16:55:59 : Key 00000034C843 (dr. Joze DUHOVNIK - 8): Leaving.
Mar 12 17:34:00 : Key 00000030D6E8 (Leon Kos - 8): Leaving.
Mar 12 18:18:46 : Key 000000194C98 (Snazilka - 8): Entrance.
Mar 12 18:22:05 : Key 000000194C98 (Snazilka - 8): Leaving.
Mar 12 18:29:23 : Key 0000004349B2 (Janez KREK - 8): Leaving.
Mar 12 18:35:28 : Key 000000194C98 (Snazilka - 8): Leaving (not in the lab)
Mar 12 18:36:00 : Key 000000194C98 (Snazilka - 8): Leaving (not in the lab)
Mar 12 18:36:14 : Key 000000194C98 (Snazilka - 8): Entrance.
Mar 12 18:36:24 : Key 000000194C98 (Snazilka - 8): Entrance.
Mar 12 19:26:47 : Keyboard: used OUTSIDE keyboard, typed code 2.
Mar 12 20:58:10 : Keyboard: used INSIDE
keyboard, typed code 4.
...

Izhodna datoteka naj bi uporabljala sestavljanje osnovnih palck in s tem graf. Primer izhodne datoteke, ki je prikazana na sliki 4 je naslednji:

<HTML>
<h2><a NAME="Monthly">Monthly Report</a></h2>

<p>Each unit (<tt><img src="/images/bar1.gif" alt="+"></tt>) 
 represents 20 requests for pages, or part thereof.
<pre width=65><tt>
   month: pages: 
--------  -----  
Dec 1997:   587: <img src="/images/bar16.gif"><img src="/images/bar8.gif">
      <img src="/images/bar4.gif"><img src="/images/bar2.gif">
Jan 1998:   857: <img src="/images/bar32.gif"><img src="/images/bar8.gif">
     <img src="/images/bar2.gif"><img src="/images/bar1.gif">
Feb 1998:   720: <img src="/images/bar32.gif"><img src="/images/bar4.gif">
Mar 1998:   117: <img src="/images/bar4.gif"><img src="/images/bar2.gif">
</tt></pre><hr>
</HTML>

  figure254
Figure 4: Del HTML dokumenta z izrisano statistiko



Leon Kos
Tue Mar 24 18:24:32 CET 1998