using System.Diagnostics;
var memoryInfo = GC.GetGCMemoryInfo();
var totalMemoryMib = memoryInfo.TotalAvailableMemoryBytes / 1024 / 1024;
var usedMemoryMib = memoryInfo.TotalAvailableMemoryBytes / 1024 / 1024;
var rightNow = DateTime.Now;
var upTime = new TimeSpan(Environment.TickCount);
var bootTime = rightNow - upTime;
Console.WriteLine("OS = " + Environment.OSVersion.VersionString);
Console.WriteLine($"Memory usage: {usedMemoryMib} / {totalMemoryMib}");
Console.WriteLine($"System uptime: {upTime.ToString(@"d\,hh\:mm\:ss")}");
Console.WriteLine($"System uptime: {upTime.ToString(@"d\,hh\:mm\:ss")}");