using System.Runtime.InteropServices; namespace CZGL.SystemInfo { /// /// /// public struct Sysinfo { /// /// Seconds since boot /// public long uptime; /// /// 获取 1,5,15 分钟内存的平均使用量,数组大小为 3 /// unsafe public fixed ulong loads[3]; /// /// 总物理内存 /// public ulong totalram; /// /// 可用内存 /// public ulong freeram; /// /// 共享内存 /// public ulong sharedram; /// /// Memory used by buffers /// public ulong bufferram; /// /// Total swap space size /// public ulong totalswap; /// /// swap space still available /// public ulong freeswap; /// /// Number of current processes /// public ushort procs; /// /// Total high memory size /// public ulong totalhigh; /// /// Available high memory size /// public ulong freehigh; /// /// Memory unit size in bytes /// public uint mem_unit; /// /// Padding to 64 bytes /// unsafe public fixed byte _f[64]; } }