How To Install ruby-sigar on Ubuntu 18.04
Introduction
In this tutorial we learn how to install ruby-sigar
on Ubuntu 18.04.
What is ruby-sigar
ruby-sigar is:
One API to access system information regardless of the underlying platform
Hyperic’s System Information Gatherer (SIGAR) is a cross-platform API for collecting software inventory data. SIGAR is core of HQ’s auto-discovery functionality, and you can use it to extend auto-discovery behavior.
SIGAR includes support for Linux, FreeBSD, Windows, Solaris, AIX, HP-UX and Mac OSX across a variety of versions and architectures. Users of the SIGAR API are given portable access to inventory and monitoring data including:
- 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 information and metrics
- Network route and connection tables
This is ruby binding for the core API, which is implemented in pure C.
There are three methods to install ruby-sigar
on Ubuntu 18.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install ruby-sigar Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install ruby-sigar
using apt-get
by running the following command:
sudo apt-get -y install ruby-sigar
Install ruby-sigar Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install ruby-sigar
using apt
by running the following command:
sudo apt -y install ruby-sigar
Install ruby-sigar Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install ruby-sigar
using aptitude
by running the following command:
sudo aptitude -y install ruby-sigar
How To Uninstall ruby-sigar on Ubuntu 18.04
To uninstall only the ruby-sigar
package we can use the following command:
sudo apt-get remove ruby-sigar
Uninstall ruby-sigar And Its Dependencies
To uninstall ruby-sigar
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove ruby-sigar
Remove ruby-sigar Configurations and Data
To remove ruby-sigar
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge ruby-sigar
Remove ruby-sigar configuration, data, and all of its dependencies
We can use the following command to remove ruby-sigar
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge ruby-sigar
References
Summary
In this tutorial we learn how to install ruby-sigar
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.