Skip to content
spyhunter99 edited this page Feb 24, 2018 · 1 revision

The Sigar API provides a portable interface for gathering system information such as:

  • System memory, swap, cpu, load average, uptime, logins
  • Per-process memory, cpu, credential info, state, arguments, environment, open files
  • File system detection and metrics
  • Network interface detection, configuration info and metrics
  • TCP and UDP connection tables Network route table

This information is available in most operating systems, but each OS has their own way(s) providing it. SIGAR provides developers with API to access this information regardless of the underlying platform. one The core API is implemented in pure C with bindings currently implemented for Java, Perl, Ruby, Python, Erlang, PHP and C#. The following platforms are currently supported:

Operating System Arch Versions Binaries included
Linux x86 2.2, 2.4, 2.6 kernels yes
Linux amd64 2.6 kernels yes
Linux ppc 2.6 kernels yes
Linux ppc64 2.6 kernels yes
Linux ia64 2.6 kernels yes
Linux s390 2.6 kernels no
Linux s390x 2.6 kernels no
Windows x86 NT4.0 through Windows 10 yes
Windows x64 2003 server, vista, 2008 server, 7, 2012 server yes
Solaris sparc-32 2.6, 7,8,9,10 yes
Solaris sparc-64 2.6, 7,8,9,10 yes
Solaris x86 8,9,10 yes
Solaris x64 8,9,10 yes
Aix ppc 4.3,5.1,5.2,5.3,6.1 yes
Aix ppc64 5.2,5.3,6.1 yes
HP-UX PA-RISC 11 yes
HP-UX ia64 11 yes
FreeBSD x86 4.x no
FreeBSD x86 5.x, 6.x yes
FreeBSD x64 6.x yes
FreeBSD x86, x64 7.x, 8.x no
OpenBSD x86 4.x, 5.x no
NetBSD x86 3.1 no
Mac OS X PowerPC 10.3, 10.4 yes
Mac OS X x86 10.4, 10.5, 10.6 yes
Mac OS X x64 10.5, 10.6 yes

While SIGAR only depends on the Linux kernel version, the following distributions have been certified:

Distribution Versions
Red Hat 6.2, 7.3, 8.0, 9.0
RHEL 3, 4, 5, 6
CentOS 3, 4, 5
Fedora 2, 3, 4, 5, 6, 7, 8, 9, 10
SuSE 8, 9, 10, 11
Ubuntu 6.06, 8.04, 8.10, 9.04
Debian 2.6, 3.0, 3.1, 3.2, 4.0, 5.0
VMware ESX 2.x, 3.0
XenServer 3.1, 3.2, 4.0, 4.1, 5.0
Slackware 10, 11
Mandrake 10
Scientific Linux 5
Gentoo

To test drive run the following command:

% java -jar sigar-bin/lib/sigar.jar
sigar> help

The shell and commands are implemented in Java, the source code is located in .bindings/java/src/org/hyperic/sigar/cmd/ Including implementations of well-known commands such as:

  • df
  • du
  • free
  • ifconfig
  • iostat
  • netstat
  • ps
  • route
  • top
  • ulimit
  • uptime
  • who

Perl, Ruby, Python, Erlang, PHP and C# interfaces are still a work in progress. To try the Perl examples:

% cd bindings/perl
% perl Makefile.PL && make
% perl -Mblib examples/ifconfig.pl
Clone this wiki locally