Tag: Linux

Terraform set timezone upon virtual machine creation

Sometimes it’s important to set proper timezone on the server and recently I’ve got this task: set proper timezone automatically based on the server’s location in Azure Cloud. Moreover, I needed timezone to be set automatically by Terraform upon virtual machine creation.  In my case I had Ubuntu VMs in Azure and here is the …

Continue reading

How to copy directory with SCP

The Unix command scp (which stands for “secure copy protocol”) is a simple tool for uploading or downloading files (or directories) to/from a remote machine. The transfer is done on top of SSH, which is how it maintains its familiar options (like for specifying identities and credentials) and ensures a secure connection. It’s really helpful …

Continue reading

Linux shell modes and Capistrano

This is possibly one of the most complicated support questions that can be asked, the only real answer is it depends. It’s really a question of which kind of shell Capistrano is using, it’s a matrix of possibilities concerning login, non-login, interactive, or non-interactive. By default Capistrano always assigns a non-login, non-interactive shell.

Continue reading

How to store /var on a separate partition

What is the correct way to store /var on a separate partition? First prepare a new partition (e.g. with parted or fdisk and mkfs). For example, let’s create a new partition in fdisk:

then choose n for the new partition and go through configuration steps. choose w at the end to write changes to …

Continue reading

ORA-09925: Unable To Create Audit Trail File

Upon trying to start Oracle database service I got the following ORA-09925 error in $DB_HOME/startup.log file

The same ORA-09925 error when I tried to log on to SQL*Plus.

Continue reading

How to move disk space from LVM partition to another

Default LVM partitioning in Linux may not be optimal for some tasks. For example, root partition can be too small and filled up after some time while home partition is large and almost unused. In this case one obviously would want to transfer some amount of space from /home to / partitions. Consider the following …

Continue reading

Rescue a CentOS system with GRUB

GRUB (Grand Unified Bootloader)  is the most widely used bootloader among Linux operating systems (OS) but it can boot any OS. GRUB main functionality is to allow users to select between different operating systems to boot. As bootloader GRUB is installed on the MBR (Master Boot Record) and additionally to allow us to select different …

Continue reading

Disable send_redirects or NETKEY

disable-sendredirects

During the process of a VPN client configuration with xl2tpd and openswan ipsec verify command threw the following error: Disable /proc/sys/net/ipv4/conf/*/send_redirects or NETKEY will act on or cause sending of bogus ICMP redirects! To fix this we need to disable send_redirects and save changes in /etc/sysctl.conf so they will be permanent across reboots. Here is …

Continue reading

10 Practical Sar Usage Examples

There are two ways to invoke sar. sar followed by an option (without specifying a saXX data file). This will look for the current day’s saXX data file and report the performance data that was recorded until that point for the current day. sar followed by an option, and additionally specifying a saXX data file …

Continue reading

Generate CPU, Memory and I/O report using SAR command

SAR stands for System Activity Report, as its name suggest sar command is used to collect,report & save CPU, Memory, I/O usage in Unix like operating system. SAR command produce the reports on the fly and can also save the reports in the log files as well. In this article we will discuss different examples …

Continue reading

Load more