Sunday, 16 December 2012

Unix version using command



How to check Unix version using command prompt?

surya# cat /etc/*-release

SUSE Linux Enterprise Server 12 (x86_64)
VERSION = 12


surya# cat /proc/version 

Linux version 2.6.16.60-0.58.1.3835.0.PTF.638363-smp 

How to find out LAN card speed in linux ?


To Find full or half duplex speed:

You can use dmesg command to find out your duplex mode:


   # dmesg | grep -i duplex


O/P: 

eth0: link up, 1000Mbps, full-duplex, lpa 0x45E1


So we can come to know that it has 

1. One NIC card, i.e, etho.  if it has 2 NIC cards , it will show eth1 
2. It is 1000Mbps speed
3. Communication is full duplex mode.


Use ethtool to display or change ethernet card settings.  To display duplex speed.


# ethtool eth0

Output:

Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                          100baseT/Half 100baseT/Full
                                          1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half   10baseT/Full
                                          100baseT/Half  100baseT/Full
                                          1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: umbg
        Wake-on: g
        Current message level: 0x00000007 (7)
        Link detected: yes

Explanation:

So we come to know that , eth0 supports 10baseT/Half, 10baseT/Full, 100baseT/Half, 100baseT/Full and  1000baseT/Full.

But the network configured as 1000Mbps , Full duplex mode.

We can also use mii-tool to find out your duplex mode.   Type following command at shell prompt:

# mii-tool 

Output:

 eth0: negotiated 100baseTx-FD flow-control, link ok


Remember:

100baseTx-FD: 100Mbps full duplex (FD)
100baseTx-HD: 100Mbps half duplex (HD)
10baseT-FD:     10Mbps full duplex (FD)
10baseT-HD:    10Mbps half duplex (HD)



Differences between Ext2,Ext3 and Ext4 file systems.

EXT2 :
1.Ext2 was the standard file system for linux until the introduction of ext3.

2.It was introduced with the 1.0 kernel in 1993.Ext2 is flexible,can handle file system up to 4 TB,and supports long filenames up to 1012 characters.

3.It has sparse super blocks feature which increase file system performance.In case any user processes fill up a file system,ext2 normally reserves about 5% of disk blocks for exclusive use by root so that root can easily recover from that situation.Now our rescue diskettes use ext2 instead of minix.
 
4. much Fater

EXT3 :

1. Ext3 (Extended 3 file system) provides all the features of ext2,and also features journaling and backward compatibility with ext2.
 
2.The backward compatibility enables you to still run kernals that are only ext2-aware with ext3 partitions.we can also use all of the ext2 file system tuning,repair and recovery tools with ext3 also you can upgrade an ext2 file system to an ext3 file system without losing any of your data.

3.Ext3’s journaling feature speeds up the amount of time it takes to bring the file system back to a sane state if it’s not been cleanly unmounted (that is,in the event of a power outage or a system crash). Under ext2,when a file system is uncleanly mounted ,the whole file system must be checked.This takes a long time on large file systems.
 
4. On an ext3 system ,the system keeps a record of uncommitted file transactions and applies only those transactions when the system is brought back up.So a complete system check is not required and the system will come back up much faster.
 
5. A cleanly unmounted ext3 file system can be mounted and used as an ext2 file system,this capability can come in handy if you need to revert back to an older kernel that is not aware of ext3.The kernel sees the ext3 filesystem as an ext2 file system. 

6. ext3 file system is slower compared with ext2.

Ext4 :
1. Ext4 is part of the Linux 2.6.28 kernel,Ext4 is the evolution of the most used Linux file system, Ext3.
 
2. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the file system such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability and features.
 
3. slower compared with ext2

Features of Ext4 file system :  
1. Compatibility
2. Bigger filesystem/file sizes
3. Subdirectory scalability
4. Extents
5. Multiblock allocation
6. Delayed allocation
7. Fast fsck
8. Journal checksumming
9. Online defragmentation
10. Inode-related features
11. Persistent preallocation
12. Barriers on by default

Advantages of RHEL6 over RHEL5

1.Ext4 file system is introduced.
Ext4 has many new advantages than Ext3 which is used in earlier versions of RHEL. Ext4 is comparatively faster and easy to manage. It supports supports up to 100TB with the addition of Scalable Filesystem Add-one.

2. xen is removed and kernel virtualization machine (KVM) is introduced.

      RHEL6 introduces the use of KVM (Kernel-based Virtual Machine) as its hypervisor. In the earlier releases Xen hypervisor was used. The main advantage of KVM is that a new kernel should not be installed like in Xen. It also supports the installation of many virtual operating systems like Windows, Linux, Solaris,etc. It is easy to manage.

3. neat command is removed.

4. portmap service is removed.

5. iscsi is introduced, which supports for SAN.

RHEL6 is released with improved and new networking features. It supports IPv6. It uses NFSv4 (Network File Transfer) for the sharing of files in the network rather than NFSv3. It also supports iSCSI (internet Small Computer System Interface) partitions. The network manager in RHEL6 supports Wi-Fi capabilities.

6. rpmbuild is available, which is used to create our own rpms.

7. File encyption is added.

8. palimpsest is available for disk management.

9. Virtual machine will run only on 64bit processors.

10. postfix service is recommended instead of sendmail service

11.Improved level of security
      
RHEL6 has advanced level of security. SELinux (Security Enhanced Linux) features are improved and a new set of SELinux rules has been added to provide security to virtual machines from hackers and attackers. This new feature is called SVirt.