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...
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

Reading Getting Friendly With CPU Caches
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

Demo Repo for BSides 2024 Live Training: "Blue Crab Shells: Getting Started with Offensive Rust Programming"

Blue Crab Shells: Getting Started with Offensive Rust Programming This repository contains example code for the live training provided for BSides San

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

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
Blaze is a Rust script that continuously monitors server resource usage and sends real-time summaries and alerts to a Discord channel via Webhook.

Blaze Blaze is a Rust script designed to run 24/7 on a server, providing a summary of resource usage every 30 minutes (configurable) to a Discord chan

ShadowArcanist 18 Sep 23, 2024
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
This tool was developed as part of a course on forensic analysis and cybersecurity. It is intended to be used as a training resource to help students understand the structure and content of job files in Windows environments.

Job File Parser Job File Parser is a Rust-based tool designed for parsing both legacy binary job files and modern XML job files used by the Windows Ta

Mehrnoush 3 Aug 12, 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