Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, 28 July 2017

When using screen tool error cannot open your terminal /dev/pts/0 in Linux

Screen Tool Error

When using the screen tool you may be unable to start a screen session but instead encounter an error:

Logs:-

Cannot open your terminal '/dev/pts/0' - please check.
This is because another user (you) initiated the current terminal – you probably did a sudo su into the user you are now trying to run screen as, right?'





There are two ways to resolve this:

Sign out and properly connect / sign in as the user you wish to use.
Run script /dev/null to own the shell (more info over at Server Fault); then try screen again.
Important: Do not chmod the virtual terminal device like suggested at (way too many) places around the interwebs. This gives other users read and write access to the terminal session!

Tuesday, 30 May 2017

How to do tracepath for the listening port linux


To Know the trace path of the port

Command:- 

#tracepath 10.73.107.61/5106



Output

[16:59:37] SPASERVERDBA:~ # tracepath 10.73.107.61/5106   
 1:  machine2.move.com (10.57.199.120)       0.086ms pmtu 1500
 1:  erpserver.move.com (10.57.199.221)      0.412ms 
 1:  dba-erpserver.move.com (10.57.199.2)    0.367ms 
 2:  venus.move.com (10.57.192.193)          0.580ms 
 3:  AC-move.com (10.57.192.34)              20.192ms 
 4:  movefirwall.move.com (10.73.97.127)     0.948ms 
 5:  moveswitch.move.com (10.73.97.176)      1.723ms 
 6:  no reply
 7:  no reply
 8:  no reply
 9:  no reply
10:  no reply
11:  no reply
12:  no reply
13:  no reply
14:  no reply
15:  no reply
16:  no reply
17:  no reply
18:  no reply
19:  no reply
20:  no reply
21:  no reply
22:  no reply
23:  no reply
24:  no reply
25:  no reply
26:  no reply
27:  no reply
28:  no reply
29:  no reply
30:  no reply
31:  no reply
     Too many hops: pmtu 1500
     Resume: pmtu 1500 




Wednesday, 1 February 2017

How to enable jumbo frame in linux


Linux MTU Change Size

We’ve gigabit networks, and large maximum transmission units (MTU) sizes (JumboFrames) can provide better network performance for our HPC environment. How do I change MTU size under Linux?

You need support in both network hardware and card in order to use JumboFrames. If you want to transfer large amounts of data at gigabit speeds, increasing the default MTU size can provide significant performance gains.


Changing the MTU size with ifconfig command

In order to change the MTU size, use /sbin/ifconfig command as follows:


ifconfig ${Interface} mtu ${SIZE} up
ifconfig eth1 mtu 9000 up


Note this will only work if supported by both the network nterface card and the network components such as switch.


Changing the MTU size permanently under CentOS / RHEL / Fedora Linux


Edit /etc/sysconfig/network-scripts/ifcfg-eth0, enter

# vi /etc/sysconfig/network-scripts/ifcfg-eth0


Add MTU, settings:

MTU="9000"


Save and close the file. Restart networking:


# service network restart


Note for IPV6 set dedicated MTU as follows:


IPV6_MTU="1280"



Changing the MTU size permanently under Debian / Ubuntu Linux

Edit /etc/network/interfaces, enter:

# vi /etc/network/interfaces


Add mtu as follows for required interface:

mtu 9000


Save and close the file. Restart the networking, enter:

# /etc/init.d/networking restart


Changing the MTU size permanently 


Edit /etc/rc.local and add the following line:

/sbin/ifconfig eth1 mtu 9000 up


Wednesday, 4 January 2017

How to Change HostName and IP-Address in CentOS / RedHat Linux

How to Change HostName and IP-Address in CentOS / RedHat Linux


Step 1 :-

You can use any one of the following methods to change the hostname and/or ip-address on RedHat related distributions.
If you want to change only the hostname you can either do it from command line, or from GUI as explained below.

To change the ip-address along with the hostname, follow the steps shown below.


I. Change HostName From Command Line

1. Use hostname command to Change Hostname

In this example, we’ll change the hostname from dev-server to prod-server.

hostname command by default will display the current hostname as shown below:

# hostname

dev-server


The following will change the hostname to prod-server.

# hostname prod-server


Once the hostname is changed, verify that it has changed the hostname successfully. As you see below, it has changed the hostname to prod-server

# hostname

prod-server


2. Modify the /etc/hosts file

If you have entries in the /etc/hosts file with the old hostname, you should modify it.

For example, the entry for 127.0.0.1 line in the /etc/hosts file will still show the old hostname. In this example, it shows as dev-server.

$ cat /etc/hosts

127.0.0.1  dev-server localhost.localdomain localhost


Modify this file, and set the new hostname here. For example, change dev-server to prod-server as shown below.

$ cat /etc/hosts

127.0.0.1  prod-server localhost.localdomain localhost


3. Modify the /etc/sysconfig/network file

The /etc/sysconfig/network file also has an entry for HOSTNAME. Change the value here as shown below.

# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=prod-server


4. Restart the Network


Restart the network service, if you want any other services that are using the hostname to pickup the changes.

# service network restart

Shutting down interface eth0:        [  OK  ]

Shutting down loopback interface:   [  OK  ]

Bringing up loopback interface:     [  OK  ]

Bringing up interface eth0:          [  OK  ]


If this is not a production system, you can also reboot the system to make sure the hostname is changed properly, and the system is picking it up properly during startup.


II. Change Hostname from UI

If you have desktop related utilities installed on your system, you can change the hostname from the GUI.

Execute system-config-network from the command line.

# system-config-network


This will display the “Network Configuration” GUI. Go to the “DNS” tab and change the hostname from here as shown below.


III. Change the IP-Address

1. Change ip-address Temporarily Using ifconfig


You can change the ip-address of the server using ifconfig command as we discussed earlier. For example, the following changes the ip-address of the server on eth0 interface to 192.168.1.2

# ifconfig eth0 192.168.1.2



2. Change ip-address Permanently


Under the /etc/sysconfig/network-scripts directory, you’ll see file for every network interface on your system. For example, if your interface is “eth0”, you’ll see ifcfg-eth0 file under this directory.

Modify the ifcfg-eth0 file and change the IPADDR field accordingly as shown below to change the ip-address.


# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"

BOOTPROTO=none

NM_CONTROLLED="yes"

ONBOOT=yes

TYPE="Ethernet"

UUID="11111-2222-3333-4444"

IPADDR=192.168.1.2

PREFIX=24

GATEWAY=192.168.1.1

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System em1"

HWADDR=DD:BB:DD:AA:11:55


3. Modify /etc/hosts file


If you’ve defined the ip-address in the /etc/hosts file, make sure to change those also. For example, if you have a FQDN that was pointing to the old ip-address in the /etc/hosts file, change it to the new ip-address. Depending on how you’ve configured your system, you might not have to do this step.


$ vi /etc/hosts

127.0.0.1               prod-server localhost.localdomain localhost

192.168.1.2             prod-server.mydomain.com


4. Restart the Network

Finally, restart the network service, for the system to pick-up the changes.

# service network restart

Shutting down interface eth0:        [  OK  ]

Shutting down loopback interface:   [  OK  ]

Bringing up loopback interface:     [  OK  ]

Bringing up interface eth0:          [  OK  ]


Step 2:

If this is not a production system, you can also reboot the system to make sure the hostname and ip-address is changed properly, and the system is picking it up properly during startup.


How do I change the IP address/netmask and hostname on the command line WITHOUT rebooting the machine?


Here are some example configuration files:

/etc/hosts

Raw
127.0.0.1      localhost.localdomain  localhost
192.168.0.254  server1.example.com    server1
/etc/sysconfig/network

Raw
NETWORKING=yes
HOSTNAME=server1.example.com
GATEWAY=192.168.0.1
/etc/sysconfig/network-scripts/ifcfg-eth0

Raw
DEVICE=eth0
BOOTPROTO=static
IPADDR...

Tuesday, 6 December 2016

Redhat Linux – LVM Volume Attributes



Redhat Linux’s Logical volume Manager has many attributes which are available for controlling the behavior LVM objects or to changing the default values of LVM. We may not use those attributes very often in typical production environment but knowing is not a bad thing. As a Unix/Linux admin,we should have capability  to explain each and every field of commands output as most of the fields will reflect the attributes value.Here we will see some of LVM attributes.


Physical volume(PV) attributes:

To check the physical volume attributes,use “pvs” command.The forth column of pvs command output displays the physical volume attributes.

[root@test ~]# pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda2  vg_test lvm2 a-    19.51g      0
  /dev/sdd1  uavg      lvm2 a-   508.00m 408.00m
  /dev/sde   uavg      lvm2 a-   508.00m 508.00m
  /dev/sdf   uavg      lvm2 a-     5.00g   5.00g

The above command output shows “a” in the attribute field which explains that physical volumes can be “allocated” to the volumes.


Export the volume group “uavg” and check pvs output.

[root@test ~]# vgexport uavg

  Volume group "uavg" successfully exported


[root@test ~]# pvs

  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda2  vg_test lvm2 a-    19.51g      0
  /dev/sdd1  uavg      lvm2 ax   508.00m 408.00m
  /dev/sde   uavg      lvm2 ax   508.00m 508.00m
  /dev/sdf   uavg      lvm2 ax     5.00g   5.00g


In attributes field, you can see that “x”  is added now.This show that volume group is exported.

If the PV is missing, check the pvs output

unknown device actAPOTD1P_archivelog lvm2 axm 512.00g 0
unknown device actAPOTD1P_archivelog lvm2 axm 988.20g 0
unknown device actAPOTD1P_archivelog lvm2 axm 512.00g 0
unknown device actAPOTD1P_archivelog lvm2 axm 512.00g 0
unknown device actAPOTD1P_archivelog lvm2 axm 512.00g 0

In attributes field, you can see that “m”  is added now.This show that physical volume is missing.


We can stop the allocation to the disk by using pvchnage command.By disabling allocation,volume will not be extended using that specific physical volume.


[root@test ~]# pvchange -x n /dev/sdd1
  Physical volume "/dev/sdd1" changed
1 physical volume changed / 0 physical volumes not changed

[root@test ~]# pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda2  vg_test lvm2 a-    19.51g      0
  /dev/sdd1  uavg      lvm2 --   508.00m 408.00m
  /dev/sde   uavg      lvm2 a-   508.00m 508.00m
  /dev/sdf   uavg      lvm2 a-     5.00g   5.00g
[root@test ~]#


You can revert the change any time using below-mentioned command.

[root@test ~]#  pvchange -x y /dev/sdd1
  Physical volume "/dev/sdd1" changed
  1 physical volume changed / 0 physical volumes not changed

[root@test ~]# pvs
  PV         VG        Fmt  Attr PSize   PFree
  /dev/sda2  vg_test lvm2 a-    19.51g      0
  /dev/sdd1  uavg      lvm2 a-   508.00m 408.00m
  /dev/sde   uavg      lvm2 a-   508.00m 508.00m
  /dev/sdf   uavg      lvm2 a-     5.00g   5.00g



Some of the useful commands to get the details of physical volume.


1.To get the physical volumes with  “UID” , use “-v” option.

Note:You can also use “pvs -vv” to get more detailed information.

[root@test ~]# pvs -v
 Scanning for physical volume names
  PV      VG   Fmt Attr PSize   PFree  DevSize   PV UUID
/dev/sdd1 uavg lvm2 ax 508.00m 408.00m 511.98m tJ5YhP-VOZV-yfQ6-Uyye-WGT7-VLcl-7M3RMK
/dev/sde  uavg lvm2 ax 508.00m 508.00m 512.00m FadWLT-LjD8-v8VB-pboY-eZbK-vYpE-ZWq0i9
/dev/sdf  uavg lvm2 ax 5.00g   5.00g   5.00g GbvgWh-l0w3-wCA6-umkD-zfsS-8yAZ-GeOSKF


2.To get all the disks connected to the system ,use “pvs -a”


[root@test ~]# pvs -a
  PV                     VG        Fmt  Attr PSize   PFree
  /dev/root                             --        0       0
  /dev/sda1                             --        0       0
  /dev/sda2              vg_test lvm2 a-    19.51g      0
  /dev/sdb1                             --        0       0
  /dev/sdc1                             --        0       0
  /dev/sdd1              uavg      lvm2 ax   508.00m 408.00m
  /dev/sde               uavg      lvm2 ax   508.00m 508.00m
  /dev/sdf               uavg      lvm2 ax     5.00g   5.00g
  /dev/sdg                              --        0       0
  /dev/vg_test/lv_swap                --        0       0


/dev/sda1 is not part of LVM but you get the disk list in pvs command.

3.To get the segment wise output,use below command.

[root@test ~]# pvs --segments
  PV         VG        Fmt  Attr PSize   PFree   Start SSize
  /dev/sda2  vg_test lvm2 a-    19.51g      0      0  4234
  /dev/sda2  vg_test lvm2 a-    19.51g      0   4234   760
  /dev/sdd1  uavg      lvm2 ax   508.00m 408.00m     0    13
  /dev/sdd1  uavg      lvm2 ax   508.00m 408.00m    13    25
  /dev/sdd1  uavg      lvm2 ax   508.00m 408.00m    38    89
  /dev/sde   uavg      lvm2 ax   508.00m 508.00m     0   127
  /dev/sdf   uavg      lvm2 ax     5.00g   5.00g     0  1279


Volume Group(VG) Attributes:

You can see the volume group attributes using vgs command.


Attributes Description

r,w (r)ead & (w)rite permissions
z resi(z)eable
x e(x)ported
p (p)artial
c,n,a,i allocation policy (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere, (i)nherited
c (c)luster
m (m) missing

Here we will see sample vgs command output.

[root@test ~]# vgs
  VG        #PV #LV #SN Attr   VSize  VFree
  uavg        3   1   0 wz--n-  5.99g 5.89g
  vg_test   1   2   0 wz--n- 19.51g    0
[root@test ~]#
[root@test ~]# vgs -v
    Finding all volume groups
    Finding volume group "uavg"
    Finding volume group "vg_test"
VG        Attr   Ext   #PV #LV #SN VSize  VFree VG UUID
uavg      wz--n- 4.00m   3   1   0  5.99g 5.89g c87FyZ-5DND-oQ3n-iTh1-Vb1f-nBML-vUBUE9
vg_test wz--n- 4.00m   1   2   0 19.51g    0  dIgmLP-aoe3-anxY-WHYE-bBtX-u28M-WF6Ye5


There are some other volume group attributes which will be useful while creating the new volume group.

Attributes Description

-l maximum logical volumes
-p maximum physical volumes
-s physical extent size (default is 4MB)
-A autobackup

All the above mentioned attributes can be set while creating the volume group.You can not modify those values after that.In the below example,I have used most the  attributes with specific value to create new volume group.

[root@test ~]# vgcreate   -l 512 -p 256 -s 32M -Ay newvg /dev/sdf
  Volume group "newvg" successfully created
 vgs newvg
  VG    #PV #LV #SN Attr   VSize VFree
  newvg   1   0   0 wz--n- 4.97g 4.97g


You can see the newly set values in vgdisplay command output.

[root@test ~]# vgdisplay -v newvg

    Using volume group(s) on command line
    Finding volume group "newvg"
  --- Volume group ---
  VG Name               newvg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                512
  Cur LV                0
  Open LV               0
  Max PV                256
  Cur PV                1
  Act PV                1
  VG Size               4.97 GiB
  PE Size               32.00 MiB
  Total PE              159
  Alloc PE / Size       0 / 0
  Free  PE / Size       159 / 4.97 GiB
  VG UUID               Ny4xsv-uJ49-sZr9-lvfq-Oa7n-l5mH-1bPBbp

  --- Physical volumes ---
  PV Name               /dev/sdf
  PV UUID               GbvgWh-l0w3-wCA6-umkD-zfsS-8yAZ-GeOSKF
  PV Status             allocatable
  Total PE / Free PE    159 / 159


Logical Volume (LV) Attributes:

Knowing the logical volume attributes.

[root@test ~]# lvs
  LV      VG        Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  vol1    uavg      -wi-ao 100.00m
  lv_root vg_test -wi-ao  16.54g
  lv_swap vg_test -wi-ao   2.97g


The below tables covers the “lvs” command attributes.

Volume Type Attributes(First Field of Attr) Description
m (m)irrored
M (M)irrored without intial sync
o (o)rgin
p (p)vmove
s (s)napshot
S invalid (S)napshot
v (v)irtual
i mirror (i)mage
l mirror (I)mage without sync
c under (c)onstruction
Simple Volume


Attributes (second to sixth Field of Attr) Description

w,r (Second Feild) Permissions ‘(r)’ead ‘(w)’rite
c,I,n.a,I (Third Feild) Allocation policy (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere, (i)nherited
m (Fourth Feild) Fixed (m)inor
a,s,I (Fifth Feild) (a)ctive, (s)uspended, (I)nvalid snapshot,,
S (Fifth Feild) Invalid (S)uspended snapshot
I (Fifth Feild) Mapped device present with (i)nactive table
d (Fifth Feild) Mapped (d)evice present with-out tables
o (sixth Feild) device (o)pen (Volume is in active state or may be mounted )
a - allocated (a)
x - exported (x)
m - missing (m)

While creating the volume can provide various attributes like stripe size,no of extends
etc.These are already covered in volume creation.

Here we will see some of the useful “lvs” command options.

1.To display the logical volumes with underlying physical volumes use,

[root@test ~]# lvs -a -o +devices
LV      VG        Attr   LSize   Origin Snap%  Move Log Copy%  Convert Devices
vol1    uavg      -wi-ao 100.00m                                   /dev/sdd1(13)
lv_root vg_test -wi-ao  16.54g                                   /dev/sda2(0)
lv_swap vg_test -wi-ao   2.97g                                   /dev/sda2(4234)


2.To see the complete physical disks segmnets for logical volumes,

[root@test ~]# lvs -a -o +seg_pe_ranges --segments

  LV      VG        Attr   #Str Type   SSize   PE Ranges
  vol1    uavg      -wi-ao    1 linear 100.00m /dev/sdd1:13-37
  lv_root vg_test -wi-ao    1 linear  16.54g /dev/sda2:0-4233
  lv_swap vg_test -wi-ao    1 linear   2.97g /dev/sda2:4234-4993


3.For detailed logical volume information,

[root@test ~]# lvdisplay --maps /dev/uavg/vol1
  --- Logical volume ---
  LV Name                /dev/uavg/vol1
  VG Name                uavg
  LV UUID                XjMpRC-6f5k-FN9L-jz5v-f0Gj-wBpf-xc9GVD
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                100.00 MiB
  Current LE             25
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Segments ---
  Logical extent 0 to 24:
    Type                linear
    Physical volume     /dev/sdd1
    Physical extents    13 to 37


Hope this post is informative for you.Thank you for reading this article.Please leave a comment if you have any doubt.I will get back to you.


Wednesday, 30 November 2016

Redhat 6 and 7 Comparison features list



ON THE BASIS OF RELEASE DATE.


RELEASE DATE OF RHEL6 IS 10th NOV 2010.

RELEASE DATE OF RHEL7 IS 10TH JUNE 2014.

Hence RHEL7 is latest os.


DIFFERENCE ON THE BASIS OF OPERATING SYSTEM NAMES


If you want to see this use this command

#cat /etc/redhat-release

RHEL6 : REDHAT ENTERPRISE LINUX (SANTIGO)

RHEL7: REDHAT ENTERPRISE LINUX (MAIPO)



KERNEL VERSION


RHEL6: 2.6.32

RHEL7:  3.0.10


OS BOOT TIME


RHEL6: 40 sec

RHEL7: 20 sec


MAXIMUM SIZE OF SINGLE PARTITION


RHEL6: 50TB(EXT4)

RHEL7: 500TB(XFS)


BOOT LOADER


RHEL6:  /boot/grub/grub.conf

RHEL7: /boot/grupb2/grub.cfg


PROCESSOR ARCHITECTURE


RHEL6: It support 32bit & 64bit  both

RHEL7: It only support 64bit


HOW TO FORMAT OR ASSIGN A FILE SYSTEM IN


RHEL6:      #mkfs.ext4   /dev/hda6

RHEL7:       #mkfs.xfs   /dev/hda6


HOW TO REPAIR A FILE SYSTEM IN


RHEL6:  #fsck -y /dev/hda6

RHEL7:  #xfs_repair /dev/hda6



COMMAND TO MANAGE NETWORK IN RHEL6 AND RHEL7


RHEL6:  #setup

RHEL7:  #nmtui



HOSTNAME CONFIGURATION FILE


RHEL6:    /etc/sysconfig/network

RHEL7:    /etc/hostname


DEFAULT ISO IMAGE MOUNT PATH


RHEL6: /media

RHEL7: /run/media/root



FILE SYSTEM CHECK


RHEL6:   e2fsck

RHEL7:   xfs_repair



RESIZE A FILE SYSTEM


RHEL6:   #resize2fs  -p /dev/vg00/lv1

RHEL7:    #xfs_growfs  /dev/vg00/lv1


TUNE A FILE SYSTEM


RHEL6: tune2fs

RHEL7: xfs_admin



IPTABLES AND FIREWALL


RHEL6: iptables

RHEL7: firewalld



NOTE:


To see firewall status in RHEL7

#firewall-cmd   –state


To see Firewall status in RHEL6

#service iptables status


To stop firewall in RHEL7

#systemctl stop firewalld.service


To stop firewall in RHEL6

#service iptables stop




COMMUNICATION BETWEEN TCP AND UDP IN BACK END


RHEL6: netcat

RHEL7: ncat


INTERFACE NAME


RHEL6: eth0

RHEL7: ens198(N)



COMBINING NIC


RHEL6: Network Bonding

RHEL7: Team Driver



NSF Server Version


RHEL6:  NFSv2

RHEL7:  NFSV4


DATABASE USED


RHEL6: Mysql

RHEL7: mariaDB

Altough RHEL7 also support Mysql



MANAGING SERVICES


RHEL6:

#service sshd restart#chkconfig sshd on

RHEL7:

#systemctl restart sshd#systemctl enable shhd



ON Basis of file System.


RHEL6 defualt file system is ext4 while xfs is RHEL7 default file system.


Kernel Version


RHEL6 default kernel version is 2.6 while RHEL7 is 3.10


Kernel Code Name


RHEL6 kernel code name is Santiago while RHEL7 kernel code name is Maipo.


UID Allocation


In RHEL6 default UID assigned to users would start from 500 while in RHEL7 its starting from 1000.
But this can be changed if required by editing /etc/login.defs file.

Maximum supported File Size.


In RHEL6 maximum file size of an individual file can be up to 16TB while in RHEL7 it can be up to 500TB which is very large in comparison to RHEL6.


Maximum Supported File System Size.


In RHEL6 maximum file system size=16TB(for 64bit Machine) and 8TB(for 32 bit machine). While in RHEL7 maximum file system size is 500TB.

Also keep in mind thatRHEL does not support XFS on 32-bit machines.

change in file system structure.

in rhel6 /bin,/sbin,/lib and /lib64 are usually under / while in rhel7 now they are nested under /usr.



NEW FEATURES OF RHEL7 :



1. Space Required to Install RHEL7
Now if you want to install RHEL7 in your machine, RedHat recommends minimum 5 GB of disk space to install this release of RHEL series for all supported architectures.

2. Boot Loader in RHEL7
A new book loader GRUB2 has been introduced in RHEL 7.It comes with new features.


3.RHEL7 GRUB2 Configuration File:
# vim /boot/grub2/grub.cfg


4. New Installer you can say Redesigned Anaconda Version
Red Hat Enterprise Linux 7 has and redesigned Anaconda version.
It contains many improvements in system installation.


5. firstboot Implementation
RHRL 7 replaces firstboot with the Initial Setup utility, initial-setup, for better interoperability with the new installer.


6. Changes in File System Layout
RHEL7 introduces two major changes to the layout of the file system.
The /bin, /sbin, /lib and /lib64 directories are now under the /usr directory.
The /tmp directory can now be used as a temporary file storage system (tmpfs)



7. Network Configuration utility(ncat)
A new networking utility ncat has been introduced in RHEL 7 which replaces netcat.
8. New Version of Apache
RHEL 7 is coming with apache 2.4



9. Chrony – A new Package Introduced
Chrony is introduced as new NTP client provided in the chrony package. Chrony does not provides all features available in old ntp client (ntp). So ntp is still provided due to compatibility.


10. HAProxy
HAProxy has been introduced in RHEL 7. It is a TCP/HTTP reverse proxy that is well-suited to high availability environments.



11.hostname lookup and setup

In rhel5 and rhel6 version of Linux we need to edit file /etc/sysconfig/network to set hostname but in rhel7 its not so.

Now in RHEL7 we can directly chnage the hostname using below commands.

hostnamectlnmtuinmcli


HOW TO SEE HOSTNAME IN RHEL6 and RHEL7


in RHEL6              #hostname

in RHEL7              #hostnamectl  status   and #hostname


12.Introduction of Docker in RHEL7.

13.Device Hotplug Removed from RHEL7.

14.RHEL7 does not provide 32 bit iso.RHEL7 will not natively support

32-bit hardware architecture.


15.RHEL7 use OPenJDK7 as the default java development kit.


There are other so many changes between RHEL previous versions and RHEL7.

Netstat and ifconfig commands also disappeared from RHEL7 but it can be used by installing net-tools.

The move from sysvinit to systemd is one of most important change that has been made and which is a matter of concerned.

command tail -n is replaced by journalctl -n

command tail -f is replaced by journalctl -f

for displaying kernel messages instead of dmesg now in RHEL7  we use journalctl -k


Wednesday, 19 October 2016

How to see a running process in Unix


All your processes can be found under /proc and you can also get the number of open files from there. Or use lsof

For Unix :

# ps -aef | grep {process-name} ; pfiles {PID}



For Linux : 

#ps -C {program-name} -o pid= ; ls -l /proc/{PID}/fd

Or simplyuse



#lsof -p

Friday, 14 October 2016

Understand the Size of directories

[root@auqldtv01act1ai /]# du -chx --max-depth=1
13M     ./sbin
47M     ./boot
12K     ./dumps
9.6G    ./tmp
8.5K    ./act_pri_pool000
269M    ./lib
12M     ./opt
4.0K    ./media
22M     ./lib64
20K     ./lost+found
0       ./dev
563M    ./act



Check eth speed and ethernet link in Linux



sudo ethtool eth0 | grep -i speed



sudo ethtool eth0 | grep -i detected