Exemplo n.º 1
0
        public long GetProcessorL4Cache(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetProcessorL4Cache));

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(long.Parse(result.Result));
        }
Exemplo n.º 2
0
        public ulong GetTotalSwap(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetTotalSwap));

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(ulong.Parse(result.Result));
        }
Exemplo n.º 3
0
        public string GetProcessorType(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetProcessorType));

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(result.Result);
        }
Exemplo n.º 4
0
        public int GetCpuNumber(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetCpuNumber));

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(int.Parse(result.Result));
        }
        public string GetOperatingSystemVersion(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetOperatingSystemVersion));

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(result.Result);
        }
        public bool GetIsVirtual(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetIsVirtual));

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(!string.IsNullOrEmpty(result.Result));
        }
        public IPAddress GetIPAddress(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetIPAddress));

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(IPAddress.Parse(result.Result));
        }
Exemplo n.º 8
0
        public ulong GetUsedMemory(IServerConnectionService connectionService)
        {
            var command = commandProvider.GetCommand(nameof(GetUsedMemory));

            if (string.IsNullOrEmpty(command.Text))
            {
                return(GetTotalMemory(connectionService) - GetFreeMemory(connectionService));
            }

            command.ThrowError = true;
            var result = connectionService.ExecuteCommand(command);

            return(ulong.Parse(result.Result));
        }