• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • Life always offers you a second chance ... Its called tomorrow !!!

    Thursday, November 24, 2016

    How to Remove Duplicate Rows from a Table

    Use rowid pseudo column. All you have to do is to keep the latest data (i.e. highest ROWID) and remove other duplicated rows.
    SELECT * FROM table1 a
    WHERE rowid < (SELECT max(rowid) FROM table1 b
    WHERE a.column1 = b.column1 AND etc...);

    OR

    create table testtt (num number);

    insert into testtt values(111);
    insert into testtt values(111);
    insert into testtt values(111);
    insert into testtt values(111);
    insert into testtt values(222);
    insert into testtt values(222);
    insert into testtt values(333);
    insert into testtt values(333);
    insert into testtt values(333);


    select * from testtt;

    delete from testtt
    where (rowid, num) not in (select max_rid, num
    from (select num,
    count(num) over (partition by num) cnt,
    max(rowid) over (partition by num) max_rid
    from testtt)
    where cnt > 1);

    select * from testtt;

    OR

    While I doubt this method has any advantages over another, it's an example:
    DELETE FROM table_a
    WHERE rowid IN
    ( SELECT rowid FROM table_a
    MINUS
    SELECT MAX( rowid ) FROM table_a
    GROUP BY column_list )

    OR

    delete from table_name where rowid not in (select max(rowid) from table group byduplicate_values_field_name);
    OR

    highest rowid does not necessarily mean latest data... since space freed from deleting rows might be reused.
    SQL> CREATE TABLE t AS SELECT level l FROM DUAL CONNECT BY LEVEL <= 5000;
    SQL> DELETE FROM t WHERE l < 5000;
    SQL> COMMIT;
    SQL> INSERT INTO t VALUES (5001);
    SQL> COMMIT;
    SQL> SELECT max(l) KEEP(DENSE_RANK LAST ORDER BY rowid) as maxrid, max(l) KEEP(DENSE_RANK FIRST ORDER BY rowid) minrid FROM t;

    MAXRID MINRID
    ---------- ----------
    5000 5001


    Sunday, October 02, 2016

    Why is Linux considered more safer than windows or any other OS ?

    Now we hear many times from most of the people around us claiming that Linux is much more secure than Windows or Linux is very secure.

    But what are the things in Linux that makes it secure than Windows or any other Operating System.

    Here I will try to throw some light on some of the security features which I know in Linux and believe that these points add up to the construction of a much more secure wall all around the Linux Operating System.

    1. Execshield

    ExecShield is designed to prevent security breaches caused by software programs written to crawl
    through the Internet looking for systems with common vulnerabilities such as worms and viruses. It is enabled in the kernel and works in a way that is non intrusive to the user.

    Its goal is not to defend against the expert hacker who has broken into your local network or an employee inside the company who already has access to parts of the network instead its goal is to prevent against intruders using scripts that look for vulnerabilities in the way a program running with root privileges is written.

    For more knowledge on Execshield follow the below link
    Prevent security breaches with Execshield

    2. SElinux (Security Enhanced Linux)

    SELinux is an implementation of a flexible mandatory access control architecture in the Linux operating system.  The SELinux architecture provides general support for the enforcement of many kinds of  mandatory  access control  policies,including those based on the concepts of Type Enforcement(R), Role- Based Access Control, and Multi-Level Security.

    SELinux can potentially control which activities a system allows each user, process and daemon, with very precise specifications. However, it is mostly used to confine daemons like database engines or web servers that have more clearly-defined data access and activity rights. This limits potential harm from a confined daemon that becomes compromised. Ordinary user-processes often run in the unconfined domain, not restricted by SELinux but still restricted by the classic Linux access rights.

    3. IPtables

    With the enhanced features available with the IPtables you can implement a greater level of security for your Linux machine.

    IPtables  is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.  Several different tables may be defined.  Each table contains a number of built-in chains and may also contain user-defined chains.

    Each chain is a list of rules which can match a set of packets.  Each rule specifies what to do with a packet that matches.   This  is called a 'target', which may be a jump to a user-defined chain in the same table.

    For more information on iptables please follow the below link
    iptables tutorials for Linux I
    iptables tutorial for Linux II

    4. PAM (Pluggable Authentication Modules)

    Linux-PAM is a system of libraries that handle the authentication tasks of applications (services) on the system.  The principal feature of the PAM approach is that the nature of the authentication is dynamically configurable. In other words, the system administrator is free to choose how individual service-providing applications will authenticate users.

    Linux-PAM separates the tasks of authentication into four independent management groups: account management; authentication management; password management; and session management.

    account - provide account verification types of service: has the user's password expired?; is this user permitted access to the requested service?

    authentication - authenticate a user and set up user credentials. Typically this is via some challenge-response request that the user must satisfy: if you are who you claim to be please enter your password.

    password - this group's responsibility is the task of updating authentication mechanisms. Typically, such services are strongly coupled to those of the auth group. Some authentication mechanisms lend themselves well to being updated with such a function. Standard UN*X password-based access is the obvious example: please enter a replacement password.

    session - this group of tasks cover things that should be done prior to a service being given and after it is withdrawn. Such tasks include the maintenance of audit trails and the mounting of the user's home directory. The session management group is important as it provides both an opening and closing hook for modules to affect the services available to a user.

    5. Audit

    The 2.6 Linux kernel has the ability to log events such as system calls and file access. These logs can then be reviewed by the administrator to determine possible security breaches such as failed login attempts or a user failing to access system files. This functionality, called the Linux Auditing System.

    auditd  is  the  userspace component to the Linux Auditing System. It's responsible for writing audit records to the disk. Viewing the logs is done with the ausearch or aureport utilities. Configuring the audit rules is done with the auditctl utility.  During  startup, the  rules  in  /etc/audit/audit.rules are read by auditctl.

    For more information please follow the below link
    Using audit in Linux to track changes

    These are some of the front level security features available in Linux for a better security. I would be glad if someone would like to review or add any of the missing points in this article.

    Apart from these there are a numerous options which can be utilized to enhanced the level of security for your Linux machine.

    You can follow the below link to find out tips on improving the security of your Linux server
    15 tips to improve security of your Linux server

    How to load modules from kernel during boot in Linux

    Recently I ran into a situation where my kernel was not loading vmxnet3 module during startup of the system hence I had to change the network card module from default vmxnet3 to E1000 on my VMware setup for each server.

    If you are also facing similar problem or you want to load any other kernel module during startup(boot) of the Linux machine follow below steps.

    NOTE: I am using SuSE Linux Enterprise System 11 SP4 hence the files and the commands used might not work on other variant of Linux.

    Verify if vmxnet3 module is provided by kernel
    # find / -name vmxnet3*.ko
    /lib/modules/3.0.101-71.1.10543.0.PTF-default/kernel/drivers/net/vmxnet3/vmxnet3.ko

    A more generic command to list kernel modules is
    # modprobe --list | grep -i vmxnet
    /lib/modules/3.0.101-71.1.10543.0.PTF-default/kernel/drivers/net/vmxnet3/vmxnet3.ko

    So this validates that vmxnet3 is available within my kernel, so lets check if it is installed/loaded on my system
    # lsmod | grep -i vmxnet3
    If you don't get any output so it means vmxnet3 module is not loaded on your machine

    Add the module name with "MODULES_LOADED_ON_BOOT" variable in the below file
    # vi /etc/sysconfig/kernel
    MODULES_LOADED_ON_BOOT=" ipmi_devintf ipmi_si
    vmxnet3"

    Save and exit the file.

    You can validate your configuration changes followed by a reboot with below command
    # lsmod | grep -i vmxnet
    vmxnet3                54163  0

    As you see vmxnet3 module is loaded now.

    If you want to avoid doing a reboot then you can manually load/activate a module using below command
    # modprobe vmxnet3
    This will activate your vmxnet3 module
    # lsmod | grep -i vmxnet vmxnet3                54163  0


    Follow the below links for more tutorials

    How to find the path of any command in Linux
    How to configure a Clustered Samba share using ctdb in Red Hat Cluster
    How to delete an iscsi-target from openfiler and Linux
    How to perform a local ssh port forwarding in Linux
    How to use yum locally without internet connection using cache?
    What is umask and how to change the default value permanently?
    Understanding Partition Scheme MBR vs GPT
    How does a successful or failed login process works in Linux
    How to find all the process accessing a file in Linux
    How to exclude multiple directories from du command in Linux
    How to configure autofs in Linux and what are its advantages?
    How to resize software raid partition in Linux
    How to configure Software RAID 1 mirroring in Linux
    How to prevent a command from getting stored in history in Linux

    Sunday, September 25, 2016

    How to monitor network bandwidth in Linux using netperf

    We have many tools available online which can help us monitor network bandwidth usage within a network between differnt Linux machines.

    In this article I will show how netperf can be used to monitor network performance between two Linux machines

    Brief information on my setup:

    Server

    My server IP is 192.169.32.15 where I have 2 bond interfaces as below
    # ifconfig bond0
    bond0     Link encap:Ethernet  HWaddr 00:17:A4:77:00:38
              inet addr:
    192.169.32.15  Bcast:192.169.32.31  Mask:255.255.255.224
              UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
              RX packets:9042150 errors:0 dropped:4553 overruns:0 frame:0
              TX packets:2277574 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:13654658052 (13022.0 Mb)  TX bytes:153728769 (146.6 Mb)

    # ifconfig bond1
    bond1     Link encap:Ethernet  HWaddr 38:63:BB:2F:E5:A9
              inet addr:192.169.32.37  Bcast:192.169.32.63  Mask:255.255.255.224
              UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
              RX packets:28334533 errors:0 dropped:2 overruns:0 frame:0
              TX packets:2066047 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:42898423316 (40911.1 Mb)  TX bytes:136362958 (130.0 Mb)


    The ethernet speed assigned to both interfaces eth0 and eth1 under bond0 is 1 GB
    # ethtool eth0 | grep -i Speed
            Speed: 1000Mb/s

    # ethtool eth1 | grep -i Speed
            Speed: 1000Mb/s

    so if we use bond0 for our network operations then ethernet bandwidth must not exceed 1 GB

    The ethernet speed assigned to both interfaces eth2 and eth3 under bond1 is 3 GB
    # ethtool eth2 | grep -i Speed
            Speed: 3000Mb/s

    # ethtool eth3 | grep -i Speed
            Speed: 3000Mb/s

    so if we use bond1 for our network operations then ethernet bandwidth must not exceed 3 GB

    Client

    My clinet node is 192.169.32.17 where as well I have 2 bond interfaces in the same subnet as my server
    # ifconfig  bond0
    bond0     Link encap:Ethernet  HWaddr 00:17:A4:77:00:44
              inet addr:
    192.169.32.17  Bcast:192.169.32.31  Mask:255.255.255.224
              UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
              RX packets:2263768 errors:0 dropped:5390 overruns:0 frame:0
              TX packets:8626819 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:150407672 (143.4 Mb)  TX bytes:12455852277 (11878.8 Mb)

    # ifconfig  bond1
    bond1     Link encap:Ethernet  HWaddr 38:63:BB:2F:56:C1
              inet addr:192.169.32.38  Bcast:192.169.32.63  Mask:255.255.255.224
              UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
              RX packets:2067482 errors:0 dropped:16 overruns:0 frame:0
              TX packets:28335782 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:136453804 (130.1 Mb)  TX bytes:41070143636 (39167.5 Mb)

    The ethernet speed assigned to bond0 and bond1 is same as server i.e. 1 GB and 3 GB respectively

    Let us start our test

    Installed netperf on both the machines

    NOTE: I would recommend to disable the firewall on both server and client for the monitoring purpose as at times your firewall might stop netperf from sending traffic to client machine

    On Server
    server # rpm -Uvh /tmp/netperf-2.6.0-3.3.x86_64.rpm
    warning: /tmp/netperf-2.6.0-3.3.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID f388ca22
    Preparing...                ########################################### [100%]
       1:netperf                ########################################### [100%]

    Start netperf on any free port number
    # netserver -p 16604
    Starting netserver with host 'IN(6)ADDR_ANY' port '16604' and family AF_UNSPEC

    # netstat -ntlp | grep 16604
    tcp        0      0 :::16604        :::*                  LISTEN      3624/netserver

    So our port has been opened by netperf

    On Client
    client #  rpm -Uvh /tmp/netperf-2.6.0-3.3.x86_64.rpm
    warning: /tmp/netperf-2.6.0-3.3.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID f388ca22
    Preparing...                ########################################### [100%]
       1:netperf                ########################################### [100%]

    In the below example we are sending traffic for 100 seconds to host server IP 192.169.32.15
    # netperf -H 192.169.32.15 -p 16604 -l 100
    MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.169.32.15 () port 0 AF_INET : demo
    enable_enobufs failed: setsockopt
    Recv   Send    Send
    Socket Socket  Message  Elapsed
    Size   Size    Size     Time     Throughput
    bytes  bytes   bytes    secs.    10^6bits/sec

    11796480 11796480 11796480    100.07    
    994.23

    So bond0 network traffic is within our limit as provided to the interface i.e. 1 GB/s

    Lets validate bond1

    Here my server IP of bond1 is 192.169.32.37
    # netperf -H 192.169.32.37 -p 16604 -l 100
    MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.169.32.37 () port 0 AF_INET : demo
    enable_enobufs failed: setsockopt
    Recv   Send    Send
    Socket Socket  Message  Elapsed
    Size   Size    Size     Time     Throughput
    bytes  bytes   bytes    secs.    10^6bits/sec

    11796480 11796480 11796480    100.02  
    2982.72

    bond1 network traffic is also within our provided limit i.e. 3 GB/s

    I hope the article was helpful

    Follow the below links for more helpful tutorials

    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    Basic iptables tutorial in Linux I
    Basic iptables tutorial in Linux II
    Creating an internal network using VMware Workstation
    Setting up custom TCP/IP Keep Alive Parameter in Linux
    What is virtual memory, paging and swap space?
    How to take remote desktop of Windows from Linux
    How to detect new hard disk attached without rebooting in Linux
    How to detect new NIC/Ethernet card without rebooting in Linux
    15 practical examples of rpm command usage in Linux
    Why is sudo command asking for root password in Linux
    How to configure bridged network in Oracle Virtual Box (Linux)
    How to configure passwordless sudo for a user in Linux
    Understanding Load Average in Linux and when to be worried about it?
    How to run a process in background or bring to foreground in Linux
    How to configure logrotate for a new log file in Red Hat Linux

    Friday, September 16, 2016

    How to downgrade HP Emluex CNA NIC card firmware version

    This article will guide you with steps used to perform upgrade as well as downgrade of Emulex Converged Network Adapters firmware version running on HP hardware

    For the demonstration of this article I will be using FlexFabric 20Gb 2-port 650FLB Adapter.

    Check the NIC adapter type installed in your blade
    # dmidecode |grep  'NIC'
    HP BIOS NIC PCI and MAC Information
            NIC 1: PCI device 06:00.0, MAC address 00:17:A4:77:00:02
            NIC 2: PCI device 06:00.1, MAC address 00:17:A4:77:00:04
            NIC 3: PCI device 06:00.2, MAC address D0:BF:9C:F0:80:69
            NIC 4: PCI device 06:00.3, MAC address D0:BF:9C:F0:80:71
            NIC 5: PCI device 06:00.4, MAC address D0:BF:9C:F0:80:6A
            NIC 6: PCI device 06:00.5, MAC address D0:BF:9C:F0:80:72
                    NIC.FlexLOM.1.1
                    HP FlexFabric 20Gb 2-port
    650FLB Adapter - NIC
                    NIC.FlexLOM.1.2
                    HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                    NIC.FlexLOM.1.3
                    HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                    NIC.FlexLOM.1.4
                    HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                    NIC.FlexLOM.1.5
                    HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC
                    NIC.FlexLOM.1.6
                    HP FlexFabric 20Gb 2-port 650FLB Adapter - NIC

    To check the currently installed firmware and driver version on the NIC card
    # ethtool -i eth0
    driver: be2net
    version: 10.7.110.29
    firmware-version: 10.7.110.34
    bus-info: 0000:06:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: yes
    supports-register-dump: no

    As you see my firmware version is 10.7.110.34 while the driver version of the NIC card is 10.7.110.29
    This set of firmware and driver is from HP SPP 2016.04, so let us first perform a downgrade of the firmware to SPP 2015.04

    The CNA firmware version available with SPP 2015.04 is "hp-firmware-cna-emulex-2015.02.02-1.1.x86_64.rpm"

    Steps to downgrade NIC firmware

    Install the CNA rpm
    # rpm -Uvh /tmp/hp-firmware-cna-emulex-2015.02.02-1.1.x86_64.rpm
    Preparing...                ########################################### [100%]
       1:hp-firmware-cna-emulex ########################################### [100%]

    Unlike any other rpm the above command doesnot exactly installs the firmware, instead it will just extract the rpm content to it's respective location.

    Content of the firmware rpm is as below
    # rpm -ql hp-firmware-cna-emulex-2015.02.02-1.1
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/.cpq_package.inc
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/.hpsetup
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/CP025738.xml
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/elxflashStandalone-linux-10.2.477.23-1.zip
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/fwmatrix.txt
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/installer
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/readme.txt
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1/reference.xml
    /usr/lib/x86_64-linux-gnu/hp-scexe-compat
    /usr/lib/x86_64-linux-gnu/hp-scexe-compat/CP025738.scexe

    # cd /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2015.02.02-1.1

    # unzip elxflashStandalone-linux-10.2.477.23-1.zip

    # cd elxflashStandalone-linux-10.2.477.23-1/lx

    Next execute the below command to start the downgrade
    # ./elxflash.sh /ucna /sysfs  /f
    Thu Sep 15 23:52:01 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:08,
    Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success

    Thu Sep 15 23:52:01 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:08,
    Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success

    Thu Sep 15 23:52:01 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:75,
    Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success

    Thu Sep 15 23:52:02 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:7D,
    Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success

    Thu Sep 15 23:52:02 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:76,
    Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success

    Thu Sep 15 23:52:02 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=30:8D:99:62:FF:7E,
    Update=Firmware, Image=oc14-10.2.477.23.ufi, New=10.2.477.23, Old=10.7.110.34, Status=Success

    elxflash: All required firmware and/or boot code downloads succeeded - Return Code=0

    Please reboot system to activate new firmware.

    So the script executed successfully with Return Code "0"

    The new firmware version is as seen below
    # ethtool -i eth0
    driver: be2net
    version: 10.7.110.29
    firmware-version: 10.7.110.34 [
    10.2.477.23]
    bus-info: 0000:06:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: yes
    supports-register-dump: no

    NOTE:  A reboot is required to activate the new firmware

    Steps to update NIC firmware

    Currently installed firmware
    # ethtool -i eth0
    driver: be2net
    version: 10.2.477.6
    firmware-version: 10.2.477.23
    bus-info: 0000:06:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: yes
    supports-register-dump: no

    So the currently installed NIC driver version is 10.2.477.6 and the firmware version is 10.2.477.23 which are from SPP 2015.04

    Let us update the NIC card to the firmware version from HP SPP 2016.04 i.e. "hp-firmware-cna-emulex-2016.02.02-1.1.x86_64.rpm"

    Install the rpm
    # rpm -Uvh /tmp/hp-firmware-cna-emulex-2016.02.02-1.1.x86_64.rpm
    warning: /tmp/hp-firmware-cna-emulex-2016.02.02-1.1.x86_64.rpm: Header V3 RSA/SHA1 signature: NOKEY, key ID b1275ea3
    Preparing...                ########################################### [100%]
       1:hp-firmware-cna-emulex ########################################### [100%]

    Content of the rpm is as below
    # rpm -ql hp-firmware-cna-emulex
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/.cpq_package.inc
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/.hpsetup
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/CP029026.xml
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/elxflashStandalone-linux-10.7.110.34-1.zip
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/fwmatrix.txt
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/hpsetup
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/readme.txt
    /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1/reference.xml
    /usr/lib/x86_64-linux-gnu/hp-scexe-compat
    /usr/lib/x86_64-linux-gnu/hp-scexe-compat/CP029026.scexe

    Follow the below steps to perform the update

    # cd /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1

    # ll
    total 38932
    -r--r--r-- 1 root root    64057 Jan 13  2016 CP029026.xml
    -rw-r--r-- 1 root root      271 Jan 13  2016 .cpq_package.inc
    drwxr-xr-x 5 root root     4096 Jan  9  2016 elxflashStandalone-linux-10.7.110.34-1
    -r--r--r-- 1 root root 38047305 Jan 13  2016 elxflashStandalone-linux-10.7.110.34-1.zip
    -r--r--r-- 1 root root      881 Jan 13  2016 fwmatrix.txt
    -r-xr-xr-x 1 root root     6737 Jan 13  2016 hpsetup
    -r-xr-xr-x 1 root root  1653176 Jan 13  2016
    .hpsetup
    -r--r--r-- 1 root root      423 Jan 13  2016 readme.txt
    -r--r--r-- 1 root root    18222 Jan 13  2016 reference.xml

    # ./.hpsetup
    ---------------------------------------------------
    Loading references...done.
    Performing discovery...
    Preparing the Emulex Kit...done
    Performing flash -- DO NOT INTERRUPT!
    Executing flash engine: ./elxflashStandalone*/lx/elxflash.sh /ucna /sysfs  /update 1>> /var/cpq/Component.log 2>> /var/cpq/Component.log 3>> /var/cpq/Component.log
    Flash Engine exit code: 0
    All updates were successful.  Reboot needed.
    Flash complete [1]

    So the update has completed successful with Exit Code 1 which means a reboot is required to activate the new firmware

    OR the update can also be done as we did our downgrade using the below steps

    # cd /usr/lib/x86_64-linux-gnu/hp-firmware-cna-emulex-2016.02.02-1.1

    # unzip elxflashStandalone-linux-10.7.110.34-1.zip

    # cd elxflashStandalone-linux-10.7.110.34-1/lx/

    # ./elxflash.sh /ucna /sysfs  /update

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:4A,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=00:17:A4:77:00:4A,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B1,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B1,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B2,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B2,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B3,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success

    Fri Jul  1 13:18:28 2016
    HBA=OCe14100-NIC, Port Type=NIC, MAC=70:10:6F:58:3B:B3,
    Update=Firmware, Image=oc14-10.7.110.34.ufi, New=10.7.110.34, Old=10.2.477.23, Status=Success


    elxflash: All required updates succeeded - Return Code=0

    Please reboot system to activate new firmware.

    Either way you will can perform the NIC firmware update.

    Updated NIC firmware version can be seen below.
    # ethtool -i eth0
    driver: be2net
    version: 10.2.477.6
    firmware-version: 10.2.477.23 [
    10.7.110.34]
    bus-info: 0000:06:00.0
    supports-statistics: yes
    supports-test: yes
    supports-eeprom-access: yes
    supports-register-dump: no

    NOTE: The new firmware will be activated after a reboot of the blade

    I hope this article was useful.

    Follow the below links for more tutorials

    Step by Step Linux Boot Process Explained In Detail
    10 examples to help you understand top command usage in Unix/Linux
    Script to take backup of any critical directory in Unix/Linux
    Configure Red Hat Cluster using VMware, Quorum Disk, GFS2, Openfiler
    Tutorial for Monitoring Tools SAR and KSAR with examples in Linux
    How to configure Samba 4 Secondary Domain Controller
    How to secure Apache web server in Linux using password (.htaccess)
    How to register Red Hat Linux with RHN (Red Hat Network )
    15 tips to enhance security of your Linux machine
    Why is Linux more secure than windows and any other OS
    What is the difference between "su" and "su -" in Linux?
    What is kernel-PAE in Linux?
    What is swappiness and how do we change its value?
    How to log iptables messages in different log file
    What are the s and k scripts in the etc rcx.d directories
    What is virtual memory, paging and swap space?