Check connection (rsh or nimsh) between NIM server and LPAR

NIM server needs to be connected with LPARs, either using rsh or nimsh protocol. In case this communcation is lost, mksysb backups or other tasks from NIM to this lpar will fail. So, I have made this simple script to check this connectivity between NIM and LPAR.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/ksh
# Copyright (C) 2012 Israel Garcia iga3725 @ yahoo.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program
# You need to add parameter $1 as the name of the lpar (machine resource) to the script:
#
# Check machine resource exist on NIM:
lsnim -c machines|grep "$1" 1>/dev/null
if [[ $? -eq 0 ]] ; then
   echo
     else
    echo "ERROR: $1 machine resource does not exists on NIM." && exit 1
fi
#
nim -o lslpp $1 |grep bos.rte.odm 1>/dev/null
 
if [[ $? == 0 ]];then
    echo "Communication NIM-LPAR $1 is OK!!"
else
    echo; echo "ERROR: There's no connection between NIM and LPAR $1. Check configuration."
fi
echo

Just thanks if the post was helpful

5 (3)
Article Rating (3 Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
How to mirror the rootvg in AIX?
Viewed 4602 times since Mon, May 21, 2018
AIX Changing ’defined’ or ’missing’ hard disk states to ’Available’ in IBM Smart Analytics System for AIX environment
Viewed 9019 times since Wed, May 22, 2019
How to Analyze or Read OS Watcher Output in three easy steps -- With Example ?
Viewed 40407 times since Thu, Jun 21, 2018
How to clear/clean/erase/delete/reset network adapter configuration on AIX?
Viewed 12139 times since Thu, Nov 29, 2018
AIX: How to determine which application created the OS core file
Viewed 2242 times since Mon, Jun 11, 2018
0516-787 extendlv: Maximum allocation for logical volume error
Viewed 8295 times since Tue, Mar 12, 2019
Finding password rules in AIX
Viewed 2436 times since Mon, May 28, 2018
How to determine why your AIX oslevel is downlevel (and a script to help!)
Viewed 3678 times since Fri, Jul 13, 2018
replacing (hot-swap) failed disk in rootvg
Viewed 8717 times since Thu, Sep 20, 2018
Altering LVM Configuration When a Disk is Not in ODM Anymore
Viewed 2747 times since Mon, Jun 3, 2019