ddn.util.monaco.platform.linux

Types 3

structsysinfo_t
Fields
long uptime
ulong[3] loads
ulong totalram
ulong freeram
ulong sharedram
ulong bufferram
ulong totalswap
ulong freeswap
ushort procs
ulong totalhigh
ulong freehigh
uint mem_unit
char[20 - 2 * long.sizeof - int.sizeof] _f
structrusage_t
Fields
timeval_t ru_utime
timeval_t ru_stime
long ru_maxrss
long ru_ixrss
long ru_idrss
long ru_isrss
long ru_minflt
long ru_majflt
long ru_nswap
long ru_inblock
long ru_oublock
long ru_msgsnd
long ru_msgrcv
long ru_nsignals
long ru_nvcsw
long ru_nivcsw
Nested Templates
timeval_t
structTuple(T...)

Helper struct for tuple return.

Fields
T values

Functions 13

fnint sysinfo(sysinfo_t * info)
fnint getrusage(int who, rusage_t * usage)
fnsysinfo_t getSysInfo() @trustedGets system information using sysinfo syscall.
fnrusage_t getResourceUsage(int who = RUSAGE_SELF) @trustedGets resource usage for the current process.
fnstring readProcFile(string path) @safe nothrowReads a /proc file and returns its content.
fnstring readSysFile(string path) @safe nothrowReads a /sys file and returns its content.
fnstring[string] parseKeyValuePairs(string content) @safe nothrowParses a /proc file and extracts key-value pairs.
fnulong[] parseCpuStat(string content) @safe nothrowParses /proc/stat CPU statistics.
fnauto getLoadAvg() @safeGets load averages from sysinfo.
fnauto tuple(T...)(T values) @safe nothrow
fnbool isContainer() @safe nothrowChecks if the current process is running in a container.
fnlong getPageSize() @safe nothrowGets the memory page size.
fnlong getClockTicks() @safe nothrowGets the clock ticks per second.

Variables 3

enumvarRUSAGE_SELF = 0
enumvarRUSAGE_CHILDREN = - 1
enumvarRUSAGE_THREAD = 1