コード例 #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();
        }
コード例 #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));
        }
コード例 #3
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));
        }
コード例 #4
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();
        }
コード例 #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));
        }
コード例 #6
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 ();
		}
コード例 #7
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);
		}
コード例 #8
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);
		}
コード例 #9
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 ();
		}
コード例 #10
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);
		}