{"id":13528991,"url":"https://github.com/SpikeHD/gm-sysinfo","last_synced_at":"2025-04-01T14:33:45.596Z","repository":{"id":209765139,"uuid":"724831831","full_name":"SpikeHD/gm-sysinfo","owner":"SpikeHD","description":"Cross-platform GameMaker extension for getting system information and resource usage","archived":false,"fork":false,"pushed_at":"2023-12-12T00:32:02.000Z","size":273,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T07:19:23.042Z","etag":null,"topics":["extension","gamemaker","gamemaker-studio-2"],"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/SpikeHD.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}},"created_at":"2023-11-28T22:07:20.000Z","updated_at":"2025-01-01T17:17:32.000Z","dependencies_parsed_at":"2023-11-29T03:37:16.097Z","dependency_job_id":"caf9b0ff-a462-4c63-8c10-f87d64cfaf6b","html_url":"https://github.com/SpikeHD/gm-sysinfo","commit_stats":null,"previous_names":["spikehd/gm-sysinfo"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fgm-sysinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fgm-sysinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fgm-sysinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpikeHD%2Fgm-sysinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpikeHD","download_url":"https://codeload.github.com/SpikeHD/gm-sysinfo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246655501,"owners_count":20812644,"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":["extension","gamemaker","gamemaker-studio-2"],"created_at":"2024-08-01T07:00:30.685Z","updated_at":"2025-04-01T14:33:43.600Z","avatar_url":"https://github.com/SpikeHD.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eGM Sysinfo\u003c/h1\u003e\n  \u003cp\u003e\n    Cross-platform GameMaker extension for getting system information and resource usage \n  \u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/SpikeHD/gm-sysinfo/build.yml\" /\u003e\n \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/SpikeHD/gm-sysinfo/test.yml?label=tests\" /\u003e\n \u003cimg src=\"https://img.shields.io/github/repo-size/SpikeHD/gm-sysinfo\" /\u003e\n \u003cimg src=\"https://img.shields.io/github/commit-activity/m/SpikeHD/gm-sysinfo\" /\u003e\n\u003c/div\u003e\n\n  \u003cimg width=\"70%\" src=\"https://github.com/SpikeHD/gm-sysinfo/assets/25207995/0d003ce6-447a-410f-8d7f-84b21a702d0b\" /\u003e\n\u003c/div\u003e\n\n\n# Table of Contents\n* [Table of Contents](#table-of-contents)\n* [Examples](#examples)\n  * [Display memory usage](#display-memory-usage)\n  * [Display CPU usage](#display-cpu-usage)\n  * [Get the host/username](#get-the-hostusername)\n  * [Require only the most top-end of GPUs](#require-only-the-most-top-end-of-gpus)\n* [TODO](#todo)\n* [Documentation](#documentation)\n  * [General](#general)\n    * [`sysinfo_init()`](#sysinfo_init)\n    * [`sysinfo_get_username()`](#sysinfo_get_username)\n    * [`sysinfo_get_hostname()`](#sysinfo_get_hostname)\n    * [`sysinfo_get_pid()`](#sysinfo_get_pid)\n  * [CPU](#cpu)\n    * [`sysinfo_get_cpu_usage()`](#sysinfo_get_cpu_usage)\n    * [`sysinfo_get_cpu_brand()`](#sysinfo_get_cpu_brand)\n    * [`sysinfo_get_cpu_cores()`](#sysinfo_get_cpu_cores)\n    * [`sysinfo_get_cpu_frequency()`](#sysinfo_get_cpu_frequency)\n    * [`sysinfo_sys_cpu_usage()`](#sysinfo_sys_cpu_usage)\n    * [`sysinfo_proc_cpu_usage()`](#sysinfo_proc_cpu_usage)\n    * [`sysinfo_get_core_count()`](#sysinfo_get_core_count)\n    * [`sysinfo_get_cpu_vendor_id()`](#sysinfo_get_cpu_vendor_id)\n  * [GPU](#gpu)\n    * [`sysinfo_get_gpu_name()`](#sysinfo_get_gpu_name)\n    * [`sysinfo_get_gpu_vram()`](#sysinfo_get_gpu_vram)\n  * [Memory](#memory)\n    * [`sysinfo_get_memory_max()`](#sysinfo_get_memory_max)\n    * [`sysinfo_sys_memory_used()`](#sysinfo_sys_memory_used)\n    * [`sysinfo_proc_memory_used()`](#sysinfo_proc_memory_used)\n\n# Examples\n\nBelow are some basic examples of the functionality in this extension\n\n## Display memory usage\n```javascript\n// Init\nsysinfo_init();\n\n// Get max memory of the system\nvar max_mem = sysinfo_get_memory_max();\n\n// Get the memory usage of the game\nvar mem = sysinfo_proc_mem_usage();\n\n// Display the cur / max (pct%)\nvar max_mb = max_mem / 1024 / 1024;\nvar mem_mb = mem / 1024 / 1024;\n\ndraw_text(0, 0, string(mem_mb) + \" / \" + string(max_mb) + \" (\" + string(mem / max_mem * 100) + \"%)\");\n```\n\n## Display CPU usage\n```javascript\n// Init\nsysinfo_init();\n\n// Get the CPU and memory usage of the game\nvar cpu_name = sysinfo_get_cpu_brand();\nvar cpu = sysinfo_get_cpu_usage();\n\n// Display the %\ndraw_text(0, 0, cpu_name + \": \" + string(cpu) + \"%\");\n```\n\n## Get the host/username\n```javascript\n// Init\nsysinfo_init();\n\n// Get the host name\nvar host = sysinfo_get_hostname();\nvar user = sysinfo_get_username();\n\n// Display the host name\ndraw_text(0, 0, user + \"@\" + host);\n```\n\n## Require only the most top-end of GPUs\n```javascript\n// Init\nsysinfo_init();\n\n// Get the GPU name\nlet gpu = sysinfo_get_gpu_name();\n\nif (string_pos(\"RTX\", gpu) == 0) {\n  show_message_async(\"Sorry, but your GPU sucks :/\");\n  exit;\n}\n```\n\n# TODO\n\n- [x] CPU usage\n  - [ ] Get usage for a specific core\n- [x] Memory usage\n- [x] System name/hostname\n- [x] GPU info\n  - [ ]  GPU usage\n\n# Documentation\n\n## General\n\n### `sysinfo_init()`\nInitializes the extension. This must be called before any other functions are called.\n\n### `sysinfo_get_username()`\nReturns the username of the current user.\n\n### `sysinfo_get_hostname()`\nReturns the hostname of the system.\n\n### `sysinfo_get_pid()`\nReturns the PID of the game.\n\n## CPU\n\n### `sysinfo_get_cpu_usage()`\nReturns the current CPU usage of the game in percent.\n\n### `sysinfo_get_cpu_brand()`\nReturns the brand name of the CPU.\n\n### `sysinfo_get_cpu_cores()`\nReturns the number of cores the CPU has.\n\n### `sysinfo_get_cpu_frequency()`\nReturns the frequency of the CPU in MHz.\n\n### `sysinfo_sys_cpu_usage()`\nReturns the CPU usage of the system in percent.\n\n### `sysinfo_proc_cpu_usage()`\nReturns the CPU usage of the game in percent.\n\n### `sysinfo_get_core_count()`\nReturns the number of cores the CPU has.\n\n### `sysinfo_get_cpu_vendor_id()`\nReturns the vendor ID of the CPU.\n\n## GPU\n\n### `sysinfo_get_gpu_name()`\nReturns the name of the GPU.\n\n### `sysinfo_get_gpu_vram()`\nReturns the amount of VRAM the GPU has in bytes.\n\n## Memory\n\n### `sysinfo_get_memory_max()`\nReturns the maximum memory of the system in bytes.\n\n### `sysinfo_sys_memory_used()`\nReturns the memory used by the system in bytes.\n\n### `sysinfo_proc_memory_used()`\nReturns the memory used by the game in bytes.\n\n","funding_links":[],"categories":["Native Extensions"],"sub_categories":["Recommendations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpikeHD%2Fgm-sysinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSpikeHD%2Fgm-sysinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpikeHD%2Fgm-sysinfo/lists"}