6. Storing of Statistical Data
This section describes a format for storing of statistical data. The goal is to facilitate for a common set of tools for the gathering, storing and analysis of statistical data. The format is defined with the intention to minimize redundant information and by this minimize required storage. If a client server based model for retrieving remote statistical data is later being developed, the specified storage format should be possible to used as the transmission protocol.
The format is built up by three different sections within the statistical storage, a label section, a device section and a data section. The label section gives the start and end times for a given data section as well as the file where the actual data is stored. The device section specifies what is being logged in the corresponding data section.
To facilitate for multiple data sections within one log-file, label sections, device sections and data sections may occur more than once. Each section type is delimited by a BEGIN-END pair. Label and device sections could either be stored directly in the data-file or as separate files where the corresponding data-file is pointed out by the data-file entry in the label section.
A data section must correspond to exactly one label section and one device section. If more label sections and device sections each data section will belong to the label section and device section immediately prepending the data section if these sections are stored within the data-file. How files are physically arranged is outside the scope of the document.
6.1. The Storage Format
stat-data ::=
FS ::= "," |
The file must start with a label specification followed by a device specification followed by a data section. If the storing of logged data is for some reason interrupted a new label specification should be inserted when the storing is restarted. If the device being logged is changed this should be indicated as a new label and a new device
specification.
It shall here be noted that the actual physical storage of data is a local decision and can vary a lot. There can be one data-file per interface or multiple interfaces logged within the same data-file. Label and device sections may be stored in a separate file as well as within the data-file.
6.1.1. The Label Section
label-section ::= "BEGIN_LABEL"
<start_time> <FS>
<stop_time> <FS>
<data_file> <FS>
"END_LABEL"
start-time ::=
ascii-string ::= same as MIB II definition of
The times defines start and stop times for the related set of logged data. The time is in UTC.
6.1.2. The Device Section
device-section ::= "BEGIN_DEVICE"
<device-field> <FS>
"END_DEVICE"
device-field ::=
<bw-value><FS><bw-sort><FS><proto-type><FS>
<proto-addr><FS><time-zone><FS><tag-table>
[<tag-table>]
networkname ::=
bw-value ::=
[<FS><variable-field>]
tag-class ::= "total" | "peak"
variable-field ::=
<aggregation-period>
tag ::= <ascii-string>
variable-name ::=
initial-polling-period ::=
The network name is a human readable string indicating to which network the logged data belong.
The routername is the fully qualified name relevant for the network architecture where the router is installed.
The linkname is a human readable string indicating the the connectivity of the link where from the logged data is gathered.
The bandwidth should be the numerical value followed by the sort being used. Valid sorts are bps, Kbps, Mbps, Tbps.
The prototype filed describes to which network architecture the interface being logged is connected. Valid types are IP, DECNET, X.25 and CLNP.
The network address is the unique numeric address of the interface being logged. The actual form of this address is dependent of the protocol type as indicated in the proto-type field. For Internet connected interfaces the "three-dot" notation should be used.
The time-zone indicates the timedifference that should be added to the timestamp in the datasection to give the local time for the logged interface.
The tag-table lists all the variables being polled. Variable names are the fully qualified Internet MIB names. The table may contain multiple tags. Each tag must be associated with only one polling and aggregation period. If variables are being polled or aggregated at different periods one separate tag in the table has to be used for each period.
As variables may be polled with different polling periods within the same set of logged data, there is a need to explicitly associate a polling period with each variable. After being processed the actual period covered may have changed as compared to the initial polling period and this should be noted in the aggregation period field. The initial polling period and aggregation period should be given in seconds.
As aggregation also means the computation of the max value for the previously polled data, the aggregation process have to extend the tag table to include these maximum values. This could be done in different ways. The variable field for the aggregated variables is extended to also include the peak values from the previous period. Another possibility is to create new tags for the peak values. To be able to differentiate between polled raw data, aggregated total and aggregated peak values some kind of unique naming of such entities has to be implemented.
6.1.3. The Data Section
data-section ::= "BEGIN_DATA"
<data-field><LF>
"END_DATA"
data-field ::=
<poll-delta><FS><delta-val>
[<FS><delta-val>]
poll-delta ::=
The datafield contains the polled data from a set of variables as defined by the corresponding tag field. Each data field begins with the timestamp for this poll followed by the tag defining the polled variables followed by a polling delta value giving the period of time in seconds since the previous poll. The variable values are stored as delta values for counters and as absolute values for non-counter values such as OperStatus. The timestamp is in UTC and the time-zone field in the device section is used to compute the local time for the device being logged.
6.2. Storage Requirement Estimations
The header sections are not counted in this example. Assuming the the maximum polling intensity is used for all the 12 recommended variables and assuming the size in ascii of each variable is 8 bytes will give the below calculations based on one year of storing and aggregating statistical data.
Assuming that data is saved according to the below scheme
1 minute non-aggregated saved 1 day.
15 minute aggregation period saved 1 week.
1 hour aggregation period saved 1 month.
1 day aggregation period saved 1 year.
this will give:
Size of one entry for each aggregation period:
Aggregation periods
1 min 15 min 1 hour 1 day
Timestamp 14 14 14 14 Tag 5 5 5 5 Poll-Delta 2 3 4 5 Total values 96 96 96 96 Peak values 0 96 192 288 Field separators 14 28 42 56
Total entry size 131 242 353 464
For each day 6024 = 1440 entries with a total size of 1440131 = 187 Kbytes.
For each weak 4247 = 672 entries are stored with a total size of 672*242 = 163 Kbytes
For each month 2430 = 720 entries are stored with a total size of 720353 = 254 Kbytes
For each year 365 entries are stored with a total size of 365*464 = 169 Kbytes.
Grand total estimated storage for during one year = 773 Kbytes.