Server resource usage

This might be a stupid question, but does anyone know if there’s way to detect the server’s resource usage (RAM, CPU)? Or is there a module that does this?

You can’t do that without a binary module.

Know of a module that does this? I don’t know any C++

I don’t, but maybe someone else does. Wait for a reply.

When I was messing around with modules I attempted to do something like this.
I wouldn’t be surprised if I did it wrong. It’s just some things I put together from googling.

Here’s all the code basically, and the project if you want to compile it or use the .dll

Use require(“systemex”) and then you can use the two functions below:

Like I said though I probably did it wrong but I guess it’s worth a shot.
There’s nothing to check the CPU in it though.

Love you <3

[editline]13th February 2015[/editline]

Doesn’t seem to be working, or i’m using it wrong.

Quick script I wrote up to test this:

require( "systemex" )

concommand.Add( "lmp", function()

	MsgC( Color( 0, 255, 0 ), "[LagMeter] " )
	MsgC( Color( 255, 255, 255 ), "Used virtual memory: " .. systeminfo.GetUsedVirtualMemory .. "
" )
	MsgC( Color( 0, 255, 0 ), "[LagMeter] " )
	MsgC( Color( 255, 255, 255 ), "Used physical memory: " .. systeminfo.GetUsedPhysicalMemory .. "
" )*/

end )

I’m guessing it’s a function, not a variable.

Yes it’s a function call it like this:
systeminfo.GetUsedVirtualMemory( )
systeminfo.GetUsedPhysicalMemory( )

Works, thank you! :slight_smile:

ah, it just displays the total usage on the machine, not the specific srcds application.
Whatever, it’s still useful. :slight_smile: