I am here to share my knowledge in Linux with all.The opinions expressed and topics discussed on this blog are my own and don't necessarily reflect those of my employer.
Tuesday, September 21, 2021
Ansible Playbook to collect uptime of servers
Wednesday, May 12, 2021
How to copy block of lines to end of file through Ansible
Following playbook can be used to push block of lines in list.cfg(in this case) to nrpe.cfg at End of file.
We can push to many number of servers from single ansible Control node.
---
- name: copy the repo
hosts: localhost
tasks:
- blockinfile:
block: "{{ lookup('file', 'list.cfg') }}"
dest: /etc/nagios/nrpe.cfg
backup: yes
register: output
Monday, November 24, 2014
Wednesday, November 19, 2014
Quiz3 - RHEL7 Introduction
Quiz2 - Red Hat Linux
Quiz1 - Red Hat Linux
Thursday, August 14, 2014
Recovering Ubuntu after loading windows in dual booting environment
How to recover Ubuntu 10 after installing windows in dual booting environment?
Setup:
Machine with 2 disks and Ubnutu 10 and Windows xp installed in second disk /dev/sdb. Due to some problem in Windows, reinstalled the windows XP. After re-installation, ubuntu grub is over writen by windows and only windows is booting.
Procedure to recover:
1. Boot through Ubnutu Live CD
2. Type $ sudo fdisk -l to confirm the disk availbility.
3. Here Ubuntu is installed in /dev/sdb7 which is / partition and /dev/sdb8 is swap and /dev/sdb1 is windows partition.
4. For modifying Grub, root partition to be mounted first.
$ sudo mount /dev/sdb7 /mnt
5. For installing grub on /dev/sdb , give following command,
$ sudo grub-install --root-directory=/mnt /dev/sdb
6. Rebooted the machine. Now grub options coming for Ubnutu. But If we select windows, it gives "Insert system disk" error and was not booting.
7. Now booted in Ubnutu OS and given following command for updating grub.
$ sudo update-grub2
8. Restared the desktop now and verified both Ubnutu and windows XP booting.
9. Problem solved.
Tuesday, August 5, 2014
SSL Certificate Signing Request
Monday, May 26, 2014
Dropped RX packets in ifconfig output
inet addr:192.168.39.170 Bcast:192.168.39.255 Mask:255.255.255.0
inet6 addr: fe80::21c:c4ff:fe96:deea/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5307978 errors:0 dropped:34356 overruns:0 frame:0
TX packets:1522673 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1775345955 (1693.1 Mb) TX bytes:967976568 (923.1 Mb)
Interrupt:169 Memory:dc000000-dc012100
version: 1.6.7c
license: GPL
description: Broadcom NetXtreme II BCM5706/5708 Driver
author: Michael Chan
srcversion: D41ADC8BC49443A4DAE505E
alias: pci:v000014E4d0000163Asv*sd*bc*sc*i*
alias: pci:v000014E4d00001639sv*sd*bc*sc*i*
alias: pci:v000014E4d000016ACsv*sd*bc*sc*i*
alias: pci:v000014E4d000016AAsv*sd*bc*sc*i*
alias: pci:v000014E4d000016AAsv0000103Csd00003102bc*sc*i*
alias: pci:v000014E4d0000164Csv*sd*bc*sc*i*
alias: pci:v000014E4d0000164Asv*sd*bc*sc*i*
alias: pci:v000014E4d0000164Asv0000103Csd00003106bc*sc*i*
alias: pci:v000014E4d0000164Asv0000103Csd00003101bc*sc*i*
depends:
supported: yes
vermagic: 2.6.16.60-0.33-xenpae SMP Xen 686 REGPARM gcc-4.1
parm: disable_msi:Disable Message Signaled Interrupt (MSI) (int)
Thursday, May 15, 2014
How to transfer files through ftp without affecting the integrity of file?
Login to FTP Server and always select BINARY mode for transferring files.
This will allow the system to transfer files properly. Once transferred, file integrity i.e. chksum md5 value can be checked using md5sum command.
Both source file and destination files will show same md5sum value.
Wednesday, November 7, 2012
YUM Configuration fom RHEL 5 Onwards
Ansible Playbook to collect uptime of servers
Hi, This is to explain how we can write a small playbook to collect uptime of all servers in our environment. We can use our own server l...
-
Operating system: RHEL 5 Problem: Network card driver is not getting installed in RHEL 5 Error: If the command # make install is gi...
-
Hi, This is to explain how we can write a small playbook to collect uptime of all servers in our environment. We can use our own server l...
-
iptables - Administration tool for IPv4 packet filtering and NAT Iptables is used to set up, maintain, and inspect the tables of IP packe...