Wednesday, June 17, 2015
Resolve Leap Second Issues in Red Hat Enterprise Linux
Leap seconds are a periodic one-second adjustment of Coordinated Universal Time(UTC) in order to keep a system's time of day close to the mean solar time. However, the Earth's rotation speed varies in response to climatic and geological events, and due to this, UTC leap seconds are irregularly spaced and unpredictable. This article seeks to provide information regarding the leap seconds themselves, along with addressing how Red Hat Enterprise Linux handles the insertion of one.
The next leap second insertion is scheduled for June 30th, 2015 at 23:59:60 UTC.
Systems running any version of Red Hat Enterprise Linux should automatically account for leap second corrections if they are using the NTP (Network Time Protocol) daemon to synchronize their local timekeeping with an NTP server. During the last day before a leap second correction, NTP servers should notify their clients that a leap second will occur, and at 23:59:59 UTC, the Linux kernel should add or remove an extra second by making the 60th second occur twice or removing it entirely.
Tuesday, May 26, 2015
This script uses command line arguments ($1 and $?) and tail out the /root/error.txt file.
#usage of command line arguments
#usage of command line arguments
rm $1 2>>/root/error.txt
if [ $? -eq 0 ]
echo " Success "
tail -1 /root/error.txt
The following script clear screen and update the date every second. So it seems like the running digital clock.
#running digital clock
#running digital clock
while [ : ]
Saturday, May 23, 2015
A single line script / command to find the particular file exists or not.
# test -f a.txt && echo "File exists" || echo "File does not exist"
#simple script to find out the file exists or not
if [ -f $1 ]
echo " $1 exists "
echo " $1 does not exist"
Script usage: ./filecheck filename
Well, here we are. After six busy months, one beta and a bunch of minor changes, the final stable release of Ubuntu 15.04 is now ready for you to download.
The bug fixes, improvements in usability and a fresh serving of software updates add up to a somewhat substantive total, creating a release that feels more polished than ever.
Enough chatter. Let’s dive in and see what’s new in Ubuntu 15.04.
Ubuntu 15.04 – New Features
‘You may notice a change in boot speed [because of Systemd]…’
The headline change in Ubuntu 15.04 is the introduction of the Systemd init system at boot-time.
This is the software that initializes (hence the name ‘init’) first when booting, and handles loading of the various modules and background processes that make much of a modern computer operating system do what it needs to.
Ubuntu previously used Upstart, its own custom-made Init system, at boot time. When Debian, the Linux distribution that Ubuntu is built upon, chose to adopt Systemd Ubuntu understandably fell in line.
Upstart is available in 15.04. It’s included as a fallback in GRUB and is used for controlling user sessions.
The merits (or lack thereof) of the switch are largely moot for the less technically minded. It is possible that some users will notice a slight change in boot speed depending on their configuration.
Locally Integrated Menus Are Now Default
Menus can now be set to ‘always show’
The Unity desktop environment used by default in Ubuntu 15.04 receives a handful of small refinements, most of which aim to either fix bugs or correct missteps in earlier versions.
For example, application menus can now be set to ‘Always Show’.
Yeah; you no longer have to push your mouse to the top of the screen to show the ‘File’, ‘Edit’, ‘Help’, etc menus — not if you don’t want to.
If you prefer having your applications menus available inside application windows use the toggle in System Settings > Appearance > Behaviour to set things up how you like.
These “locally integrated menus”, introduced in 14.10, also support the ‘Always Show’ feature and showing up on mouseover of unfocused windows.
Other improvements to Unity in Vivid Vervet include a fix for showing the overlay elements (HUD, Dash, etc) over fullscreen windows and small adjustments to the speed of login and logout animations.
Powering the Unity desktop experience is Compiz, the tried-and-trusted window manager. In keeping with the rest of this release the changes it gets are modest and made up of bug fixes and compatibility with alternative desktop environments.
Ubuntu Linux Kernel 3.19
While not based on the latest version of the Linux Kernel Ubuntu 15.04 ships with a modified version of 3.19.3 one. Expect a few updates to the most recent 3.19.x patch releases shortly after release.
New and updated apps feature, including Rhythmbox
You’ll also find updated versions many of Ubuntu’s default apps, including the latest Firefox web-browser and Thunderbird e-mail client, a new version of the Rhythmbox music player plus an entirely revamped Totem video player.
GNOME Terminal 3.14
New Default Wallpaper
suru desktop wallpaper ubuntu vivid
The new Ubuntu 15.04 Wallpaper
Ubuntu’s default wallpaper choice is irrelevant to some, integral to others. Whatever side of the fence you sit on the new wallpaper is palatable enough. After all: first impressions count.
Expect to see this new design flash up in various ‘Ubuntu in the wild’ posts over the next six months!
Having been formally introduced in last October’s release the ‘Ubuntu Developer Tools Center’ has undergone a number of changes for Vivid, including being renamed as the more memorable ‘Ubuntu Make’.
Ubuntu Make simplifies the process of installing a host of developer-focused tools, editors, libraries and software development kits including the Android SDK, IDEA, PyCharm, and the new Firefox Developer Edition.
Improvements to the way library managers behave now allows multiple system libraries to be run/used without conflict.
- SSH connection refused –start the sshd service in client side
- Fsck usage
Q. Can I run fsck or e2fsck command when Linux file system is mounted? Do you advice to run fsck on a live file system? I am using Cent OS.
A. No. Do not run fsck on a live or mounted file system. fsck is used to check and optionally repair one or more Linux file systems. Running fsck on a mounted filesystem can usually result in disk / data corruption. So please do not do it. You have two choices
(a) Take down system to single user mode and unmout system
(a) Take down system to single user mode and unmout system
- Xfs port number 7100
- iptables –F flushing iptable rules
- Sendmail configuration file /etc/mail/sendmail.cf,
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
- No of hosts in class b
Total # Of Bits For Network ID / Host ID
First Octet of IP Address
# Of Network ID Bits Used To Identify Class
Usable # Of Network ID Bits
Number of Possible Network IDs
# Of Host IDs Per Network ID
8 / 24
8-1 = 7
27-2 = 126
224-2 = 16,277,214
16 / 16
16-2 = 14
214 = 16,384
216-2 = 65,534
24 / 8
24-3 = 21
221 = 2,097,152
28-2 = 254
- What is the default permission for printer spooler service?
620 – read write – write- no perminssion
- File string delete – sed command
- What is the advantage of N+1 and one to one cluster?
The advantages of the N + 1 model are that the server load can be distributed to multiple nodes and that only one backup node is necessary to sustain all the possible node failures. Thus, the machine idle ratio is 1/N as opposed to 1/1, as is the case in a single asymmetric model.
- Block level for NAS (Network Attached SCSI) NAS is file level, SAN & DAS are block level
- Which cluster has the critical application? Application cluster
- What is the security protocol in SAN? LUN masking, zoning - In a storage area network (SAN), zoning is the allocation of resources for device load balancing and for selectively allowing access to data only to certain users.
- ls *.txt
- iostat which field the processing of time waiting ? 4 th field %iowait
- rpm to deb what is the package? alien rpm
- How to find send/receive of eth0 statistics? ethtool -S eth0, netstat -e
- What is not a routable protocol? Bootp, tcp, arp, rarp
- CD drive protocol – ATAPI (ATA Packet Interface)
- What is the single point of failure in cluster network?
A single point of failure (SPOF) is a part of a system that, if it fails, will stop the entire system from working. They are undesirable in any system with a goal of high availability or reliability, be it a business practice, software application, or other industrial system.
Systems can be made robust by adding redundancy in all potential SPOFs. For instance, the owner of a small tree care company may only own one wood chipper. If the chipper breaks, he may be unable to complete his current job and may have to cancel future jobs until he can obtain a replacement.
Redundancy can be achieved at various levels. For instance, the owner of the tree care company may have spare parts ready for the repair of the wood chipper, in case it fails. At a higher level, he may have a second wood chipper that he can bring to the job site. Finally, at the highest level, he may have enough equipment available to completely replace everything at the work site in the case of multiple failures.
The assessment of a potential SPOF involves identifying the critical components of a complex system that would provoke a total systems failure in case of malfunction. Highly reliable systems should not rely on any such individual component.
- File which is accessible by any process? lsof,top,ps,all the above
- echo ENV_VAR what is the output? Same output
- iostat –x What is the output? Disk utilization in linux
- need to forward mails
- send mail alias file? /etc/aliasis
- What is the maxpv size in LVM? 2TB PE size 4MB
- Where we install platform in the cloud?Infrastructure or platform
- NTP expansion – Network Time Protocol (123-port no)
- Advantages of LVM2 (read & write and snapshot)
- Partition type of lvm – partition id 08e
- Authorize server usage in DNS – Master/ slave a &b
- Not included in DNS = restricted zero/ standard primary
- Not benefits in clouding = regulatory
- 3rd party / partners in for incident report
- Password reset is incident management true
- Commands to display vgs – vgs, vgdisplay
- How to run bourne again scripts ./scriptname.sh
- 2 types of zoning in storage – hard zone and soft zone
- Command to list route – route –n, netstat –r
- Merits of resizefs over ext2 – revision control
- One public network down what to do? Remedy
Additional questions:1) How to reduce the lvm, or How to reduce vg? lvreduce -L -200G /dev/vg0/lv0
2) What is the layer nfs supported? Application layer
3) What is the configuration file for squid? /etc/squid/squid.conf
4)Which class multicast is supported class D
5)What is the port no for NIS and NFS ? NFS 2049 NIS
6) How to exit the crontab with saving the command?esc:wq
7) crontab entries – min hours date month day command
8) DNS config file /var/named/chroot/etc
9) What is the use of DAS? Direct-attached storage (DAS) is computer storage that is directly attached to one computer or server and is not, without special support, directly accessible to other ones.
10) How to check the socket details? lscpu | grep 'socket' dmidecode
- How to disallow the query from DNS? RFC 1035 transaction signature
- How to delete package using dpkg? dpkg –r package name
- What is the reconfiguration file in RHEL? sys-unconfig
- Block size 8192 mount thru NFS? mount moonshot:/home /home -o rsize=8192,wsize=8192
- What is lsof option for subdirectories? lsof +D /directory
- xinetd or inetd file for RHEL
- default protocol for traceroute ICMP
- iostat –d? Only device statistics will be displayed.
- How to check sockets thru netstat? netstat -an or lsof -i.
- How to check non-listening sockets thru netstat? netstat -al
- Highly availability cluster in patching and upgrading?
- What is a valid FC topology? Switched fabric
- Protocol for TCP/IP? internet
- Service desk – for problem analysis and solution providing – False
- HBA expansion – Host Bus Adapter
- How to check the hops? Traceroute
- Incident management and problem management example.
- Lvmmaxpvsize=0 what does it mean?
- Hybrid cloud concept? A hybrid cloud is a cloud computing environment in which an organization provides and manages some resources in-house and has others provided externally.
- OSI & TCP how many layers? 7 & 4 layers respectively
- To insert above and below one line in the vi editor esc O/o (capital – above, small – below)
- To replace the character? r
- Priority – nice value -20 to 19 (lower number has higher priority, 0 is default priority)
- What are the ways to change the hostname in RHEL? hostname =hostname, /etc/sysconfig/hostname
- How to connect external DAS? The main protocols used for DAS connections are ATA, SATA, eSATA, SCSI, SAS, and Fibre Channel.
- What are the things to be mentioned in iSCSI
- How to avoid bounced mail in sendmail?
- How to avoid mail queue in sendmail?
- How to extend lv in linux 2.6 kernel in lvm2 from 12 to 13 gb? lvextend –L +1G /dev/vg0/lv0
- 4Gb – 4096Mb
- HA cluster, I/O fencing two nodes failed? Fail-over - the operation of moving the service from one cluster node to another.
- How to avoid split brain? A good way of avoiding split brain conditions in most cases without having to resort to fencing is to configure redundant and independent cluster communications paths - so that loss of a single interface or path does not break communication between the nodes - that is the communications should not have a single point of failure (SPOF).
- VLAN advantage in SCSI?
split -b 22 newfile.txt new
Split the file newfile.txt into three separate files called newaa, newab and newac..., with each file containing 22 bytes of data.
split -l 300 file.txt new
Split the file newfile.txt into files beginning with the name new, each containing 300 lines of text.
- How to find the hard link of a particular file
— Test: -samefile NAME
File is a hard link to the same inode as NAME. If the ‘-L’ option is in effect, symbolic links to the same file as NAME points to are also matched.
— Test: -inum n
File has inode number n. The ‘+’ and ‘-’ qualifiers also work, though these are rarely useful. Much of the time it is easier to use ‘-samefile’ rather than this option.
- Apache directive
Apache directives are a set of rules which define how your server should run, number of clients that can access your server, etc. you can change them by editing the httpd.conf and related files to meet your requirements
- How to delete a character in vi editor – press x to delete
- Grep pattern – filtering a text from the file in general
- How to disconnect the users
skill -STOP -u vivek stop the user
skill -CONT -u vivek resume the halted user
- How to set numbers in vim esc: se nu
- Broadcast ip address – last address of the class
- How to add nfs wherever needed – nfs soft mount to be used
- Packages/modules for ldap – open ldap
- Mac address how many bit – 48 bits
- What is UTC – Universal co-ordinate time
- Vmstat syntax - vmstat [options] [delay [count]]
- iostat once 5 times - iostat 5
- Routing table – route –n, netstat –rn, ip route list
- Features of NAS
NAS operates at file system level -- usually either NFS or CIFS -- and serves whole files to users over the shared medium of the local-area network (LAN), while storage-area networks (SANs) deliver data at the block level (via Fibre Channel or iSCSI protocols) and are well suited to transactional storage such as database access.
- Iscsi protocol? – internet protocol, SAN protocol