System administration

systemd – System and service manager in Linux

1.0 Introduction systemd is the newer init system used in most Linux distributions since 2015. The first widely used init system was the System V init process, sysvinit. Ubuntu introduced the Upstart init system with Ubuntu 6.10 in 2006. Ubuntu fully migrated to systemd with Ubuntu 15.04 in 2015. Indeed, we can see that /sbin/init …

systemd – System and service manager in Linux Read More »

Syslog

1.0 Syslog Syslog is a protocol for conveying event notification messages. Syslog was first developed by Eric Allman for logging as a part of the Sendmail project in the 1980s. It soon became a de-facto standard for logging on Unix-like systems. Syslog was formally specified in RFC 3164 in 2001 as “The BSD syslog Protocol” …

Syslog Read More »

logrotate

Linux daemons write log files. Left to itself, these log files would grow with time and take up the disk space. It is necessary to purge the log files periodically so that the disk space is conserved and is available for smooth running of the system. logrotate is a utility for rotation, compression, removal and …

logrotate Read More »

sar command in Linux

The sar command under Linux and Unix systems gives the system activity reports. As the system works, a record of activities is kept in certain counters in the kernel. The sar command gives statistics regarding the CPU, I/O, paging, devices, memory, swap space, network, run queue length and load average, interrupts and power management. At …

sar command in Linux 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 »