Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: Idb47c1ddbedc9f97181b8e9a5eeac04ddd832a2c
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
|
|
Change-Id: Ib5957e7ee3a9315ee86a331189bc3e9e71751ee8
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
|
|
Change-Id: I13526fbf80296a79be15548fc226a308941ac9ec
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
|
|
Change-Id: I174854914d9fd06a813270b57d1f7bc2bac63c6a
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
|
|
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Change-Id: I84a42375b5c59739e4caca1f726699ea7647ef17
|
|
|
|
|
|
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.
|