The iostat command stands for input-output statistics. This command is used to generate input-output statistics for device, partitions the network file system, generate the report for Central Processing Unit (CPU). When the system booted, iostat command generates the first report. Each report follows the same time as the previous one. These report followed by the CPU statistics. When you consider a multi-processor system, the CPU statistics are calculated by average all processor. Each interval parameter takes to generate the report in seconds; we can specify ‘count’ parameter the junction point of each interval parameter. Before using the iostat command, you need to install Sysstat package. Sysstat package help to configure iostat command and you need to check the latest version of iostat are available on your system or not. Sysstat store different type of commands like 1) sar command 2) sadc 3) a1 4) sa2 5) iostat 6) mpstat etc. Syntax for iostat command $iostat <options> <device name> 1.Cpu and Device utilization statistics: In this article, if you only display the information about CPU usage, input-output statistics, then use the simple iostat command. The syntax is given below: $iostat Example 1: [linuxnix@fedori ~]$iostat Linux 220.127.116.11-106.fc14.i686 (fedori) 07/19/2016 _i686_ (1 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 6.38 9.74 10.47 1.86 0.00 71.55 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 7.67 23.85 64.13 989350866 2659823200 sdc 0.00 0.00...Read More
Author: Surendra Anne
According to the official website of firewalld, “Firewalld provides a dynamically managed firewall with support for network/firewall zones that define the trust level of network connections or interfaces. It has support for IPv4, IPv6 firewall settings, ethernet bridges, and IP sets. There is a separation of runtime and permanent configuration options. It also provides an interface for services or applications to add firewall rules directly.”. So it’s a tool for managing firewall on Fedora/CentOS/RHEL/Debian/Ubuntu and many other famous Linux operating systems along with iptables. You can find more about firewalld at firewalld.org. Let’s see how to use firewalld. Installing firewalld on CentOS/RHEL/Fedora: The firewalld program should install on CentOS/RHEL/Fedora systems by default. Installing firewalld on Ubuntu/Debian By default, firewalld program is not installed on Debian/Ubuntu based systems. But you can easily install it by running the following commands. surendra@linuxnix$ sudo apt-get update surendra@linuxnix$ sudo apt-get install firewalld The architecture of firewalld Program: The firewalld program has two parts. The daemon that runs in the background. The firewall-cmd command to add, modify, remove firewall rules. How firewalld works: The firewalld defines several zones, and each zone has its own interfaces and own rules. The firewall-cmd command can be used to add, modify, remove zones, interfaces from the zones, allow or deny ports for zones. Benefits of firewalld: The most significant advantage of firewalld is that firewalld daemon doesn’t have to...Read More
The sleep is one of the commonly used commands in many shell scripts. The other commands which we frequently use in shell scripts are an echo, read, print commands etc. In this post, we will cover sleep command and TMOUT system variable which are helpful in delaying execution in What is the use of sleep command in Linux? The only purpose of sleep command is to block or delay the execution of a particular script for a defined amount of time. This is a useful mechanism where you have to wait for a specific operation to complete before the start of other activity in your shell scripts. For example, you just start a service in a shell script, and that may take some time to show some results for another command. In these cases, sleep command is used to delay of execution of next command. We can customize how many seconds or minutes or hours or days you can pause the subsequent command execution. Sleep command syntax in Linux sleep NUMBER[SUFFIX]... sleep OPTION Let us take one example to understand this. Observe below simple shell script where we execute it without sleep and with sleep command. The time taken for both the scripts can be calculated using time command. #!/bin/bash echo "Hello World." echo "Goodbye" Execute above script to see how much time it takes. root@linuxnix:~/sh# bash lets_sleep.sh Hello World....Read More
Take this course
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.