Toon posts:

[ipac] Gifjes maken met ipac ?

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hey!

Ik heb vanmiddag ff ipac geinstalled, omdat het me wel een leuk pakketje leek :P

Maar nu: hij verzamelt al data (kan met ipacsum de totalen weergeven)... Maar nu: hoe maak ik van die leuke graphs? (niet die ASCII dingen ;)).

Ik zag hier laatst in een topic over iemand die dat had, maar ik kan die dus niet meer terug vinden :'(

Verwijderd

Topicstarter
PS. Ik heb dit al geprobeerd:

./ipacsum -g > test.gif

Maar dan bevat mijn test.gif het volgende:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
IP accounting summary
Host: muhlenbaumer.com / Time created: 2002/04/02 20:46:04 UT
Data from 2002/04/02 15:50:03 UT to 2002/04/02 20:46:04 UT
  internetin                          :      87M
  internetuit                        :       11M
  netwerkin                        :         11M
  nertwerkuit                        :       88M
Graph for rule "internetin"
time        bytes 0                               65M
2002/04/02 15:50:03 ******************************************************
2002/04/02 16:50:03 **
2002/04/02 17:50:03 *
2002/04/02 18:50:03 ********
Graph for rule "internetuit"
time        bytes 0                             5449K
2002/04/02 15:50:03 *********************
2002/04/02 16:50:03 ***
2002/04/02 17:50:03 ***
2002/04/02 18:50:03 *******************************
Graph for rule "netwerkin"
time        bytes 0                             5391K
2002/04/02 15:50:03 *************************
2002/04/02 16:50:03 *****
2002/04/02 17:50:03 ****
2002/04/02 18:50:03 ****************************
Graph for rule "nertwerkuit"
time        bytes 0                               66M
2002/04/02 15:50:03 ******************************************************
2002/04/02 16:50:03 **
2002/04/02 17:50:03 *
2002/04/02 18:50:03 ********

Dit is dus het begin van die graphs, nu nog mooi in een GIF/PNG plaatje krijgen :D

  • _nethack
  • Registratie: September 2000
  • Laatst online: 15:01

_nethack

We're all MAD here

Zie man ipacsum voor alle opties :)


aka rtfm :P

Sometimes you just have to sit back, relax, and let the train wreck itself


Verwijderd

Topicstarter
Moet ie het wel doen :+
code:
1
2
muhlenbaumer root # man ipacsum
No manual entry for ipacsum

Verwijderd

Topicstarter
Hmm, volgens mij was jij dat (iig met Cistron MAXX in de ondertitel :D). Of zit ik er weer naast? :)

  • _nethack
  • Registratie: September 2000
  • Laatst online: 15:01

_nethack

We're all MAD here

Op dinsdag 02 april 2002 21:28 schreef CowMike het volgende:
Hmm, volgens mij was jij dat (iig met Cistron MAXX in de ondertitel :D). Of zit ik er weer naast? :)
You just lost me....
:? wat was ik??

edit:

Ow ik zie het al[quote]
Ik zag hier laatst in een topic over iemand die dat had, maar ik kan die dus niet meer terug vinden
[/quote]

Als ik dat was dan was het waarschijnlijk in dit topic...

--
Maargoed... hier het betreffende stukje uit de manpage:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
IMAGE CREATION
     ipacsum can create png images for every rule which is dis¡
     played (so the --filter option can be used to create  only
     certain  pngs).  The  png contains a much nicer version of
     the ascii graph.

     PNG image creation depends on the existence of the perl GD
     library.  If  you  do  not  have the GD library installed,
     ipacsum won't be able to create images.

     If you only have version 1.19 or older of the GD  library,
     ipacsum  will  create  GIF  images  instead of PNG images.
     Newer GD library versions dumped the GIF support in  favor
     of  PNG  due  to  legal  /  copyright  reasons.  All newer
     browsers support PNG images, and  their  use  is  strongly
     encouraged.   All  options described in this section start
     with '--png'; they work the same way if you use the alter¡
     native versions which start with '--gif' instead. There is
     no functional difference.

     --png [DIR]
          Enable png image creation. Images are  stored  into
          the  directory  DIR;  if  not given, in the current
          directory. The images' file names are derived  from
          the  rule  name  - unacceptable characters for file
          names or for http transfers, such  as  spaces,  are
          replaced  with underscores ("_"). The images dimen¡
          sions are 500 * 150.  The Y axis is scaled in bytes
          per  second.  The input data is divided into inter¡
          vals of exactly one pixel on the X axis.

     --png-asis
          Instead of  creating  regular  .png  files,  create
          .asis  files.  .asis files are like .png files, but
          with an HTTP  header  prepended.  If  you  use  the
          apache  HTTP  server, you can enable it to directly
          send  .asis  files  without  generating  many  HTTP
          header  lines on its own (see the apache documenta¡
          tion, "mod_asis"). The major advantage is  that  we
          can  send HTTP "Expires:" header lines with the png
          data, forcing browsers to reload the pictures.  The
          time  given in the Expires: header line is the same
          as in the HTTP META tag in the index html file (see
          --png-index).

     --png-average-curve N
          Draw  an  additional  curve with average values for
          the N dots around the current  one.  The  resulting
          curve  shows  tendencies  rather than exact values.
          Can be useful for long-term development evaluation.
          A good value for N to start with is 15.

     --png-caption-in-index
          When  generating a html index file (see --png-index
          below), add statistical data to each png picture in
          the index file as text.

     --png-height N
          Set the image height to N pixels.

     --png-index [FILE]
          Create  a  html  index file in the image directory,
          containing all images created and some more  infor¡
          mation  about  creation/start/end  times, host name
          etc. The name of the  file  is  index.html  or,  if
          given,  FILE,  and  it is placed into the png image
          directory unless starting with a  "/".   The  index
          file  will  have  some META-Tags in the <HEAD> sec¡
          tion.  If the end of the time period for which  the
          data  is displayed is the current time, one of them
          will be an "Expires" line so www browsers will know
          when  they  should  drop the page from their cache.
          The time in there is calculated as  "now  plus  the
          time one value on the X axis represents".

          (To  be accurate, the time that appears is now plus
          the time  given  at  --interval,  given  --interval
          wasn't  smaller than the time one pixel in X direc¡
          tion represents in which case it is  the  time  one
          pixel in X direction represents.)

     --png-no-average
          ipacsum  draws  a dashed horizontal line indicating
          the average value in each png picture. Specify this
          option to suppress that line.

     --png-normalize SEC
          This  setting  changes the scale on the Y axis. The
          scale is set  to  "bytes  per  SEC  seconds".   The
          default  value is 1, resulting in a scale of "bytes
          per second". If set to 8, the scale will be  "bytes
          per  8  seconds" which is in fact the same as "bits
          per second" (and the scale label is "bits / sec" in
          this  special case indeed). Other values are possi¡
          ble, for example, for a scale of "bytes per  hour",
          set this to 3600 (60*60).

          If  set  to  0,  the Y scale is what you could call
          "absolute". The scale factor is now evaluated  from
          the  --interval  (see above) setting which defaults
          to one hour (resulting in  a  display  of  bytes  /
          hour).  The  input  data  is no longer divided into
          intervals of exactly one pixel  per  interval,  but
          the pixels are divided into n pixels per (constant)
          interval.  The resulting  X,Y  value  dots  in  the
          matrix  are  displayed  stronger  and are connected
          with lines.

          Does anybody understand this and has an idea how to
          explain better?

     --png-filename-prefix PREFIX
          Prefix every image file name with PREFIX.

     --png-total
          Put  total  byte  count value - as displayed in the
          text output - into image caption (maximum and aver¡
          age values are there anyway).

     --png-use-smallfont
          Use  a  smaller  font  in  the image for labels and
          scales.

     --png-width N
          Set the image width to N pixels.

EXAMPLES
     To display a summary of accounting data for last month:

     % ipacsum --timeframe "last month"

     To display a summary of  accounting  data  since  midnight
     with a graph with one line per hour:

     % ipacsum --timeframe today --graph

     To  display  a summary of accounting data for the last ten
     days with a graph with one line for each day, and only for
     rules containing "isili":

     %  ipacsum  --starttime 10D --graph --interval 1D --filter
     isili

     To summarize all accounting data of 1997 into one file for
     the whole year without displaying anything:

     %   ipacsum   --starttime  1997  --endtime  19971231235959
     --replace >/dev/null

     or, if we are in 1998:

     % ipacsum --timeframe "last year" --replace >/dev/null

     To create png graph images of all rules for the last month
     in  the  directory  /tmp,  including  a  html  file called
     "index.html" to display them all at once in a web browser:

     % ipacsum --timeframe "last month" --png /tmp --png-index

(Dit is van de ipacsum van ipac-ng, ik weet niet zeker of de 'normale' ipac dit ook doet)

Sometimes you just have to sit back, relax, and let the train wreck itself


  • Mark
  • Registratie: Juni 1999
  • Laatst online: 08-08 09:24
Nog mooier is het om phpIpacStats. Hier zit een patch in welke ipacsum patched zodat je via je browser nog vele mooiere grafiekjes kunt maken ;)

Verwijderd

Topicstarter
Aha, jij was t idd :D Bedankt voor dit!

Ik heb idd ipac-ng geinstalled, zometeen maar ff kloten met die graphs :D

Verwijderd

Topicstarter
Ok het werkt :) (vooral die phpipacstats is mooi ;) ) Toppie! :)
Pagina: 1