Ejemplo n.º 1
0
    static void Init()
    {
        Log.Init();
        M4ATX.Init();
        Motherboard.Init();
        nVidiaGPU.Init();

        Log.WriteLine(
            "--------------------+-------------+---------------------------------------+-------------+-------------------------------+-------+---------------------------------" + Environment.NewLine +
            "     Timestamp      |  M4ATX PSU  |           CPU Temperature             |     GPU     |           CPU Power           |  GPU  |           M4ATX PSU Voltage         " + Environment.NewLine +
            "  (UTC time zone)   | temperature |   PKG   Core0  Core1  Core02  Core03  | temperature |     PKG    Cores     DRAM     | power |   In       12V      3V        5V" + Environment.NewLine +
            "--------------------+-------------+---------------------------------------+-------------+-------------------------------+-------+---------------------------------");
    }
Ejemplo n.º 2
0
 static void Init()
 {
     OpenReportStream();
     try
     {
         M4ATX.Init();
     }
     catch (Exception e)
     {
         /*
          * the M4ATX USB interface is a bit unstable,
          * handle the case we can't connect to it
          * by logging an error and continuing without it
          */
         LogException(e);
     }
     Motherboard.Init();
 }
Ejemplo n.º 3
0
    static void FetchAndLogRecord(Record record)
    {
        string line;

        M4ATX.Update(record);
        Motherboard.Update(record);
        nVidiaGPU.Update(record);

        Log.ToCloud(record);

        line = string.Format(
            "{0} |     {1}\x00B0     |    {2}\x00B0    {3}\x00B0    {4}\x00B0    {5}\x00B0    {6}\x00B0    |" +
            "     {7}\x00B0     |    {8,4:#0.0}W    {9,4:#0.0}W    {10,4:#0.0}W    | {11,4:#0.0}W |" +
            "   {12,4:#0.0}V    {13,4:#0.0}V    {14,4:#0.0}V    {15,4:#0.0}V",


            DateTime.UtcNow,

            record[DataPoint.M4ATXTemperature],
            record[DataPoint.CPUPackageTemperature],
            record[DataPoint.CPUCore0Temperature],
            record[DataPoint.CPUCore1Temperature],
            record[DataPoint.CPUCore2Temperature],
            record[DataPoint.CPUCore3Temperature],
            record[DataPoint.GPUCoreTemperature],
            record[DataPoint.CPUPackagePower],
            record[DataPoint.CPUCoresPower],
            record[DataPoint.CPUDRAMPower],
            record[DataPoint.GPUPower],
            record[DataPoint.M4ATXVoltageIn],
            record[DataPoint.M4ATXVoltageOn12V],
            record[DataPoint.M4ATXVoltageOn3V],
            record[DataPoint.M4ATXVoltageOn5V]
            );


        Log.WriteLine(line);
    }
Ejemplo n.º 4
0
    static void FetchAndLogRecord(Record record)
    {
        string line;

        try
        {
            M4ATX.Update(record);
        }
        catch (Exception e)
        {
            LogException(e);
        }

        Motherboard.Update(record);

        line = string.Format(
            "{0} |     {1}\x00B0     |    {2}\x00B0    {3}\x00B0    {4}\x00B0    {5}\x00B0    {6}\x00B0    |     {7}\x00B0  {8,4:#0.0}W    |    {9,4:#0.0}W    {10,4:#0.0}W    {11,4:#0.0}W    |   {12:#0.0}V",

            DateTime.UtcNow,
            record.Get(Record.DataPoint.M4ATXTemperature),

            record.Get(Record.DataPoint.CPUPackageTemperature),
            record.Get(Record.DataPoint.CPUCore0Temperature),
            record.Get(Record.DataPoint.CPUCore1Temperature),
            record.Get(Record.DataPoint.CPUCore2Temperature),
            record.Get(Record.DataPoint.CPUCore3Temperature),

            record.Get(Record.DataPoint.GPUCoreTemperature),
            record.Get(Record.DataPoint.GPUPower),
            record.Get(Record.DataPoint.CPUPackagePower),
            record.Get(Record.DataPoint.CPUCoresPower),
            record.Get(Record.DataPoint.CPUDRAMPower),
            record.Get(Record.DataPoint.M4ATXVoltageIn)
            );

        WriteLine(line);
    }