System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

troubles with pstat_getdisk in retreiving agile disks info on HP-UX 11.31

julietta
Occasional Contributor

troubles with pstat_getdisk in retreiving agile disks info on HP-UX 11.31

Please help me to find a way to get agile disks infromation on HP-UX 11.31, since all agile disks are returned by pstat_getdisk having status==0 regardless of the fact whether they are active or not.

3 REPLIES
Duncan Edmonstone
Honored Contributor

Re: troubles with pstat_getdisk in retreiving agile disks info on HP-UX 11.31

julietta,

 

any chance of sharing a code fragment and what you get when you run it? Might help us to diagnose the issue...

 

looking at the manpage for pstat_getdisk I see the following:

 

pstat_getdisk() returns information specific to a particular disk. There is one instance of this context
for each disk opened in the system. Unused, closed disks may not have a context and the number of
contexts may not match the number of disks configured into the system. For each instance requested, up
to a maximum of elemsize bytes of data is returned in the pst_diskinfo structures pointed to by buf.
The elemcount parameter specifies the number of pst_diskinfo structures that are available at buf to
be filled in. The index parameter specifies the starting index within the context of disks. Some contexts
may persist after their disks have been closed. An application should use the field psd_status in the
pst_diskinfo structure to tell if the disk is opened (1) or closed (0).

 

So are you saying that psd_status in the pst_diskinfo structure is always zero whether the disk is open or not, or are you saying that pstat_getdisk is returning a value of zero?


HTH

Duncan
julietta
Occasional Contributor

Re: troubles with pstat_getdisk in retreiving agile disks info on HP-UX 11.31

Hello Duncan,

 

Thanks for your answer.

Here is my code:

 

 

/* Set physical server IO */

                count = pstat_getdisk(  pst, sizeof(struct pst_diskinfo), sizeof(pst) / sizeof(struct pst_diskinfo), 0);

                if (count < 0)

                {

                                os_handle_ptr->os_log_func_handle(OS_LOG_LEVEL_SEVERE,"OSLib: pstat_getdisk failed");

                                return OS_RC_ERROR;

                }

 

                for (i=0 ; i<count ; i++)

                {

                                if (pst[i].psd_status == 0)

                                {

                                                continue;

                                }

 

                                total_disks_io += pst[i].psd_dkwds;

                }

 

As you can see from the code, only for non-zero disk status the value is picked.

This code works for all HP_UX before 11.31, returning non-zero values for the cumulative summary " total_disks_io", however always returns 0 for 11.31.

 

While investigating this phenomenon, I've found a similar complaint in IBM Tool:

http://www-01.ibm.com/support/docview.wss?uid=swg1IZ65644

"UNIX OS AGENT UNABLE TO COLLECT METRICS ON AGILE DISKS ON HP-UX 11.31"

 

In addition, I'm attaching the two output files (within a zip file) of the following commands:

  • ioscan -m dsf
  • scsimgr  get_info  all_lun

The above commands have been run on the problematic server recently.

 

Please assist!

Thanks in advance,

Julia

julietta
Occasional Contributor

Re: troubles with pstat_getdisk in retreiving agile disks info on HP-UX 11.31

Hello again Duncan (and all the others that might be helpful :-),

 

Please check out my first reply with all the required information (including attachments).

I'd just like to put a specific answer to your previous question: the first is correct, i.e. psd_status in the pst_diskinfo structure is always zero whether the disk is open or not.

 

Awaiting any help,

jul