
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Netdata: Real-Time Performance Monitoring Tool for Linux Systems
Netdata is an enormously optimized Linux utility that presents real-time (per 2nd) efficiency monitoring for Linux techniques, applications, SNMP devices, etc. And shows full interactive charts that certainly renders all collected values over the web browser to investigate them. This article explains about how to find a real-time performance monitoring tool for Linux Systems.
Features
It monitors total and per Core CPU usage, interrupts, softirqs and frequency.
It monitors Memory, RAM, Swap and Kernel usage.
It monitors Disk I/O (per disk: bandwidth, operations, backlog, utilisation, etc).
It monitors Network interfaces including: bandwidth, packets, errors, drops, etc).
It monitors Netfilter / iptables Linux firewall connections, events, errors, etc.
It monitors processes (running, blocked, forks, active, etc).
It monitors system Applications with the process tree (CPU, memory, swap, disk reads/writes, threads, etc).
Apache and Nginx Status monitoring with mod_status.
MySQL database monitoring: queries, updates, locks, issues, threads, etc.
It monitors Postfix email server message queue.
Squid proxy server bandwidth and requests monitoring.
It monitors Hardware sensors (temperature, voltage, fans, power, humidity, etc).
It monitors SNMP devices.
Earlier than you installing netdata utility, be certain you’ve these basic construct atmosphere packages mounted on the system, if not install it. Use the next command to put in general construct environment-
$ sudo apt-get install zlib1g-dev gcc make git autoconf autogen automake pkg-config
The sample output should be like this –
Reading package lists... Done Building dependency tree Reading state information... Done gcc is already the newest version (4:5.3.1-1ubuntu1). gcc set to manually installed. make is already the newest version (4.1-6). make set to manually installed. pkg-config is already the newest version (0.29.1-0ubuntu1). pkg-config set to manually installed. The following additional packages will be installed: autogen-doc autotools-dev git-man liberror-perl libopts25 libopts25-dev libsigsegv2 m4 Suggested packages: autoconf-archive gnu-standards autoconf-doc libtool git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn The following NEW packages will be installed: autoconf autogen autogen-doc automake autotools-dev git git-man liberror-perl libopts25 libopts25-dev libsigsegv2 m4 zlib1g-dev 0 upgraded, 13 newly installed, 0 to remove and 7 not upgraded. Need to get 6,721 kB of archives. After this operation, 35.2 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libsigsegv2 amd64 2.10-4 [14.1 kB] Get:2 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB] Get:3 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB] Get:4 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libopts25 amd64 1:5.18.7-3 [57.8 kB] Get:5 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 libopts25-dev amd64 1:5.18.7-3 [93.0 kB] Get:6 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 autogen amd64 1:5.18.7-3 [550 kB] .................................................................................................
Clone the netdata repository from git and run the following command to install netdata installer script to build it.
$ sudo git clone https://github.com/firehol/netdata.git --depth=1
The sample output should be like this-
Cloning into 'netdata'... remote: Counting objects: 253, done. remote: Compressing objects: 100% (241/241), done. remote: Total 253 (delta 10), reused 137 (delta 1), pack-reused 0 Receiving objects: 100% (253/253), 1.33 MiB | 471.00 KiB/s, done. Resolving deltas: 100% (10/10), done. Checking connectivity... done.
Now enter into netdata directory and install netdata installer, using following commands-
$ cd netdata $ sudo ./netdata-installer.sh
The sample output should be like this –
Welcome to netdata! Nice to see you are giving it a try! You are about to build and install netdata to your system. It will be installed at these locations: - the daemon at /usr/sbin/netdata - config files at /etc/netdata - web files at /usr/share/netdata - plugins at /usr/libexec/netdata - cache files at /var/cache/netdata - log files at /var/log/netdata - pid file at /var/run This installer allows you to change the installation path. Press Control-C and run the same command with --help for help. Press ENTER to build and install netdata to your system > :----------------------------------------------------------------------------- Running command: ./autogen.sh autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf --force autoreconf: running: /usr/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:33: installing './compile' configure.ac:32: installing './config.guess' configure.ac:32: installing './config.sub' configure.ac:31: installing './install-sh' configure.ac:31: installing './missing' src/Makefile.am: installing './depcomp' autoreconf: Leaving directory `.' :----------------------------------------------------------------------------- Running the command: ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-zlib --with-math --with-user=netdata CFLAGS=-O3 checking whether to enable maintainer-specific portions of Makefiles... no checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking if compiler needs -Werror to reject unknown flags... no checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking for uint8_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for inline... inline checking for sin in -lm... yes checking for ZLIB... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating charts.d/Makefile config.status: creating conf.d/Makefile config.status: creating netdata.spec config.status: creating node.d/Makefile config.status: creating plugins.d/Makefile config.status: creating src/Makefile config.status: creating system/Makefile config.status: creating web/Makefile config.status: creating contrib/Makefile .............................................
To start netdata, use the following command –
# /usr/sbin/netdata
Now open your favorite web browser and type the following url –
http://127.0.0.1:19999/
The sample output should be like this –
To stop the netdata, use the following command –
$ sudo killall netdata
You can also view the running configuration of netdata at any time, by using following url-
http://127.0.0.1:19999/netdata.conf
The sample output should be like this –
# NetData Configuration # You can uncomment and change any of the options below. # The value shown in the commented settings, is the default value. # global netdata configuration [global] # config directory = /etc/netdata # plugins directory = /usr/libexec/netdata/plugins.d # web files directory = /usr/share/netdata/web # cache directory = /var/cache/netdata # log directory = /var/log/netdata # host access prefix = # debug flags = 0x00000000 # memory deduplication (ksm) = yes # debug log = /var/log/netdata/debug.log # error log = /var/log/netdata/error.log # errors flood protection period = 1200 # errors to trigger flood protection = 200 # access log = /var/log/netdata/access.log # memory mode = save # hostname = linux # history = 3600 # update every = 1 # pthread stack size = 8388608 # run as user = netdata # web files owner = netdata # web files group = netdata # http port listen backlog = 100 # port = 19999 # ip version = any # bind socket to IP = * # disconnect idle web clients after seconds = 60 # enable web responses gzip compression = yes [plugins] # tc = yes # idlejitter = yes # proc = yes # cgroups = yes # checks = no # plugins directory = /usr/libexec/netdata/plugins.d # enable running new plugins = yes # check for new plugins every = 60 # apps = yes # charts.d = yes # node.d = yes # per plugin configuration [plugin:tc] # script to run to get tc values = /usr/libexec/netdata/plugins.d/tc-qos-helper.sh # enable new interfaces detected at runtime = yes # cleanup unused classes every = 60 [plugin:idlejitter] # loop time in ms = 20
To update the netdata, use the following commands –
# cd /path/to/netdata.git # git pull # ./netdata-installer.sh
Congratulations! Now, you know “Netdata – A Real-Time Performance Monitoring Tool for Linux Systems”. We’ll learn more about these types of commands in our next Linux post. Keep reading!