Commit 2f726fab authored by Jérome Perrin's avatar Jérome Perrin

collect: disable FolderSizeSnapshot for now

`FolderSizeSnapshot` is too slow and cause some "Database is locked" errors when running software instance tests.

See merge request !206
parents 3160c589 b03a7e8a
......@@ -21,7 +21,7 @@ Collect command search for all process launched by all users related to the
slapos [1]. After this, for each process it uses psutil (or similars tools) to
collect all available information for every process pid [2].
Once Collected, every Process information is stored on sqllite3 [3], in other
Once Collected, every Process information is stored on sqlite3 [3], in other
words, we have 1 line per pid for a giving time. It's used pid number and
process creation date for create a UID for the process, and it is omitted the
command name in order to annonymalize the data (so the risk of information
......@@ -46,15 +46,15 @@ We use 3 types of snapshots for determinate the load and the available resources
- Computer Snapshot [6]: It collects for now number of CPU cores and available
memory, however we wish to collect more details.
- Disk Snapshot [7]: It collects the informations related to the a disk
- Disk Snapshot [7]: It collects information related to the a disk
(1 snapshot per disk), which contains total, usage and
io informations.
io information.
"Real-time" Partial dump (Dygraph)
===================================
On every run, we dump data from the current day on csv [8] (2 axes), in order to
On every run, we dump data from the current day on csv (2 axes), in order to
plot easily with dygraph, so there will be few files available like this:
- system_cpu_percent.csv
......@@ -91,7 +91,7 @@ Data Structure
The header of the CSVs are not included on the dumped file (it is probably a
mistake), but it corresponds to (same as columns on the sqllite) which can be
easily described like bellow [11]:
easily described like below [11]:
- user
partition (text)
......
......@@ -38,14 +38,14 @@ def get_user_list(config):
instance_root = config.get("slapos", "instance_root")
# By default, enable disk snapshot,
# and set time_cycle to 24hours after the first disk snapshot run
disk_snapshot_params = {'enable': True, 'time_cycle': 86400}
disk_snapshot_params = {'enable': False, 'time_cycle': 86400}
if config.has_section('collect'):
collect_section = dict(config.items("collect"))
disk_snapshot_params = dict(
enable=eval(collect_section.get("report_disk_usage", "True")),
enable=collect_section.get("report_disk_usage", "False").lower() in ('true', 'on', '1'),
pid_folder=collect_section.get("disk_snapshot_process_pid_foder", None),
time_cycle=int(collect_section.get("disk_snapshot_time_cycle", 86400)),
use_quota=eval(collect_section.get("disk_snapshot_use_quota", "True"))
use_quota=collect_section.get("disk_snapshot_use_quota", "True").lower() in ('true', 'on', '1'),
)
user_dict = {name: User(name, path, disk_snapshot_params)
for name, path in [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment