Home›Java›Mods›MemCheck
Description

Want to find out how much heap space your server really needs? Want to check that your hosting provider is giving you what you paid for? Other plugins, such as Essentials, will provided memory statistics, but they're probably not what you really want to know. MemCheck provides the amount of heap used and the total amount of free heap space in real time.

MemCheck adds a /mem command which outputs the amount of used heap in MB and as a percentage of the maximum heap size, and the total free heap in MB. It also provides statistics about the Java "Metaspace" use. As a bonus, the server's current TPS as calculated by Essentials, the CPU load, the average garbage collection time in the previous minute, and the total number of loaded chunks are shown.

At startup, the number of processors (threads), total physical memory, maximum heap, server view distance, server simulation distance, Java garbage collector name(s), and Java command line options are written to the server log file.

This allows the server owner to see how much memory is being used and if the memory available for additional objects is too small, too big, or just right.

Details

I discovered that the memory values reported by Essentials come directly from Java, and don't really show what a server owner needs to know. The explanation will be easier with the help of the following diagram I stole from Stackoverflow:

java_memory2.png

Java provides, and Essentials reports, the three values shown in red. This is not really what a server owner needs. The more relevant values are the two shown in blue at the bottom: used, which is the amount of the heap currently used by the program, and totalFree, which is the amount of memory available for additional objects on the heap. More information is shown below.

Commands

/mem - This outputs the current memory statistics. Note that the heap is constantly changing, so you'll see the values change from second to second, as more objects are allocated or the Java garbage collector runs.

mem_sample2.png

The output includes the following:
Permissions

memcheck.mem - Required to use the mem command. Defaults to op.

Configuration

None.

Miscellaneous

This plugin uses the bStats metrics system to provide anonymous usage data. You may opt-out globally by changing plugins/bStats/config.yml. The metrics are available at https://bstats.org/plugin/bukkit/MemCheck

[​IMG]

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

MemCheck is a free Minecraft Java mod. Compatible with Minecraft 1.12, 1.13, 1.14, 1.15 and newer. Downloaded 4,561 times (via Spigot). Download it and open it directly in the game.

Explore more