Monday 30 July 2018

Maximo Asset Management 7.6.1 Released | IBM Maximo

IBM released Maximo 7.6.1 on 27 July, 2018. Here is a sneak preview of what users can expect in Maximo 7.6.1.
New features and capabilities will help your organization achieve greater asset management efficiency through improvements in usability, integration, installation, and business intelligence.




What’s New in Maximo 7.6.1?


Monday 23 July 2018

Failover - Host two will be added in hosts file If Host one is Down | Linux

This bash script we used for our of our client.
to use simple create a file e.g failover.sh and paste the below mentioned script into it.
now configure a cronjob to run this script every after 5 minutes or whatever you like.

#!/bin/bash
HOST1="10.2.4.115"
HOST2="10.2.4.116"
COUNT=4
for myHost in $HOST1
do
  count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }' 2>/dev/null)
  #count=$count"skj"
#  echo $count" ccc"
  if [ $count -gt 0 ]; then
    # 100% failed
    g_count=`grep -c $HOST1 /etc/hosts`
    if [ $g_count -eq 0 ]; then
      echo "change host1 ip"
     `cat /etc/hosts | sed 's/10.2.4.116/10.2.4.115/' > /etc/hosts_tmp`
     `cp /etc/hosts_tmp /etc/hosts --reply=yes`
    fi
    echo "Host : $myHost is UP"
  else
    g_count=`grep -c $HOST2 /etc/hosts`
    echo $g_count
    if [ $g_count -eq 0 ]; then
      echo "change  host2 ip"
     `cat /etc/hosts | sed 's/10.2.4.115/10.2.4.116/' > /etc/hosts_tmp`
     `cp /etc/hosts_tmp /etc/hosts --reply=yes`
    fi
    echo "Host : $myHost is down"
  fi
done

Tuesday 3 July 2018

Get Application Name in Maximo Automation Script (Python/Jython) | IBM Maximo

Below is the Example to use an application name in automation script. Display certain error message if current application is Work Order Tracking (Oil):