{"id":15878993,"url":"https://github.com/darkwizard242/system-info","last_synced_at":"2025-04-01T23:44:27.810Z","repository":{"id":104869739,"uuid":"142774218","full_name":"darkwizard242/system-info","owner":"darkwizard242","description":"Cross-platform scripts developed in Python3 for fetching and providing runtime CPU, RAM, PIDs, OS and system information.","archived":false,"fork":false,"pushed_at":"2019-09-28T08:01:58.000Z","size":81,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T15:33:13.935Z","etag":null,"topics":["architecture-components","os","platform-infrastructure","process-monitor","process-tree","python-library","python3","ram-info","ram-monitoring","ram-usage","system-information","ubuntu","windows"],"latest_commit_sha":null,"homepage":"https://darkwizard242.github.io/system-info/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkwizard242.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2018-07-29T15:51:12.000Z","updated_at":"2022-09-20T19:54:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0588d25-9b4f-44b4-bdf6-98dc7f460c7f","html_url":"https://github.com/darkwizard242/system-info","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fsystem-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fsystem-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fsystem-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkwizard242%2Fsystem-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkwizard242","download_url":"https://codeload.github.com/darkwizard242/system-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246730260,"owners_count":20824396,"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":["architecture-components","os","platform-infrastructure","process-monitor","process-tree","python-library","python3","ram-info","ram-monitoring","ram-usage","system-information","ubuntu","windows"],"created_at":"2024-10-06T02:42:42.449Z","updated_at":"2025-04-01T23:44:27.778Z","avatar_url":"https://github.com/darkwizard242.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# system-info\n\n[![](https://github.com/darkwizard242/system-info/workflows/build-and-verify/badge.svg)](https://github.com/darkwizard242/system-info/actions)\n\n# 1\\. INTRODUCTION:\n\nCross-platform scripts developed in Python3 for fetching and providing runtime CPU, RAM, PIDs, OS and system information.\n\n## 1.1 Audience:\n\nQuite simply, everyone. From a student to a system engineer, from a software developer to an IT enthusiast. It's developed with the thought to be easily used by anyone :wink: .\n\n# 2\\. Pre-requisites:\n\n2.1\\. **Python3**\n\n```\n* Python 3 is easily available for free to download, install and use on windows \u0026 *nix platforms. If you do not have Python 3 installed on your machine where you require the use or execution of these scripts, please feel free to use the following methods:\n```\n\n- **Windows**: [Python3.7.0](https://www.python.org/downloads/release/python-370/) is the latest major Python release that can easily be downloaded and installed. _Note:_ Python 3.7.0 was the major release at the point of this development. Feel free to use a newer 3.x Python version if you desire.\n\n- **Ubuntu LTS OS's**: Pre-installed on Ubuntu LTS OS's i.e. 16.04 xenial \u0026 18.04 bionic.\n\n2.2\\. **`psutil`** library\n\n- **Windows**: You can easily install psutil library using command prompt i.e. cmd. Just open cmd, and type in `python -m pip --user -r install psutil` .\n\n- **Ubuntu LTS OS's**: Just run the [install_pre-reqs.bash](https://github.com/Tech-Overlord/system-info/blob/master/pre-reqs/install_pre-reqs.bash) script and it will take care of that for you.\n\n- **Note:** [psutil](https://github.com/giampaolo/psutil) library was developed by [Giampaolo Rodola](https://github.com/giampaolo). It is a cross platform library for system level information. Kudos to Giampaolo !!!\n\n# 3\\. Tested on:\n\n1. Windows Operating Systems (i.e. 7, 8, 8.x \u0026 10). Works on Windows Server editions too.\n\n2. Ubuntu 16.04 \u0026 Ubuntu 18.04\n\n# 4\\. Usage:\n\nUtilizing the library is pretty simple. All you need to do is execute the `main_system.py` file. Assuming that you have already downloaded either the zip/tar or cloned the project already. Following two sections will cover the execution process.\n\n- #### Windows:\n\n  1. Either [Download](https://github.com/Tech-Overlord/system-info/releases/download/v1.0.1/system-info-1.0.1.zip) or clone using `git clone https://github.com/Tech-Overlord/system-info`\n  2. Open a `cmd` window.\n  3. Perform `cd` into the directory where the extracted archive or project is cloned in. For instance, if you have extracted or cloned into D:\\ drive. Do `cd D:\\system-info`\n  4. Now, change directory into the `sysinfo` package i.e. `cd sysinfo`\n  5. Current directory should be: **D:\\system-info\\sysinfo**\n  6. Execute `main_system.py` with the following commands: `python main_system.py`\n  7. All done. That will print a detailed output as can be seen below:\n\n    ```batch\n    D:\\system-info\\sysinfo\u003epython main_system.py\n\n    System \u0026 OS level details below:\n\n    OS Type: Windows\n    OS Release version: 10\n    Processor Name: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel\n    Machine Name on Network is: DESKTOP-MS0CV80\n    Machine Type is: AMD64\n    System platform type is: win32\n\n    RAM details below:\n\n    Total memory is: 8481.492992 MBs\n    Current available memory is: 1897.357312 MBs\n    Current used memory is: 6584.13568 MBs\n    Percentage of RAM being utilized currently: 77.6%\n\n    Current process details below:\n    {'pid': 0, 'name': 'System Idle Process', 'username': 'NT AUTHORITY\\\\SYSTEM'}\n    {'pid': 4, 'name': 'System', 'username': 'NT AUTHORITY\\\\SYSTEM'}\n    {'pid': 96, 'name': 'Registry', 'username': None}\n    {'pid': 3268, 'name': 'SkypeHost.exe', 'username': 'DESKTOP-MS0CV80\\\\User'}\n    {'pid': 3600, 'name': 'vmware-authd.exe', 'username': None}\n    {'pid': 3672, 'name': 'svchost.exe', 'username': None}\n    {'pid': 3688, 'name': 'RuntimeBroker.exe', 'username': 'DESKTOP-MS0CV80\\\\User'}\n    {'pid': 3804, 'name': 'chrome.exe', 'username': 'DESKTOP-MS0CV80\\\\User'}\n    {'pid': 3872, 'name': 'valWBFPolicyService.exe', 'username': None}\n    {'pid': 3888, 'name': 'vmware-usbarbitrator64.exe', 'username': None}\n    {'pid': 4208, 'name': 'MsMpEng.exe', 'username': None}\n    {'pid': 8884, 'name': 'vmware-tray.exe', 'username': 'DESKTOP-MS0CV80\\\\User'}\n\n    D:\\system-info\\sysinfo\u003e\n    ```\n\n- #### Ubuntu:\n\n  1. Change to user's home directory, for e.g. by entering the following command: `cd ~`\n  2. Either Download using `wget https://github.com/Tech-Overlord/system-info/releases/download/v1.0.1/system-info-1.0.1.tar.gz` or clone using `git clone https://github.com/Tech-Overlord/system-info`\n\n    - If cloned, simply change into the root directory of the cloned project and then into the sysinfo folder, for e.g. `cd ~/system-info/sysinfo/`\n\n      - Do `chmod +x *`\n\n    - If tar was downloaded using `wget`. Extract it using the commands: `tar -zxf system-info-1.0.1.tar.gz` and then cd into extracted directory right down to _sysinfo_ package, for e.g. if the extracted directory is system-info-1.0.0, then do `cd system-info-1.0.1/sysinfo`\n\n      - Do `chmod +x *`. This will ensure that the scripts have **execute** permissions.\n\n  3. Execute **main_system.py** file with the command: `python3 main_system.py`\n\n  4. This will print a detailed output as shown below:\n\n    ```shell\n    vagrant@ubuntu:/vagrant/sysinfo$ python3 main_system.py\n\n    System \u0026 OS level details below:\n\n    OS Type: Linux\n    OS Release version: 4.4.0-131-generic\n    Processor Name: x86_64\n    Machine Name on Network is: ubuntu\n    Machine Type is: x86_64\n    System platform type is: linux\n\n    RAM details below:\n\n    Total memory is: 1040.22016 MBs\n    Current available memory is: 667.090944 MBs\n    Current used memory is: 117.047296 MBs\n    Percentage of RAM being utilized currently: 25.2%\n\n    Current process details below:\n\n    {'pid': 1, 'name': 'systemd', 'username': 'root'}\n    {'pid': 2, 'name': 'kthreadd', 'username': 'root'}\n    {'pid': 3, 'name': 'ksoftirqd/0', 'username': 'root'}\n    {'pid': 4, 'name': 'kworker/0:0', 'username': 'root'}\n    {'pid': 5, 'name': 'kworker/0:0H', 'username': 'root'}\n    {'pid': 6, 'name': 'kworker/u4:0', 'username': 'root'}\n    {'pid': 7, 'name': 'rcu_sched', 'username': 'root'}\n    {'pid': 8, 'name': 'rcu_bh', 'username': 'root'}\n    {'pid': 9, 'name': 'migration/0', 'username': 'root'}\n    {'pid': 10, 'name': 'watchdog/0', 'username': 'root'}\n    {'pid': 11, 'name': 'watchdog/1', 'username': 'root'}\n    {'pid': 12, 'name': 'migration/1', 'username': 'root'}\n    {'pid': 13, 'name': 'ksoftirqd/1', 'username': 'root'}\n    {'pid': 14, 'name': 'kworker/1:0', 'username': 'root'}\n    {'pid': 15, 'name': 'kworker/1:0H', 'username': 'root'}\n    {'pid': 16, 'name': 'kdevtmpfs', 'username': 'root'}\n    {'pid': 17, 'name': 'netns', 'username': 'root'}\n    {'pid': 18, 'name': 'perf', 'username': 'root'}\n    {'pid': 19, 'name': 'khungtaskd', 'username': 'root'}\n    {'pid': 20, 'name': 'writeback', 'username': 'root'}\n    {'pid': 21, 'name': 'ksmd', 'username': 'root'}\n    {'pid': 22, 'name': 'khugepaged', 'username': 'root'}\n    {'pid': 23, 'name': 'crypto', 'username': 'root'}\n    {'pid': 24, 'name': 'kintegrityd', 'username': 'root'}\n    {'pid': 25, 'name': 'bioset', 'username': 'root'}\n    {'pid': 26, 'name': 'kblockd', 'username': 'root'}\n    {'pid': 27, 'name': 'ata_sff', 'username': 'root'}\n    {'pid': 28, 'name': 'md', 'username': 'root'}\n    {'pid': 29, 'name': 'devfreq_wq', 'username': 'root'}\n    {'pid': 30, 'name': 'kworker/u4:1', 'username': 'root'}\n    {'pid': 31, 'name': 'kworker/0:1', 'username': 'root'}\n    {'pid': 32, 'name': 'kworker/1:1', 'username': 'root'}\n    {'pid': 34, 'name': 'kswapd0', 'username': 'root'}\n    {'pid': 35, 'name': 'vmstat', 'username': 'root'}\n    {'pid': 36, 'name': 'fsnotify_mark', 'username': 'root'}\n    {'pid': 37, 'name': 'ecryptfs-kthrea', 'username': 'root'}\n    {'pid': 53, 'name': 'kthrotld', 'username': 'root'}\n    {'pid': 54, 'name': 'acpi_thermal_pm', 'username': 'root'}\n    {'pid': 55, 'name': 'kworker/u4:2', 'username': 'root'}\n    {'pid': 56, 'name': 'bioset', 'username': 'root'}\n    {'pid': 57, 'name': 'bioset', 'username': 'root'}\n    {'pid': 58, 'name': 'bioset', 'username': 'root'}\n    {'pid': 59, 'name': 'bioset', 'username': 'root'}\n    {'pid': 60, 'name': 'bioset', 'username': 'root'}\n    {'pid': 61, 'name': 'bioset', 'username': 'root'}\n    {'pid': 62, 'name': 'bioset', 'username': 'root'}\n    {'pid': 63, 'name': 'bioset', 'username': 'root'}\n    {'pid': 64, 'name': 'scsi_eh_0', 'username': 'root'}\n    {'pid': 65, 'name': 'scsi_tmf_0', 'username': 'root'}\n    {'pid': 66, 'name': 'scsi_eh_1', 'username': 'root'}\n    {'pid': 67, 'name': 'scsi_tmf_1', 'username': 'root'}\n    {'pid': 68, 'name': 'kworker/u4:3', 'username': 'root'}\n    {'pid': 72, 'name': 'ipv6_addrconf', 'username': 'root'}\n    {'pid': 85, 'name': 'deferwq', 'username': 'root'}\n    {'pid': 86, 'name': 'charger_manager', 'username': 'root'}\n    {'pid': 125, 'name': 'kpsmoused', 'username': 'root'}\n    {'pid': 126, 'name': 'kworker/1:2', 'username': 'root'}\n    {'pid': 152, 'name': 'mpt_poll_0', 'username': 'root'}\n    {'pid': 153, 'name': 'mpt/0', 'username': 'root'}\n    {'pid': 154, 'name': 'scsi_eh_2', 'username': 'root'}\n    {'pid': 155, 'name': 'scsi_tmf_2', 'username': 'root'}\n    {'pid': 156, 'name': 'bioset', 'username': 'root'}\n    {'pid': 157, 'name': 'bioset', 'username': 'root'}\n    {'pid': 186, 'name': 'kworker/u4:4', 'username': 'root'}\n    {'pid': 259, 'name': 'raid5wq', 'username': 'root'}\n    {'pid': 285, 'name': 'bioset', 'username': 'root'}\n    {'pid': 315, 'name': 'jbd2/sda1-8', 'username': 'root'}\n    {'pid': 316, 'name': 'ext4-rsv-conver', 'username': 'root'}\n    {'pid': 372, 'name': 'kworker/1:1H', 'username': 'root'}\n    {'pid': 374, 'name': 'kworker/0:2', 'username': 'root'}\n    {'pid': 377, 'name': 'kworker/0:1H', 'username': 'root'}\n    {'pid': 381, 'name': 'kworker/0:3', 'username': 'root'}\n    {'pid': 383, 'name': 'kworker/0:4', 'username': 'root'}\n    {'pid': 395, 'name': 'iscsi_eh', 'username': 'root'}\n    {'pid': 401, 'name': 'systemd-journald', 'username': 'root'}\n    {'pid': 404, 'name': 'ib_addr', 'username': 'root'}\n    {'pid': 407, 'name': 'ib_mcast', 'username': 'root'}\n    {'pid': 408, 'name': 'ib_nl_sa_wq', 'username': 'root'}\n    {'pid': 409, 'name': 'ib_cm', 'username': 'root'}\n    {'pid': 412, 'name': 'iw_cm_wq', 'username': 'root'}\n    {'pid': 413, 'name': 'rdma_cm', 'username': 'root'}\n    {'pid': 416, 'name': 'kauditd', 'username': 'root'}\n    {'pid': 429, 'name': 'lvmetad', 'username': 'root'}\n    {'pid': 463, 'name': 'systemd-udevd', 'username': 'root'}\n    {'pid': 490, 'name': 'kworker/1:3', 'username': 'root'}\n    {'pid': 550, 'name': 'iprt-VBoxWQueue', 'username': 'root'}\n    {'pid': 982, 'name': 'dhclient', 'username': 'root'}\n    {'pid': 1123, 'name': 'iscsid', 'username': 'root'}\n    {'pid': 1124, 'name': 'iscsid', 'username': 'root'}\n    {'pid': 1128, 'name': 'dbus-daemon', 'username': 'messagebus'}\n    {'pid': 1130, 'name': 'atd', 'username': 'root'}\n    {'pid': 1132, 'name': 'cron', 'username': 'root'}\n    {'pid': 1134, 'name': 'systemd-logind', 'username': 'root'}\n    {'pid': 1138, 'name': 'acpid', 'username': 'root'}\n    {'pid': 1145, 'name': 'lxcfs', 'username': 'root'}\n    {'pid': 1147, 'name': 'rsyslogd', 'username': 'syslog'}\n    {'pid': 1158, 'name': 'dockerd', 'username': 'root'}\n    {'pid': 1160, 'name': 'accounts-daemon', 'username': 'root'}\n    {'pid': 1167, 'name': 'snapd', 'username': 'root'}\n    {'pid': 1170, 'name': 'sshd', 'username': 'root'}\n    {'pid': 1242, 'name': 'mdadm', 'username': 'root'}\n    {'pid': 1252, 'name': 'agetty', 'username': 'root'}\n    {'pid': 1253, 'name': 'agetty', 'username': 'root'}\n    {'pid': 1262, 'name': 'irqbalance', 'username': 'root'}\n    {'pid': 1278, 'name': 'VBoxService', 'username': 'root'}\n    {'pid': 1287, 'name': 'polkitd', 'username': 'root'}\n    {'pid': 1300, 'name': 'systemd', 'username': 'vagrant'}\n    {'pid': 1304, 'name': '(sd-pam)', 'username': 'vagrant'}\n    {'pid': 1544, 'name': 'dhclient', 'username': 'root'}\n    {'pid': 1584, 'name': 'docker-containerd', 'username': 'root'}\n    {'pid': 1982, 'name': 'sshd', 'username': 'root'}\n    {'pid': 2013, 'name': 'sshd', 'username': 'vagrant'}\n    {'pid': 2014, 'name': 'bash', 'username': 'vagrant'}\n    {'pid': 2046, 'name': 'python3', 'username': 'vagrant'}\n    ```\n\n## 4.1 Data Measurement Unit\n\nData measurement units can be classified into the following:\n\n1. Bit - It is the smallest unit of computer data measurement. Only has the value of _0_ or _1_, which correspond to electronic values of _on_ or _off_.\n2. Byte - Contains 8 bits and enough information to form and store at least a single ASCII character, for e.g. 'a'.\n3. KiloByte - Contains about 1024 Bytes.\n4. MegaBytes - Contains about 1024 KiloBytes.\n5. GigaBytes - Contains about 1024 MegaBytes.\n\nThere are larger units of data measurement as well. Feel free to google and read about them. For now, I have only mentioned a few units used in this project.\n\nData Measurement unit(s) |     Bytes\n------------------------ | :------------:\nKiloByte (KB)            |   1024 Bytes\nMegaByte (MB)            | 1024 KiloBytes\nGigaByte (GB)            | 1024 MegaBytes\n\n`main_system.py` currently will output everything using 'MB' as a data unit. However, you can eaily modify it to any of the below mentioned data measurement units. To do so, follow the following steps:\n\n1. Open 'main_system.py' into any editor of your choice. It contains the following code:\n\n```python\n\n# ! /usr/bin/env python3\n\nimport ram_kb\nimport ram_mb\nimport ram_gb\nimport sys_sw_hw_info\nimport variables_data\nimport pid_info\n\n# Assigning a variable for the purpose of specifying which data measurement function is to be used.\ndata_measure = variables_data.megabyte\n\n# Printing system, os, architecture level information using the function system_details in sys_sw_hw_info module.\nprint('\\nSystem \u0026 OS level details below:\\n')\nsys_sw_hw_info.system_details()\nprint()\n\n# Printing IP address using the ip_addr function within the ip_address module.\n# ip_address.ip_addr()\n# print()\n\n# Printing RAM details by using if/else statements so that the data measurement is in accordance to value of\n# data_measure variable\nprint('RAM details below: ')\n\nif data_measure == variables_data.kilobyte:\n    ram_kb.ram_specs()\nelif data_measure == variables_data.megabyte:\n    ram_mb.ram_specs()\nelif data_measure == variables_data.gigabyte:\n    ram_gb.ram_specs()\nelse:\n    print('Data Variable messed up! please check the code.')\n\n# Listing all of the current processes using process_info function in pid_info module.\nprint('\\nCurrent process details below: \\n')\npid_info.processes_info()\n```\n\n1. To modify the data unit type, change the value of variable `data_measure` at _line 12_. For example, if you want to switch it to gigabyte, then modify from `data_measure = variables_data.megabyte` to `data_measure = variables_data.gigabyte`.\n\n2. That's all! Just run main_system.py again and you should see the data measurement unit related output in gigabyte. Feel free to change data measurement units to your desire.\n\n**Note:** Data measurement types have been defined in [variables_data.py](https://github.com/Tech-Overlord/system-info/blob/master/sysinfo/variables_data.py).\n\n# 5\\. Releases\n\nListed from latest to oldest.\n\n- [v1.0.1](https://github.com/Tech-Overlord/system-info/releases/tag/v1.0.1)\n- [v1.0.0](https://github.com/Tech-Overlord/system-info/releases/tag/v1.0.0)\n\n# 6\\. License\n\nRead [License](https://github.com/Tech-Overlord/system-info/blob/master/LICENSE).\n\n## 7\\. Contact Author:\n\nFeel free to contact or connect with the author on any of the following:\n\n- [LinkedIn](https://www.linkedin.com/in/ali-muhammad-759791130/)\n- [GitHub](https://github.com/Tech-Overlord)\n- [Gmail](mailto:am900820@gmail.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkwizard242%2Fsystem-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkwizard242%2Fsystem-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkwizard242%2Fsystem-info/lists"}