Author: Sahil Suri

7 mpstat command examples in linux

The ability to accurately measure CPU usage of a system is essential to ensure optimal operation of the applications or databases running on that system. The mpstat Linux command is a utility that collects and displays information about CPU utilization and performance statistics. To view which processes on the system are using more CPU resources, use the Linux top command. The mpstat binary is part of the sysstat package which also provides the sar command utility. Use Linux which command to see if mpstat command is available or not. [[email protected]:~] $ which mpstat /usr/bin/mpstat [[email protected]:~] $ rpm -qf /usr/bin/mpstat sysstat-9.0.4-33.el6.x86_64 Use mpstat -V command to view the version of mpstat installed on your system. [[email protected]:~] $ mpstat -V sysstat version 9.0.4 (C) Sebastien Godard (sysstat <at> orange.fr) We’ll now go over some examples to help us understand how to use the mpstat command in Linux. Example 1: Executing the mpstat command without any options. Like most utilities provided by sysstat, mpstat has some options that can be used with the command. When the mpstat command is run without any option we see the below output: [[email protected]:~] $ mpstat Linux 2.6.32-696.6.3.el6.x86_64 (linuxnix.com) 10/28/2017 _x86_64_ (6 CPU) 09:14:38 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 09:14:38 AM all 29.39 0.00 1.66 12.04 0.00 0.12 0.00 0.00 56.79 In case you get a “command not found error“, then your system is probably missing...

Read More

How to integrating Prometheus with Grafana

In an earlier article, we demonstrated the installation and setup of Prometheus, a lightweight, and user-friendly open source monitoring tool. In this article, we will show you how to integrate data collected by Prometheus with Grafana to create beautiful dashboards. Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus, and InfluxDB. Before proceeding with the installation let us go over some of its features: Features of Grafana Grafana provides a wide variety of visualization options to help you understand your data. These data visualization offerings include heatmaps, histograms, graphs, geomaps etc. You can use grafana to define alert thresholds visually and get notified via Slack, PagerDuty or other tools in case a threshold breaches. It allows you to import data from multiple sources and visualize the data centrally through grafana. Grafana has numerous plugins available thereby giving users immense scope for customization. Dashboards created using grafana can be shared among teams promoting more collaboration. Grafana can seamlessly integrate with an organization’s existing authentication mechanism. Grafana supports multi-tenancy. Setup multiple organizations that each can have their own admins define their own data sources, dashboards and users. Grafana includes power user preferences including the option to select from dark or white themes, set your home dashboard, change timezones and more. With a basic understanding of what grafana is and it’s important features, we’ll...

Read More

How to setup prometheus monitoring tool on Centos 7

What is Prometheus? Prometheus is an open source monitoring tool which was developed in 2012. Its architecture is modular and comes with several readily available modules called exporters, which help you capture metrics from popular software. Prometheus is written in the Go language and stores its captured data in a time series database (A time series database is optimized for handling data points indexed by time). Prometheus offers a versatile and customizable interface allowing system administrators to heavily tune the metrics they want to measure and also enhance the accuracy of measurement. Prometheus’s main features are: a multi-dimensional data model with time series data identified by metric name and key/value pairs a flexible query language to leverage this dimensionality no reliance on distributed storage; single server nodes are autonomous time series collection happens via a pull model over HTTP pushing time series is supported via an intermediary gateway targets are discovered via service discovery or static configuration multiple modes of graphing and dashboard creation support Basic architecture Prometheus The below diagram illustrates the basic architecture of the Prometheus ecosystem and where different components fit together. Note that each Prometheus server is standalone, not depending on network storage or other remote services. With a basic understanding of Prometheus architecture, we now proceed to install and set it up on a Centos 7 system. Step 1: Download Prometheus software from GitHub. We’ll use wget to download...

Read More

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.