Lean  $LEAN_TAG$
QuantConnect.OS Class Reference

Operating systems class for managing anything that is operation system specific. More...

Static Public Member Functions

static Dictionary< string, string > GetServerStatistics ()
 Gets the statistics of the machine, including CPU% and RAM More...
 
static void Initialize ()
 Initializes the OS internal resources More...
 
static void Dispose ()
 Disposes of the OS internal resources More...
 

Static Public Attributes

static bool IsWindows => !IsLinux
 Global Flag :: Operating System More...
 
static string PathSeparation => Path.DirectorySeparatorChar.ToStringInvariant()
 Character Separating directories in this OS: More...
 
static long TotalPhysicalMemoryUsed => GC.GetTotalMemory(false) / (1024 * 1024)
 Get the RAM used on the machine: More...
 

Properties

static bool IsLinux [get]
 Global Flag :: Operating System More...
 
static long DriveSpaceRemaining [get]
 Get the drive space remaining on windows and linux in MB More...
 
static long DriveSpaceUsed [get]
 Get the drive space remaining on windows and linux in MB More...
 
static long DriveTotalSpace [get]
 Total space on the drive More...
 
static long ApplicationMemoryUsed [get]
 Gets the amount of private memory allocated for the current process (includes both managed and unmanaged memory). More...
 
static decimal CpuUsage [get]
 Total CPU usage as a percentage More...
 

Detailed Description

Operating systems class for managing anything that is operation system specific.

Good design should remove the need for this function. Over time it should disappear.

Definition at line 31 of file OS.cs.

Member Function Documentation

◆ GetServerStatistics()

static Dictionary<string, string> QuantConnect.OS.GetServerStatistics ( )
static

Gets the statistics of the machine, including CPU% and RAM

Definition at line 142 of file OS.cs.

Here is the caller graph for this function:

◆ Initialize()

static void QuantConnect.OS.Initialize ( )
static

Initializes the OS internal resources

Definition at line 157 of file OS.cs.

◆ Dispose()

static void QuantConnect.OS.Dispose ( )
static

Disposes of the OS internal resources

Definition at line 165 of file OS.cs.

Member Data Documentation

◆ IsWindows

bool QuantConnect.OS.IsWindows => !IsLinux
static

Global Flag :: Operating System

Definition at line 53 of file OS.cs.

◆ PathSeparation

string QuantConnect.OS.PathSeparation => Path.DirectorySeparatorChar.ToStringInvariant()
static

Character Separating directories in this OS:

Definition at line 58 of file OS.cs.

◆ TotalPhysicalMemoryUsed

long QuantConnect.OS.TotalPhysicalMemoryUsed => GC.GetTotalMemory(false) / (1024 * 1024)
static

Get the RAM used on the machine:

Definition at line 122 of file OS.cs.

Property Documentation

◆ IsLinux

bool QuantConnect.OS.IsLinux
staticget

Global Flag :: Operating System

Definition at line 42 of file OS.cs.

◆ DriveSpaceRemaining

long QuantConnect.OS.DriveSpaceRemaining
staticget

Get the drive space remaining on windows and linux in MB

Definition at line 64 of file OS.cs.

◆ DriveSpaceUsed

long QuantConnect.OS.DriveSpaceUsed
staticget

Get the drive space remaining on windows and linux in MB

Definition at line 76 of file OS.cs.

◆ DriveTotalSpace

long QuantConnect.OS.DriveTotalSpace
staticget

Total space on the drive

Definition at line 88 of file OS.cs.

◆ ApplicationMemoryUsed

long QuantConnect.OS.ApplicationMemoryUsed
staticget

Gets the amount of private memory allocated for the current process (includes both managed and unmanaged memory).

Definition at line 111 of file OS.cs.

◆ CpuUsage

decimal QuantConnect.OS.CpuUsage
staticget

Total CPU usage as a percentage

Definition at line 128 of file OS.cs.


The documentation for this class was generated from the following file: