Adi Adi - 9 months ago 66
C# Question

How to determine free memory in Mono/C# in Linux (without external DLL)

I'm able to read available memory using extern c function to a sys/sysinfo reading.
How ever I want to do this using mono's class (can't find relevant function in Mono.Unix.Native.Syscall), and I cannot use PerformanceCounter with "Available MBytes" as it is not implemented in mono..

Ubuntu/Mono 4.1.0

Any idea how to read free RAM in C#/Mono/Linux ?

Adi Adi
Answer Source

I decided to use sysinfo after all. Polling each X seconds in a separate waiting thread.

And nice -15 is always nice to use.. :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download