command

ss command in Linux

1. ss command The ss command gives the socket statistics. It gives information about the network connections. ss is a replacement for the netstat command. By default, the ss command gives information about non-listening sockets. $ ss Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port u_str ESTAB 0 0 * 4482 * 4481 u_str ESTAB …

ss command in Linux Read More »

iptables command in Linux

1.0 iptables The iptables command is for defining rules for packet filtering for establishing and configuring firewalls in Linux. iptables, also, helps in configuring the Network Address Translation (NAT) for placing a local area network behind a single public IP address for accessing the Internet and for other uses. The network communication takes place in …

iptables command in Linux Read More »

netstat

1. netstat command The netstat command in Linux provides network statistics and information about the networking subsystem. It gives information about network connections, routing tables and network interface statistics. For example, $ netstat Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 myhost.local:53744 mail.example.i:imaps ESTABLISHED tcp 0 0 …

netstat Read More »

pidstat

The best way to use pidstat is to pass a list of process ids with the -p parameter. The -u option reports CPU utilization. The -l parameter displays the process command name and its arguments. And we can optionally put time interval in seconds for the interval between reports and again, optionally, a count for …

pidstat Read More »

mpstat

The mpstat command in a Linux or Unix system gives the processor related statistics. mpstat is a part of the sysstat package for performance monitoring under Linux. The mpstat command gives the CPU utilization report and the hardware and software interrupts per second for each processor. By default, the CPU utilization report is printed. For …

mpstat Read More »

iostat

The iostat command is for getting the CPU and input-output devices' statistics for Linux and Unix systems. For example, $ iostat Linux 3.0.0-14-generic (hostname) Wednesday 06 June 2012 _i686_ (2 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 17.38 0.13 3.13 1.63 0.00 77.74 Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sda 11.78 111.65 69.79 11663838 …

iostat Read More »

vmstat

The vmstat command prints the system virtual memory statistics for Linux and Unix systems. vmstat prints information about system processes, memory, swap, I/O blocks, interrupts and context switches and the CPU activity. The most common command format is, vmstat [delay [count]] The optional delay parameter tells the time interval between periodic vmstat outputs. If the …

vmstat Read More »

Finding the free and used memory with the free command

Using the free command, the free and used memory in a Linux or Unix system can be found. The free command can be given from the command line as, free And the system responds with an output like, total used free shared buffers cached Mem: 960268 873136 87132 0 14652 168884 -/+ buffers/cache: 689600 270668 …

Finding the free and used memory with the free command Read More »