How To
Summary
It can be tricky to work out but there is a simple answer.
Objective
Steps
Asked at the Technical University:
- How can we tell (in a shell script) that we are running in a WPAR context or on a regular AIX environment?
uname -W
0
The "uname -W" command returns:
- Zero for the Global AIX or a regular AIX
- The WPAR Number when in a WPAR (that is a non-zero value)
wparno=`uname -W`
if (( $wparno == "0" ))
then
echo Global AIX
else
echo WPAR number $wparno
fi
Easy, once you know how.
Additional Information
Other places to find Nigel Griffiths IBM (retired)
Document Location
Worldwide
[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"","label":""}],"Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
12 June 2023
UID
ibm11165414