So remember pstate-frequency?
That small script I wrote to try make talking to the intel_pstate driver a bit easier?
Well good news! Its recently been upda-
Wait. Script?
I thought it was a C program?
Ahh yes, dear reader. Keyword: was
pstate-frequency has recently been re-written. For fun!
Its a large hulking shell script now, yay! You could think of this as a return to its humble roots.
But wait, I thought scripts were bad m'kay. Why'd you go and re-write decent C code in an ugly script?
Lets assess really what pstate-frequency does. It simply sets some predefined values into some predefined device files. It really does the job of a script, only that it has the additional overhead of compile time tied into it. In order to use the program, you had to compile C. You had to look at a makefile and set CFLAGS and LDFLAGS to your system and figure out what went where. It was a lot of work.
It also required you to have the compiling tools (build-essential, base-devel) available on your system.
It's hard to compile things on a 2GHz Chromebook which is already choking on the OS. It's not hard to run a script on a system anywhere.
Especially not one written for (hopefully) POSIX /bin/sh. No bashisms here folks. Good old, working POSIX shell script.
And the best part was that it took only 40 or so commits to move existing C code ideas over to shell. Neato!
(Colors don't work yet though, sorry :( Other than that its complete feature parity with the C program version)
So there you go, pstate-frequency v3, released as a simple and portable /bin/sh shell script with the same argument syntax as the C version including support for long options and requiring only the coreutils to run.
Have a good night.
========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?
Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com
Follow my FaceBook Page
Follow my Google+ Page
=========================