Age | Commit message (Collapse) | Author | Files | Lines |
|
Make sure all file descriptor are closed.
|
|
|
|
|
|
|
|
Added an informational message when mmap fails with EINVAL in
stats_file_remap.
|
|
Added debugging statements and ensure, following calls to g_free, that
the statistics file name field is set to NULL to ensure that a failed
file mapping and a subsequent call to stats_free doesn't fault when
trying to double-free it.
|
|
Clarify why MAP_SHARED is used instead of the obvious MAP_PRIVATE.
|
|
The error appears when stats_file_remap() fails.
|
|
When the ring buffer (SERVICE_NAME.data file) is full then it
is summarized into a history (SERVICE_NAME.history) file.
The history file has the same format as the data file.
|
|
This avoid doing an hash table lookup from
__connman_stats_service_register() right after inserting the stats_file
pointer into it.
|
|
Instead creating for each service two stats file (home and roaming), just
create one. Each entry in the file is marked with a flag (home or roaming).
The file header contains two additional index which points to the current
home or roaming entry.
Now we have a nice history in the ring buffer.
Additionally this reduces the number of open files by half.
|
|
Instead of opening stats file when a service is created,
defer it to the point where either __connman_ipconfig_enable
or __connman_ipconfig_disable is called.
|
|
In the case stat failes to gather information
about the log file, it has to initialize struct
stat. Otherwise, we will set a random file size.
|
|
Use stat before open the file to find out if the
file already exists. Only if file exists and
the header is invalid trigger connman_error
|
|
|
|
Currently the statistic information is stored into the profile file.
This results in rewriting the whole file if connann_stats_save is
called. This results in too many disk I/Os for low power devices.
Furthermore, only the current value is stored. There is no way to
find out how many bytes have been transfered in the last month.
First, each service statistic is stored into a separate files under
/var/lib/connman having a *.data extension. This file contains fixed
sized records of stats counters and will be mmap into memory. It is
used like a ring buffer.
If the buffer is full or after a certain period (e.g. a month), the
raw data will be summerized into the *.info file.
Currently the summary is not implented yet. This will be implemented
in the next round of patches.
|