Monday, 23 October 2017

Syslog Configuration in Routers | Cisco

Syslog Configuration in Packet Tracer

router >
enable
configure terminal
int fa 0/1
ip address 192.168.0.100 255.255.255.0
no shutdown
exit
logging 192.168.0.1 #ip of syslog server


now connect a Syslog server with router int fa0/1
and set ip same as mentioned in logging 192.168.0.1


:) we are done.


Port Mirroring, Switch Port Analyzer (SPAN) or Sniffing | Cisco

Port Mirroring, Switch Port Analyzer (SPAN) or Sniffing

switch>
enable
config terminal
monitor session 1 source inter fa 0/1
monitor session 1 source inter fa 0/2
monitor session 1 destination int fa 0/24
exit
show monitor

done:)

Monday, 16 October 2017

Anonymize or Replace text within a File using SED | Linux

Stream Editor aka 'sed' is a *nix utility to transform and parse text.

for example.
if a file testing.txt contains some text like ' helloworld.zip ',  it will be replace with any text or we can use $RANDOM function also.
sed s/hello.*zip/"hello://$RANDOM.zip"/g testing.txt
the final result will be like this:
hello12345.zip (any random number)
/g means all occurrence of this text


Friday, 13 October 2017

Find and Delete All Files Older than 10 Days using mtime | Linux

#to file files older than 10 days:
find /home/folder/ -mtime +10;

#now append it with -exec switch +  rm {} loop to delete all found files:
find /home/folder/ -mtime +10 -exec rm {} \;

----------------------
#and to find only in specific directory ignore sub directories

find /home/folder/ -maxdepth 1 -mtime +10

Monday, 9 October 2017

Install and Configure Target iSCSI Server on Windows Server 2012 | Windows

1. in Add new Role and Feature > Navigate to Server Roles
2. under File and Storage Services > Check iSCSI Target Server > > Install.

3. again in Server Manager, a new File and Storage Services has added,
Click on Launch the new Virtual Disk wizard to create Virtual Disk

Select iSCSI virtual disk Location: Select Drive/ or custom Path
Next
Specify iSCSI virtual disk size:  10GB
iSCSI Target. New iSCSI Target > Next
Target Name and Action : any name > Next
Access Servers (list initiators so the disk be presented to only these): ADD by IQN or IP etc
Next > Create(b).
Close(b).
-------------------------------
on Client as Initiator: 

Start iSCSI Initiator
Targets(T): Target: enter IP (ie. 10.1.1.100), Quick Connect(b)
Done(b)

now verify in Disk Management, a new disk is added with 10GB space. 

Thursday, 28 September 2017

Creating a Dialog Window | IBM Maximo

You can add a new dialog window to a specific application or you can make it
available for use by all applications. You must modify an XML file to create a
dialog window and import the modified file into the Application Designer. After
importing it, you can modify the new dialog window in the Application Designer.

Procedure:
  • In the Application Designer, export one of the following XML files:
    • In the List tab, click Export System XML in the Select Action menu to export the library.xml file if you want to add a new dialog for use by all applications.
    • In the Workspace tab, click the Export Application Definition icon to export the presentation.xml file if you want to add a new dialog for use by a specific application.
  • The XML definition opens in a new browser window.
  • Save the XML definition to a local file and open it with a text editor.

Sunday, 24 September 2017

Enforce Unique Key & Fetch Records From Unsaved MBO Using Automation Script | IBM Maximo


This automation scripts describes the enforcing of unique key to the object, Fetching and looping through unsaved rows of MBO Set from memory.
We have taken the example of restricting the users from selecting same itemnum multiple times in spare parts of asset. It works on both saved and unsaved objects.

Launch Point: Attribute Lauch Point
Business object:  SPAREPART
Attribute: ITEMNUM
Variable: ar_item bind with ITEMNUM of object SPAREPART

Increase The Workflow Map Display Size Maximo | IBM Maximo


Please follow the provided steps below:
  • Go to Directory  ...\maximo\applications\maximo\maximouiweb\webmodule\webclient\css
  • Search for the file maximo.css
  • Change the height/width in the wfmd tag which looks like this:
         /* wfmapdiv */
         .wfmd
         {
         width:800px;
         height:375px;
         border:1px solid #999999;
         overflow:auto;
         }

Friday, 22 September 2017

Increase "Systems" Window Display Size On Asset/ Location Drilldown | IBM Maximo


Some users complaint that the "Systems" window display size is very small on asset/ location drilldown as shown in the screenshot below.




Solution:
  1. Open the Application Designer and select the Export System XML action from the menu. 
  2. Click on the small arrow for the LIBRARY row to export the file. 
  3. Open the XML file with a good text editor and search for "system".

Wednesday, 20 September 2017

Synchronizing Active Workflow Processes without Creating Revision of Main Process | IBM Maximo

A workflow process can include one or more sub-processes. When you modify a sub-process, you must update the main process so that it uses the revised sub-process. This process is known as synchronization.
You must enable the sub-process revisions before you can synchronize a workflow process.
Solution:
  1. In the Workflow Designer application, Create the sub-process revision and Enable it.

Assigning Meters/ Meters Group To Multiple Existing Assets Using Asset Templates | IBM Maximo


  1. Click Go To > Assets > Asset Templates
  2. Click on ‘New Asset Template’
  3. Click on ‘Meters’ tab and enter the following.
  4. Do not enter any other detail on asset template (except template code and description).
  5. Save the record

Monday, 18 September 2017

Difference between sqlplus /nolog & Sys as sysdba


sqlplus /nolog :
you are not connecting to any user, instance or database;

sqlplus / as sysdba :
you are connected with 'SYS' through os authentication if enabled with ORACLE_SID. 

Wednesday, 9 August 2017

What is inode in Linux and IF You are Out of It (solution) | Linux

inode is basically a count of total number of files in directories of a user account in *nix systems.

similar to a unique identification of individuals in a country.

inode is data structure , it contains:
size,
user id,
group id
device id,
mode and access
protection
timestamps
links
points
etc.
except file name, and contents. 


Tuesday, 8 August 2017

How to Reset Cisco 26xx, 28xx Series Router (Password Recovery) | Cisco

Reboot your router and hold CTR+BREAK sequence to enter into Rommon mode. and enter these 2 commands

rommon 1 > confreg 0x2142
rommon 2 > reset
done :)

Now revert your router sequence back to normal:

Router>enable
Router#config terminal
Router(config)#config-register 0x2102
Router(config)#exit
done:) 

Thursday, 25 May 2017

Embed HTML in Maximo Labels | IBM Maximo

Suppose we want to color the label of prnum in PR application.

1. in application designer, open property dialog of desired control. (PR in my case)
2. copy and paste below mentioned html label field in control properties:

<font style="background-color:blue; color:white; font-weight:bold;">PR</font>

3. Save and we are done :)

Thursday, 18 May 2017

Sequence Error when Uploading Assets using MIF | IBM Maximo

for instance look at this error:
BMXAA8010E - An asset with the asset identifier 16,058 already exists. Enter a new asset identifier

Solution is very easy , just need to increment object's sequence (asset in my case)

Run these below mentioned command one by one in sqldeveloper(Oracle):

1. Increment of 10,000 in AssetIdSeq sequence:
ALTER SEQUENCE assetidseq INCREMENT BY 10000;

2. Now run this select command once to update Asset Sequence Id
SELECT assetidseq.nextval FROM DUAL;

3. in last run this command to set Asset's Sequence back to routine:
ALTER SEQUENCE assetidseq INCREMENT BY 1;

Reference: http://www-01.ibm.com/support/docview.wss?uid=swg21998810

Tuesday, 9 May 2017

Keyattribute in Custom Application for Better Search | IBM Maximo

1. Export presentation xml
2. Append keyattribute=<custom filed>
(for example, in PR application, db unique field is PRID, but for as end user we use PRNUM)

<presentation id="PRID" keyattribute="PRNUM" ismobile="false" mboname="CUSTOMPR" resultstableid="results_showlist" version="6.0.0">



Monday, 8 May 2017

Sort out of the box lookups using ORDERBY by using LOOKUP.XML - IBM Maximo

1. Open LOOKUP.XML in your favorite editor, mine is Notepad++ and find html tag looks like this:

<table id="worktype" inputmode="readonly" selectmode="single"
2. append this line and add where clause, and it will become like this:
<table id="worktype" inputmode="readonly" selectmode="single" orderby=" REPORTDATE desc">

Monday, 1 May 2017

Shortest Way to Create a Custom Lookup (MBONAME attribute in xml) | IBM Maximo

1.Insert this into looksup.xml
<table id="custum_lookup" inputmode="readonly" mboname="custom_object" selectmode="single">
<tablebody displayrowsperpage="20" filterable="true" filterexpanded="true" id="custum_lookup_lookup_tablebody">
<tablecol dataattribute="description" id="custum_lookup_lookup_tablebody_col_2" mxevent="selectrecord" mxevent_desc="Go To %1" sortable="true" type="link"/>
</tablebody>
</table>

2. Add this table id (custum_lookup) as lookup in application designer.
3. Add source and target in Edit Lookup Map.

We are done :)
-------------------------------
another example with whereclause

Wednesday, 19 April 2017

Duplicate Start Center Template | IBM Maximo

1. Create a new empty Start Center Template, Save and write down sctemplateid.

Now run these SQL queries and modify source and targetIds:

update MAXIMO.SCTEMPLATE
set presentation=(SELECT presentation FROM MAXIMO.SCTEMPLATE where      sctemplateid=<SourceID>)
where sctemplateid=<TargetID>;

update SCTEMPLATE set PRESENTATION=replace(PRESENTATION,'startcenter contentuid="<sourceID>"','startcenter contentuid="<TargetID>"'), where sctemplateid=<new SCTEMPLATEID>;

Monday, 3 April 2017

Manually Updating Database, Building and Deploying EAR WebSphere | IBM Maximo

If you really do not want to use ConfigUI.exe utility due to any reason, then below mentioned commands will help you out to manually update the Maximo database,build and deploy the EAR file.

install_home\maximo\tools\maximo\updatedb

install_home\maximo\deployment\buildmaximoear

install_home\ConfigTool\scripts\reconfigurePae.bat  -action updateApplication -deploymaximoear

We are Done :) 

if error occurs or if ConfigUI.exe get blank, use this link it may resolve your error. 
http://www-01.ibm.com/support/docview.wss?uid=swg21454722

Monday, 20 March 2017

ES6 Arrow Functions: The New Fat & Concise Syntax in JavaScript

Arrow function (fat arrow functions are new ES6 syntax for writing JS functions to save developers time ease of scope.

//param1, param2 => expression

//ES5 old school
var multiply = function (x,y){
return x*y;
};
console.log(multiply(2,3));

//ES6
var multiplynew = (x,y) => { return x*y};
console.log(multiplynew(3,4));


Saturday, 18 March 2017

Auto population of LEAD field on Work order | Maximo Functional

1. Group default flag on persongroupteam of person group on the work order.

2. if the work order is generated from PM, then PM.LEAD 

3. alternate person for each primary member in PG. 

if 

group default is not available for the 

target/schedule start time of workroder. 

then 

alternate person.


Availability is determined from the primary calendar field PERSON.PRIMARYCALNUM.

Friday, 17 March 2017

Launch in Context, Locate People with Google Map | IBM Maximo

Launch an external website or call an external API in a context. In our case, the context is an application record we are in.

it means the LIC is used to integrate with other products.
let us discuss it with an example, in People appliation, WILSON's addresses (bill to and ship to) will be displayed on google map.



org's address
ibmbrasil
ibmpakistan

1. in people, filer WILSON
set WILSON's workplace as shipto billto addresses.

2. we will use google api to show marker on map for WILSON's addresses. B for bill-to and S for ship-to
(https://developers.google.com/maps/maps-api-list)

Thursday, 16 March 2017

Child Dataset in BIRT using Scripted Data Source | IBM Maximo

developing complex reports for Maximo requires a number of data sets in Birt sometimes. And definately every second dataset is a subset/or dependent of Main dataset. therefore every child dataset takes a parameter as input from MainDataSet.

for example;
A PO data set,
and a POLINE dataset, poline dataset takes PONUM as InputParameter from PO.

1. create a Paramter in PolineDataSet "Edit DataSet"
PONUM, String, Input, NULL
2. In Layout tab, draw table, and in Table Data Binding
a Click on DataSet Parameter Binding (b)
b Click Edit (b)
c type/select row["ponum"]
3. In PoLineDataSet's Open event (4 things)
i data source provider
ii dataset open
iii set query
iv Query Parameters

3(i) SetQuery:
we need to append our where class in (iii) set query part
sqlText = "select * from PO where ponum = ?";

don't forget to comment this line in child dataset "where " + param["where"]

3(ii) Query Parameter:
name first paramater in this line
polineDataset.setQueryParamterValue(1,inputParams["ponum"]);