{"id":16860712,"url":"https://github.com/qarmin/system-info-collector","last_synced_at":"2025-07-06T17:08:06.643Z","repository":{"id":179611646,"uuid":"663672835","full_name":"qarmin/system-info-collector","owner":"qarmin","description":"App to collect ram/cpu usage from OS and show it in pretty graphs","archived":false,"fork":false,"pushed_at":"2024-12-04T05:13:07.000Z","size":214,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-24T20:12:16.378Z","etag":null,"topics":["data","data-collection","system"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qarmin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"qarmin"}},"created_at":"2023-07-07T21:01:46.000Z","updated_at":"2025-05-01T21:11:00.000Z","dependencies_parsed_at":"2024-04-07T14:25:03.215Z","dependency_job_id":"a494c0f7-8639-4429-92c3-683036bcb676","html_url":"https://github.com/qarmin/system-info-collector","commit_stats":null,"previous_names":["qarmin/system-info-collector"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/qarmin/system-info-collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qarmin%2Fsystem-info-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qarmin%2Fsystem-info-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qarmin%2Fsystem-info-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qarmin%2Fsystem-info-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qarmin","download_url":"https://codeload.github.com/qarmin/system-info-collector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qarmin%2Fsystem-info-collector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263940313,"owners_count":23533012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","data-collection","system"],"created_at":"2024-10-13T14:26:26.807Z","updated_at":"2025-07-06T17:08:06.620Z","avatar_url":"https://github.com/qarmin.png","language":"Rust","funding_links":["https://github.com/sponsors/qarmin"],"categories":[],"sub_categories":[],"readme":"# System info collector\n\nThis is simple app to collect data about system cpu and memory usage over time.\n\nAfter collecting results into csv file, html file can be created with plot.\n\n![Screenshot](https://github.com/qarmin/czkawka/assets/41945903/58371709-996a-41cf-a352-d28addf24ad9)\n\n## Why?\n\nI needed a simple and fast application to collect basic information about the amount of RAM used and CPU consumption on\na slow(4x1Ghz) 32 bit ARM computer which uses custom Linux OS build with Yocto.\n\nI looked at a few applications like grafana, but they are too heavy or work in a client server architecture\nwhich in this case I would prefer to avoid.\n\n## How to use it?\n\nThis is console app, so that means that you need to use terminal to use it.\n\n```\n./system_info_collector -l debug -a collect-and-convert -o\n```\n\nshould once per second print debug message about refreshed CPU and memory usage.\n\nAfter a while you can click `Ctrl+C` once to stop collecting data and wait for automatic preparing and opening prepared\nhtml plot data.\n\nhttps://github.com/qarmin/system-info-collector/assets/41945903/7ac510b5-babf-4d04-9624-34d83b8f1866\n\n## Performance and memory usage\n\nDuring testing on i7-4770, app used stable 15-20MB Ram and most of the time, cpu usage was lower than 0.1%.\n\nSys-info library which I use have quite big overhead(usually few ms) when finding cpu/ram usage for processes due\nopening unnecessary files, so I plan to do some computations manually. So if you want to use as little resources as\npossible, you should use only collect basic os info without any processes(this is default mode).\n\nIn collect mode, app only needs to read cpu/ram usage and then save it to file, so that is why it uses so little\nresources.\n\nConverting csv file to html file is more resource intensive, so should be done on more powerful computer.\n\nResults from testing on i7-4770 250000 samples for memory, cpu total and per core usage - with 1s interval, collecting\nsuch number of samples should take ~3 days(I used smaller interval to mimic real usage):\n\nExample of first lines of csv file:\n\n```\nINTERVAL_SECONDS=1,CPU_CORE_COUNT=8,MEMORY_TOTAL=23943.89,SWAP_TOTAL=2048.00,UNIX_TIMESTAMP_START_TIME=1690142980.2999594,APP_VERSION=0.4.0,CUSTOM_0=FIREFOX\nSECONDS_SINCE_START,MEMORY_USED,SWAP_USED,CPU_USAGE_TOTAL,CUSTOM_0_CPU,CUSTOM_0_MEMORY\n0.24,11031.20,0.00,49.66,0.00,1111.25\n1.24,11037.60,0.00,16.75,2.11,1111.25\n2.24,11039.49,0.00,19.14,3.55,1110.93\n3.24,11040.23,0.00,13.27,2.17,1110.93\n4.24,11047.52,0.00,16.32,4.65,1111.61\n```\n\n- CSV file size: 19.55 MiB\n- Loading and parsing csv file: 407 ms\n- HTML file size: 129 MiB (new versions use simple regex minimizer, so size should be ~30% smaller)\n- Creating html file: 1.68 s\n\n## Example commands\n\nCollect used memory and cpu usage in interval of 1 second and save it to system_data.csv file\n\n```\n./system_info_collector\n```\n\nCollect and convert csv data and automatically open html file in browser, additionally will show more detailed logs\n\n```\n./system_info_collector -l debug -a collect-and-convert -o\n```\n\nConvert csv data file into html document with plot and open it in browser\n\n```\n./system_info_collector -a convert -d /home/user/data.csv -p /home/user/plot.html -o\n```\n\nCollect all basic data with interval of 0.2 seconds\n\n```\n./system_info_collector -l debug -a collect-and-convert -o -m memory-used -m memory-free -m memory-available -m cpu-usage-total -m cpu-usage-per-core -c 0.2\n```\n\nCollect memory and cpu usage of selected processes - will try to find process with command containing `firefox` in\nname - `FIREFOX` name will be used later in plot.\n\nApp can only track 1 process with certain name at once, so if two or more processes contains `firefox` in name, only\ninfo about first will be collected\n\n```\n./system_info_collector -e \"FIREFOX|firefox\" -e \"Event Handler|/usr/bin/event_handler --timeout\"\n```\n\nShows help about available arguments\n\n```\n./system_info_collector --help\n```\n\n## Running app when OS starts(Linux)\n\nSimple way to collect OS data from start, is to create simple systemd service.\n\nTo do this, copy app into `/usr/bin` folder and create folder for collected data\n\n```\nsudo cp system_info_collector /usr/bin/system_info_collector\nsudo mkdir -p /opt/system_info_collector/ # To collect reports\n```\n\ncreating service content\n\n```\nsudo touch /etc/systemd/system/system-info-collector.service\nsudo gedit /etc/systemd/system/system-info-collector.service # open it with any text editor - I used gedit\n```\n\npaste this code with modified arguments:\n\n```\n[Unit]\nDescription=System Data Collector\n\n[Service]\nExecStart=/usr/bin/system_info_collector -d /opt/system_info_collector/data.csv\n\n[Install]\nWantedBy=default.target\n```\n\nnow start service\n\n```\nsudo systemctl daemon-reload\nsudo systemctl start system-info-collector\nsudo systemctl status system-info-collector # This should print \"active (running)\" if everything works fine, if there is failure, check log to see what happened\nsudo systemctl enable system-info-collector # To enable running service when OS starts\n```\n\nnow you can convert collected data with simple command\n\n```\nsystem_info_collector -a convert -d /opt/system_info_collector/data.csv -p /tmp/plot.html -o\n```\n\n## CPU/Memory/Swap results\n\nCpu usage is shown in range between 0 and 100%, if computer have more than 1 core, cpu usage is divided by number of\ncores, to get value in proper range.\n\nMemory and swap usage are shown in MiB, with range from 0 to total memory/swap size.\n\nWhen checking for processes -1 is visible both in cpu/memory plot if searched process is not found.\n\n## Data file compatibility\n\nCompatibility between different versions of app is not guaranteed, so if you want to collect create graphs from csv\nfile, be sure that you use the same version of app(csv file contains inside info which version of app was used).\n\nUsually incompatibilities are quite easy to workaround by manually adding/removing records from csv file.\n\n## OS Support\n\nCurrently, fully supported is only Linux, due using manually reading `/proc` files(performance reasons).\n\nApp should also fully work on Mac, but on Windows capturing process cpu/memory usage is not supported(except that,\neverything should work fine).\n\n## License\n\nMIT License\n\nCopyright (c) 2023 Rafał Mikrut and contributors","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqarmin%2Fsystem-info-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqarmin%2Fsystem-info-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqarmin%2Fsystem-info-collector/lists"}