Cross-platform GameMaker extension for getting system information and resource usage

Overview

GM Sysinfo

Cross-platform GameMaker extension for getting system information and resource usage

Table of Contents

Examples

Below are some basic examples of the functionality in this extension

Display memory usage

// Init
sysinfo_init();

// Get max memory of the system
var max_mem = sysinfo_get_memory_max();

// Get the memory usage of the game
var mem = sysinfo_proc_mem_usage();

// Display the cur / max (pct%)
var max_mb = max_mem / 1024 / 1024;
var mem_mb = mem / 1024 / 1024;

draw_text(0, 0, string(mem_mb) + " / " + string(max_mb) + " (" + string(mem / max_mem * 100) + "%)");

Display CPU usage

// Init
sysinfo_init();

// Get the CPU and memory usage of the game
var cpu_name = sysinfo_get_cpu_brand();
var cpu = sysinfo_get_cpu_usage();

// Display the %
draw_text(0, 0, cpu_name + ": " + string(cpu) + "%");

Get the host/username

// Init
sysinfo_init();

// Get the host name
var host = sysinfo_get_hostname();
var user = sysinfo_get_username();

// Display the host name
draw_text(0, 0, user + "@" + host);

Require only the most top-end of GPUs

// Init
sysinfo_init();

// Get the GPU name
let gpu = sysinfo_get_gpu_name();

if (string_pos("RTX", gpu) == 0) {
  show_message_async("Sorry, but your GPU sucks :/");
  exit;
}

TODO

  • CPU usage
    • Get usage for a specific core
  • Memory usage
  • System name/hostname
  • GPU info
    • GPU usage

Documentation

General

sysinfo_init()

Initializes the extension. This must be called before any other functions are called.

sysinfo_get_username()

Returns the username of the current user.

sysinfo_get_hostname()

Returns the hostname of the system.

sysinfo_get_pid()

Returns the PID of the game.

CPU

sysinfo_get_cpu_usage()

Returns the current CPU usage of the game in percent.

sysinfo_get_cpu_brand()

Returns the brand name of the CPU.

sysinfo_get_cpu_cores()

Returns the number of cores the CPU has.

sysinfo_get_cpu_frequency()

Returns the frequency of the CPU in MHz.

sysinfo_sys_cpu_usage()

Returns the CPU usage of the system in percent.

sysinfo_proc_cpu_usage()

Returns the CPU usage of the game in percent.

sysinfo_get_core_count()

Returns the number of cores the CPU has.

sysinfo_get_cpu_vendor_id()

Returns the vendor ID of the CPU.

GPU

sysinfo_get_gpu_name()

Returns the name of the GPU.

sysinfo_get_gpu_vram()

Returns the amount of VRAM the GPU has in bytes.

Memory

sysinfo_get_memory_max()

Returns the maximum memory of the system in bytes.

sysinfo_sys_memory_used()

Returns the memory used by the system in bytes.

sysinfo_proc_memory_used()

Returns the memory used by the game in bytes.

You might also like...
Macchina - A system information frontend, with an (unhealthy) emphasis on performance.
Macchina - A system information frontend, with an (unhealthy) emphasis on performance.

macchina Fast, minimal and customizable system information frontend. Linux • macOS • Windows • NetBSD • FreeBSD • OpenWrt • Android About macchina let

 skyfetch ☁️  a system information fetch written in rust
skyfetch ☁️ a system information fetch written in rust

skyfetch ☁️ a system information fetch written in rust requirements cargo install with curl

Command-line System Information Tool
Command-line System Information Tool

A blazingly fast system fetch program to pair with onefetch View the complete ascii art collection at punfetch.dev Installation Install from crates.io

A resource monitor in your browser, in Rust
A resource monitor in your browser, in Rust

axact A resource monitor in your browser, so you can view the state of a VM or some other remote host. Built with Rust & Preact, see the video: https:

Calculate a player's skill level using Elo, DWZ, Ingo, TrueSkill, Glicko and Glicko-2 algorithms known from their usage in chess and online games.

skillratings Skillratings allows you to calculate the player's skill instantly in 1v1 matches or after tournaments/rating periods with a list of resul

Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage
Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage

Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage

A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!
A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!

Quickiller There are always programs such as chrome that keep eating up your resources even when closed! The only way to prevent this is to kill all o

App to collect ram/cpu usage from OS and show it in pretty graphs
App to collect ram/cpu usage from OS and show it in pretty graphs

System info collector This is simple app to collect data about system cpu and memory usage over time. After collecting results into csv file, html fil

Cross-platform Rust library for coloring and formatting terminal output
Cross-platform Rust library for coloring and formatting terminal output

Coloring terminal output Documentation term-painter is a cross-platform (i.e. also non-ANSI terminals) Rust library for coloring and formatting termin

Comments
  • Better GPU handling

    Better GPU handling

    Moves GPU related functionality to more bare-metal implementations. Specifically (as of right now):

    • Metal (Apple)
    • Vulkan (via Vulkano, Windows and Linux)

    Also now is able to return GPU name and VRAM

    opened by SpikeHD 0
Owner
SpikeHD
College student
SpikeHD
dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory

dua (-> Disk Usage Analyzer) is a tool to conveniently learn about the usage of disk space of a given directory. It's parallel by default and will max

Sebastian Thiel 1.8k Jan 2, 2023
Rust-battery - Rust crate providing cross-platform information about the notebook batteries.

battery Rust crate providing cross-platform information about the notebook batteries. Table of contents Overview Supported platforms Install Examples

svartalf 326 Dec 21, 2022
A cross-platform library for retrieving information about connected devices.

Devices devices is a cross-platform library for retrieving information about connected devices. Combined with a library like sysinfo, a more or less c

Hank Jordan 4 Jan 8, 2023
⚡ An extremely fast cross-compatible system information tool.

Lightfetch A extremely fast command-line system information tool written in Rust ⚡ . Gallery Sadly there isn't much to showcase right now. Download Av

bwtecode 2 Sep 12, 2022
⚡ An extremely fast cross-compatible system information tool.

Lightfetch A extremely fast command-line system information tool written in Rust ⚡ . Gallery Sadly there isn't much to showcase right now. Download Av

bwtecode 2 Sep 12, 2022
A cross-platform graphical process/system monitor with a customizable interface and a multitude of features

A cross-platform graphical process/system monitor with a customizable interface and a multitude of features. Supports Linux, macOS, and Windows. Inspired by both gtop and gotop.

Clement Tsang 5.8k Jan 8, 2023
A simple and efficient terminal UI implementation with ratatui.rs for getting quick insights from csv files right on the terminal

CSV-GREP csv-grep is an intuitive TUI application writting with ratatui.rs for reading, viewing and quickly analysing csv files right on the terminal.

Anthony Ezeabasili 16 Mar 10, 2024
A CLI tool for getting screenshots of URLs using headless chrome

rustywitness ?? ?? ?? Web screenshot utility A CLI tool for getting screenshots of URLs using headless chrome Built with ❤︎ by swanandx and contributo

Swanand Mulay 16 Jan 3, 2023
MollySocket allows getting signal notifications via UnifiedPush.

MollySocket This software is still in alpha. MollySocket allows getting signal notifications via UnifiedPush. It works like a linked device, which doe

null 6 Dec 31, 2022
Reading Getting Friendly With CPU Caches

Getting Friendly With CPU Caches Reading Getting Friendly With CPU Caches, by Miki Tebeka and William Kennedy, inspired me to look at some Rust equiva

Herbert 6 Jul 25, 2023