Exemplo n.º 1
0
		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 ();
		}
Exemplo n.º 2
0
		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);
		}
Exemplo n.º 3
0
		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 ();
		}
Exemplo n.º 4
0
		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);
		}
Exemplo n.º 5
0
		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);
		}