I need to find out in my script if a (potentially legacy) CPU supports dynamic speed setting, and eventually get value of maximum and current speed. What makes it more complicated is that I need to support RHEL5 (kernel 2.6.18-371) as well, where tools like lscpu are not available, and also less common architectures like PowerPC or S390.

For example, I know that for x86 architectures, some features can be read from "flags" in /proc/cpuinfo, but how do I know what to search for?. Also on a ppc64 machine I have for testing, this flags field is missing, instead there is a similar looking field "features".

So what is the (most) universal approach? Is there a way that would work even on less common architectures like s390 or ppc?

What I tried (on Pentium III) was to just load all modules that have something to do with cpufreq (i.e. grepping through modules folder) and look if /sys/devices/system/cpu/cpu0/cpufreq exists after that. However, I wonder if this is all I can do before saying it's not supported.

  • You can parse some flags in /proc/cpuinfo, but that's obviously architecture-dependent, and there are several different CPU features that allow a variable size and I don't know if they're all listed there on x86 (and they aren't on ARM). Jun 6, 2014 at 0:30

1 Answer 1


This should work on RHEL 5.3:

dmidecode --type processor

and look for Max Speed and Current Speed info

  • I can't check on rhel5 right now, but on Fedora with i7, it does not work properly: it mentions only 1 CPU with current speed = maximum speed. cpufreq reports 4 different current/maximum pairs. Jun 5, 2014 at 17:52
  • ...also on rhel5 dmidecode is only available for Itanium or x86 processors, not PowerPC or s390 Jun 5, 2014 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.