diff --git a/ChangeLog b/ChangeLog index 965415e0..31b2f034 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-02-21 Doug MacEachern + * Perl binding updates + Submitted by: Nicolas Laurent + * [SIGAR-45] Fix disk reads/writes for LVM managed volumes 2007-02-15 Doug MacEachern diff --git a/bindings/perl/Sigar.xs b/bindings/perl/Sigar.xs index 53a01aff..8f30cda2 100644 --- a/bindings/perl/Sigar.xs +++ b/bindings/perl/Sigar.xs @@ -246,6 +246,31 @@ cpu_info_list(sigar) OUTPUT: RETVAL +SV * +cpu_list(sigar) + Sigar sigar + + PREINIT: + sigar_cpu_list_t cpus; + int status; + + CODE: + status = sigar_cpu_list_get(sigar, &cpus); + + if (status != SIGAR_OK) { + SIGAR_CROAK(sigar, "cpu_list"); + } + + RETVAL = convert_2svav((char *)&cpus.data[0], + cpus.number, + sizeof(*cpus.data), + "Sigar::Cpu"); + + sigar_cpu_list_destroy(sigar, &cpus); + + OUTPUT: + RETVAL + SV * proc_list(sigar) Sigar sigar