private static void SetCPUGovenor (string cpu, string govenor) { var ph = new ProcessHelper (); ph.Command ("cd " + SYS_CPU_PATH + cpu + "/cpufreq"); ph.Command ("echo " + govenor + " > scaling_governor"); ph.FinishSession (); }
private static string GetCPUGovenor (string cpu) { var ph = new ProcessHelper (); ph.Command ("cd " + SYS_CPU_PATH + cpu + "/cpufreq"); ph.Command ("cat scaling_governor"); return ph.Output ().Trim (DELIMITERS); }
private static void SetCPUFrequency (string cpu, string frequency) { var ph = new ProcessHelper (); ph.Command ("cd " + SYS_CPU_PATH + cpu + "/cpufreq"); ph.Command ("echo " + frequency + " > scaling_setspeed"); ph.FinishSession (); }
private static string[] AvailableCPUGovenors (string cpu) { var ph = new ProcessHelper (); ph.Command ("cd " + SYS_CPU_PATH + cpu + "/cpufreq"); ph.Command ("cat scaling_available_governors"); return ph.Output ().Trim (DELIMITERS).Split (DELIMITERS); }
private static string[] AvailableCPUs () { var ph = new ProcessHelper (); ph.Command ("cd " + SYS_CPU_PATH); ph.Command ("for i in cpu*[0-9] ; do echo $i; done"); return ph.Output ().Trim (DELIMITERS).Split (DELIMITERS); }