Skip to main content

Calling pstat procedures from Server Express

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

How do you use the h2cpy utility to convert pstat.h to pstat.cpy

Output is not aligned correctly with 64 bit application using the following command to create:

h2cpy /usr/include/sys/pstat.h -I /usr/include -e lp64 h2cpy /usr/include/sys/pstat.h -I /usr/include -e ilp64

Resolution:

The pstat_ functions is used to obtain system and process information.

Create  pstat.cpy with the following command:

h2cpy /usr/include/sys/pstat.h -I /usr/include -D_PSTAT64

It will create pstat.cpy with the following:

01  pst-status        is typedef.

        02 pst-idx           usage l-long.

        02 pst-uid           usage l-long.

        02 pst-pid           usage l-long.

        02 pst-ppid          usage l-long.

        02 pst-dsize         usage l-long

Old KB# 4537