SpeedDto.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. using NTMiner.Core;
  2. using NTMiner.Core.Gpus;
  3. using System;
  4. namespace NTMiner.Report {
  5. /// <summary>
  6. /// 向服务器上报算力时的算力类型
  7. /// </summary>
  8. public class SpeedDto : ISpeedDto {
  9. private string _dualCoinCode;
  10. private int _totalPhysicalMemoryMb;
  11. public SpeedDto() {
  12. GpuTable = new GpuSpeedData[0];
  13. }
  14. public Guid MineContextId { get; set; }
  15. public DateTime LocalServerMessageTimestamp { get; set; }
  16. public int KernelSelfRestartCount { get; set; }
  17. public bool IsAutoBoot { get; set; }
  18. public bool IsAutoStart { get; set; }
  19. public int AutoStartDelaySeconds { get; set; }
  20. public bool IsAutoRestartKernel { get; set; }
  21. public int AutoRestartKernelTimes { get; set; }
  22. public bool IsNoShareRestartKernel { get; set; }
  23. public int NoShareRestartKernelMinutes { get; set; }
  24. public bool IsNoShareRestartComputer { get; set; }
  25. public int NoShareRestartComputerMinutes { get; set; }
  26. public bool IsPeriodicRestartKernel { get; set; }
  27. public int PeriodicRestartKernelHours { get; set; }
  28. public bool IsPeriodicRestartComputer { get; set; }
  29. public int PeriodicRestartComputerHours { get; set; }
  30. public int PeriodicRestartKernelMinutes { get; set; }
  31. public int PeriodicRestartComputerMinutes { get; set; }
  32. public bool IsAutoStopByCpu { get; set; }
  33. public int CpuGETemperatureSeconds { get; set; }
  34. public int CpuStopTemperature { get; set; }
  35. public bool IsAutoStartByCpu { get; set; }
  36. public int CpuLETemperatureSeconds { get; set; }
  37. public int CpuStartTemperature { get; set; }
  38. public string GpuDriver { get; set; }
  39. public GpuType GpuType { get; set; }
  40. // ReSharper disable once InconsistentNaming
  41. public string OSName { get; set; }
  42. // ReSharper disable once InconsistentNaming
  43. public int OSVirtualMemoryMb { get; set; }
  44. public int TotalPhysicalMemoryMb {
  45. get {
  46. // 因为有客户端版本的单位不正确传上来的是kb不是Mb所以如果值较大除以1024
  47. if (_totalPhysicalMemoryMb >= 100 * NTKeyword.IntK) {
  48. _totalPhysicalMemoryMb /= NTKeyword.IntK;
  49. }
  50. return _totalPhysicalMemoryMb;
  51. }
  52. set {
  53. _totalPhysicalMemoryMb = value;
  54. }
  55. }
  56. public string DiskSpace { get; set; }
  57. public Guid ClientId { get; set; }
  58. public string MACAddress { get; set; }
  59. public string LocalIp { get; set; }
  60. public string Version { get; set; }
  61. public DateTime BootOn { get; set; }
  62. public DateTime? MineStartedOn { get; set; }
  63. public bool IsMining { get; set; }
  64. public string MinerIp { get; set; }
  65. public string GpuInfo { get; set; }
  66. public Guid MineWorkId { get; set; }
  67. public string MineWorkName { get; set; }
  68. public string MinerName { get; set; }
  69. private string _mainCoinCode;
  70. public string MainCoinCode {
  71. get => _mainCoinCode ?? string.Empty;
  72. set => _mainCoinCode = value;
  73. }
  74. public string MainCoinPool { get; set; }
  75. public string MainCoinWallet { get; set; }
  76. public string MainCoinPoolDelay { get; set; }
  77. public string Kernel { get; set; }
  78. public string DualCoinCode {
  79. get => _dualCoinCode ?? string.Empty;
  80. set => _dualCoinCode = value;
  81. }
  82. public string DualCoinPool { get; set; }
  83. public string DualCoinWallet { get; set; }
  84. public string DualCoinPoolDelay { get; set; }
  85. public int MainCoinTotalShare { get; set; }
  86. public int MainCoinRejectShare { get; set; }
  87. public bool IsDualCoinEnabled { get; set; }
  88. public int DualCoinTotalShare { get; set; }
  89. public int DualCoinRejectShare { get; set; }
  90. public double MainCoinSpeed { get; set; }
  91. public double DualCoinSpeed { get; set; }
  92. public string KernelCommandLine { get; set; }
  93. // 用于判断GPU算力表格中是否展示找到、拒绝、无效列
  94. public bool IsRejectOneGpuShare { get; set; }
  95. public bool IsFoundOneGpuShare { get; set; }
  96. public bool IsGotOneIncorrectGpuShare { get; set; }
  97. public int CpuPerformance { get; set; }
  98. public int CpuTemperature { get; set; }
  99. public bool IsRaiseHighCpuEvent { get; set; }
  100. public int HighCpuPercent { get; set; }
  101. public int HighCpuSeconds { get; set; }
  102. public bool IsOuterUserEnabled { get; set; }
  103. public bool IsAutoDisableWindowsFirewall { get; set; }
  104. public bool IsDisableUAC { get; set; }
  105. public bool IsDisableWAU { get; set; }
  106. public bool IsDisableAntiSpyware { get; set; }
  107. public DateTime MainCoinSpeedOn { get; set; }
  108. public DateTime DualCoinSpeedOn { get; set; }
  109. /// <summary>
  110. /// 内网群控时看到的外网群控用户
  111. /// </summary>
  112. public string ReportOuterUserId { get; set; }
  113. public GpuSpeedData[] GpuTable { get; set; }
  114. }
  115. }