01-06-2003 10:33 AM
01-08-2003 05:08 AM
I already knew the mentioned HPUX modules,
but I don't want to use them since they are not much different from mine.
These modules (like mine) only parse the output of the vg|lv|pvdisplay, ioscan commands to put it in a LoL.
Whereas I would rather prefer to have a more direct access through an API library (probably in C) for three reasons.
First, I don't want to modify my modules whenever the output format of the above mentioned commands changes.
2nd, I guess it is a bit faster, and leaves you a greater degree of control.
3rd, I want to play a bit with creating a module that embeds C because I recently bought the book "Extending and Embedding Perl" by Cozens and Jennes,
that whet my appetite.
01-08-2003 05:24 AM
For LVM and ServiceGuard, the answer is clearly NO. I'm from HP and I wrote a lot of tools around system admin, but never succeeded in getting such APIs ...
For ioscan, it's possible to read /etc/ioconfig file using struct defined in /usr/include/sys/ioparams.h. Have a look to union ioconfig_record for example.
01-08-2003 05:25 AM
If that's the case (I'm assuming you're reading), then pstat is exactly what you want (it's C).
01-08-2003 06:23 AM
If you think XS is too hard to start with, try Inline::C first. Very easy interface, immediate results.
01-09-2003 04:14 AM
that was a good hint.
I had a look at man pstat and the pstat.h header file to see that it offers amongst others get_lvinfo() and get_diskinfo().
Maybe that's already enough to get me starting.
Unfortunately I lack an HP-UX workstation at home for development, and I don't seem to find time to do this sort of playing at work :-(