HPUX::Pstat - Perl wrapper for C<pstat()> functions


HPUX-Pstat documentation Contained in the HPUX-Pstat distribution.

Index


Code Index:

NAME

Top

HPUX::Pstat - Perl wrapper for pstat() functions

SYNOPSIS

Top

use HPUX::Rstat;

$pst = HPUX::Pstat::getstatic();

$psd = HPUX::Pstat::getdynamic();

$psv = HPUX::Pstat::getvminfo();

$pss = HPUX::Pstat::getswap(size = 1, start = 0);

$pss = HPUX::Pstat::getproc(size = 1, start = 0);

$pss = HPUX::Pstat::getprocessor(size = 1, start = 0);

DESCRIPTION

Top

This Perl modules lets you call some of the pstat(2) functions and returns system performance data in Perl data structures. HPUX::Pstat is meant as a foundation to build performance monitoring tools upon.

The HPUX::Pstat::getstatic, HPUX::Pstat::getdynamic and HPUX::Pstat::getvminfo functions each return a hashref containing most of the respective C structure members.

The HPUX::Pstat::getswap, HPUX::Pstat::getproc and HPUX::Pstat::getprocessor functions take up to two arguments and return a reference to an array-of-hashes. The arguments specify the number of records to fetch and the index of the first record and are equivalents to the elemcount and index arguments of the respective pstat functions. In any case only valid data is returned (Example: If you call HPUX::Pstat::getprocessor(4) on a 2-processor box, the resulting array will contain only two entries).

DATA FORMAT

Top

The included example1.pl dumps the data structures of all functions. For more information read /usr/include/sys/pstat.h.

PORTABILITY

Top

According to the pstat(2) manpage the calling interface is kernel dependent. So do not expect too much. HPUX::Pstat was written and tested on a HPUX 11.0 box and compiles well with Perl 5.6.1 and gcc.

BUGS AND DESIGN LIMITATIONS

Top

So far the list of imported struct members is hardcoded in pack.c. I also left out some of the more obscure struct members and all of the members marked as deprecated.

As any software this package may contain bugs. Please feel free to contact me if you find one.

AUTHOR

Top

Axel Schwenke <axel.schwenke@gmx.net>

Copyright (c) 2003 Axel Schwenke. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

VERSION

Top

Version 1.01 (31 March 2003)

SEE ALSO

Top

pstat(2).


HPUX-Pstat documentation Contained in the HPUX-Pstat distribution.

# $Id: Pstat.pm,v 1.1 2003/03/31 17:42:16 deschwen Exp $

package HPUX::Pstat;

use strict;
use vars qw($VERSION @ISA);
require DynaLoader;

@ISA = qw(DynaLoader);
$VERSION = '1.01';

bootstrap HPUX::Pstat $VERSION;

1;
__END__