We have seen how to create variables – integer, float, or character types, each variable is given a unique name and you can store one item under that name. Often, however, we need several similar items to be grouped under a single name. For example, marks scored by a student in different subjects, the salaries […]
Archives for July 2021
Control Structures of C – for, while and do loops, if then else statements, switch statements
Here we learn about the control structures of C. The compiler normally takes the program line by line and executes them in a sequence ( one after another ). But this may not always be the case. Based on certain conditions existing in the data, we may want to change the data – Then we […]
How to Setup SSH keys for SSH “public/private key” Login On Linux
1. Login as the user that you want to setup the ssh keys, in this case we are using user test1. 2. Create a private and public key: [test1@server4 ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/test1/.ssh/id_rsa): Created directory ‘/home/test1/.ssh’. Enter passphrase (empty for no passphrase): Enter […]
How to Convert PuTTY’s private key (.ppk) to SSH key
1. Launch PuTTY Key Generator (puttygen.exe) 2. Click on the File → Load private key and select your PuTTY’s key file, which normally ends with .ppk extension. 3. Enter the key’s passphrase if prompted. 4. Detail of the imported key will be displayed. 5. Go to Conversions → Export OpenSSH key from the menu. 6. […]
How To Configure Timeout On SSH Client Putty
Question: How to configure timeout on PUTTY to keep alive the ssh session? The SSH Connection has timeout due to inactivity at the TCP communications level where the server will decide to disconnect if it sees no activity on the connection for a certain amount of time. In order to configure timeout in Putty, check […]
Fundamentals of C Variables, data types, arithmetic expressions and Library functions
C has evolved from a succession of programming languages developed by Bell Laboratories in the early 1970s. The increasing popularity of the unix operating system, which has C as its “Standard” programming language, further enhanced the usefulness of C making it arguably the most popular of the programming languages. We now start with the fundamentals […]
Couldn’t find device with uuid [UUID] – LVM Not Active on Reboot
The Problem After a reboot the system will not start or activate one of the LVM volume groups. Trying to activate the group manually produces the message: Couldn’t find device with uuid ‘[UUID]’ The Solution The string LABELONE at the metadata location marks the device as being part of an LVM device. Without this string, […]
How To Check Current Values for Kernel Tuning Parameters in CentOS/RHEL
Question: How to check to current values for these kernel parameters? net.core.netdev_max_backlog fs.file-max net.ipv4.tcp_max_syn_backlog net.core.somaxconn The linux system could not support to method for directly check these values but we can check to using by below commands : # netstat -an | grep -c SYN_RECV # netstat -s Also, those parameter can be checked from […]
How to calculate recommended value of vm.min_free_kbytes Kernel Tuning Parameter
/proc/sys/vm/min_free_kbytes: This controls the amount of memory that is kept free for use by special reserves including “atomic” allocations (those which cannot wait for reclaim). Setting vm.min_free_kbytes too low prevents the system from reclaiming memory. This can result in system hangs and OOM-killing multiple processes. However, setting this parameter to a value that is too […]
how to rotate Tang Server Keys and update the Clevis Client
This post explains how to rotate Tang Server Keys and update the Clevis Client. Note, below is an example hence all certificates, keys and device names/uuid’s are fictional. Change the keys on the tang server 1. Check existing key: # ls -la /var/db/tang total 8 dr-xrws—. 2 tang tang 84 Jun 26 11:24 . drwxr-xr-x. […]