IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 3 replies
  • Latest Post - ‏2010-05-12T13:48:41Z by hjstoff
hjstoff
hjstoff
3 Posts

Pinned topic /proc/ppc64/systemcfg on SuSE SLES 11 - Where is struct systemcfg?

‏2010-05-12T12:11:57Z |
On ppc64 systems running SuSE SLES11 there is an entry under in the proc
pseudo-file system, /proc/ppc64/systemcfg. It is readable (perms = -r--r--r--)
but the information is in binary form. Obviously what is needed to make sense of
the data layout is the "struct systemcfg" that is mentioned on the web by various people
that use AIX or RedHat on ppc. However, although the kernel source and headers rpms are
installed, I am not able to find any (...)/systemcfg.h file at all on SuSE SLES11.

Does any one know what the proper way on SuSE SLES 11 is of obtaining information
from systemcfg, most notably the 64 bit number of Time Base ticks that go into a
second according to the OS? Is there a system call for that? If not, where is the
the appropriate struct systemcfg definition (for a 2.6.27 ppc64 linux kernel) to be found?
Updated on 2010-05-12T13:48:41Z at 2010-05-12T13:48:41Z by hjstoff
  • hjstoff
    hjstoff
    3 Posts

    Re: /proc/ppc64/systemcfg on SuSE SLES 11 - Where is struct systemcfg?

    ‏2010-05-12T13:11:09Z  
    OK,

    I just found out myself by doing a lot of "grepping" over
    kernel source files. It is not a SuSE SLES11 thing by the way,
    but a matter having of a newer kernel in which some things
    have been renamed!

    What used once to be called "struct systemcfg" now goes by the
    name of "struct vdso_data". The header is in the kernel source
    as: (...)/arch/powerpc/include/asm/vdso_datapage.h.

    The /proc entry is still called /proc/ppc64/systemcfg though.
  • SystemAdmin
    SystemAdmin
    706 Posts

    Re: /proc/ppc64/systemcfg on SuSE SLES 11 - Where is struct systemcfg?

    ‏2010-05-12T13:32:52Z  
    • hjstoff
    • ‏2010-05-12T13:11:09Z
    OK,

    I just found out myself by doing a lot of "grepping" over
    kernel source files. It is not a SuSE SLES11 thing by the way,
    but a matter having of a newer kernel in which some things
    have been renamed!

    What used once to be called "struct systemcfg" now goes by the
    name of "struct vdso_data". The header is in the kernel source
    as: (...)/arch/powerpc/include/asm/vdso_datapage.h.

    The /proc entry is still called /proc/ppc64/systemcfg though.
    So inquiring minds are curious now.. is there something you're trying to do with that information?
  • hjstoff
    hjstoff
    3 Posts

    Re: /proc/ppc64/systemcfg on SuSE SLES 11 - Where is struct systemcfg?

    ‏2010-05-12T13:48:41Z  
    So inquiring minds are curious now.. is there something you're trying to do with that information?
    Yes, to make sense of the binary data to be read from /proc/ppc64/systemcfg
    of course.

    Why? - for the even more curious :-)

    In the context of doing more finegrained OS noise investigations on our
    p6-575 systems, I'm using Time Base register ticks to get a much better
    "time resolution" than with the standard posix arsenal of timestamp obtaining
    functions.
    The struct I was looking for holds the OS' view of how many Time Base ticks
    there are in a second. So it is a convenient way of converting the results
    measured back into units that make sense for "real time": (nano/micro)seconds.
    It surely beats "callibration after the fact" by doing a sleep(1) that is sandwiched
    between 2 time base register readings.