Comments (5)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 NishAravamudan commented Permalink

Hi Bill,

One small nit on your script -- you can use
grep Mem / proc/meminfo
instead of
cat /proc/meminfo | grep Mem
And I think for the first one, you can even just do
grep -c PowerPC /proc/device-tree/cpus/ ?

2 Bill_Buros commented Permalink

Hi Nish, can you tell our habit is to pipe everything into grep?

I'll change the Mem one, that's a good suggestion. I'll get the Hugepage check as well.
cat /proc/meminfo | grep Mem
cat /proc/meminfo | grep Huge
grep Mem /proc/meminfo
grep Huge /proc/meminfo
I was playing with the grep -c this morning and it's not doing what it seems like it should do. Will check into it more..

3 NishAravamudan commented Permalink

I don't think it's just your habit, by any means :) It's still what I do by default, until I remember I don't have to!

I think I mis-typed the grep -c, you'll want:
ls /proc/device-tree/cpus/ | grep -c PowerPC
grep -c proc /proc/cpuinfo

4 Bill_Buros commented Permalink

Ah. That's clever, I see now. Skips having to use wc. So I'll change

ls /proc/device-tree/cpus/ | grep PowerPC | wc -l
cat /proc/cpuinfo | grep proc | wc -l
ls /proc/device-tree/cpus/ | grep -c PowerPC
grep -c proc /proc/cpuinfo

5 KYJ7_Michael_Meissner commented Permalink

Note, on my Sles 11 SP1 power7 system with powerpc-utils-1.2.2-0.8.1 installed, and my RHEL 6.1 power7 system with powerpc-utils-1.2.2-17.el6.ppc64 installed, the ppc64_cpu command does not support --frequency. My Sles 10 SP4 power6 system with powerpc-utils-1.1.3-0.7.15 does support the --frequency option, but ppc64_cpu says that getting the frequency is unsupported on this system. If you grep /proc/cpuinfo, you can find the clock frequency for each CPU as well as the timebase for the system.