Monday, February 4, 2013

Rename a managed system(physical machine) from the HMC CLI




To rename the managed systems(physical machines) that are connected to your HMC,run the following command:



hscroot@hmc> chsyscfg -r sys -m managed_system_name -i \ 
"new_name=New_Managed_system_name"
 
 
Example: 
Let`s assume we have a managed system name called
"power795.2uhr45.2011023" ..uggh,not an easy name to 
memorize and remember,let`s rename it "amer123"  

hscroot@hmc> chsyscfg -r sys -m power795.2uhr45.2011023 \
-i "new_name=amer123"  


If you don`t know how to get the name of the managed 
systems,check out the following blog:
Checking the connected physical machines to HMC using the CLI  

HMC Scanner(Java tool to document and monitor HMC/LPARs/VIOS)




I want to tell you about that helpful,informative and handy tool which is called HMC Scanner.

Federico Vagnini,IBM Italy(vagnini@it.ibm.com)
is the author of this tool!

This tool gives you a lot of information easily and in an organized excel sheet.


Am I hearing you LOUD wow yet? ;-) 
If you are not attracted to this tool yet,then check below Information(that u HMC Scanner gives you) is organized in tabs:

  • System summary: name, serial number, cores, memory, service processor IP for each server
  • LPAR Summary: list of all LPAR by serve with status, environment, version, processor mode
  • LPAR CPU: processor configuration of each LPAR
  • LPAR MEM: memory configuration of each LPAR
  • Physical Slots: list of all slots of each system with LPAR assignment, description, physical location and drc_index
  • Virtual Ethernet: network configuration of each virtual switch and each LPAR
  • Virtual SCSI: configuration of all virtual SCSI adapters, both client and server
  • VSCSI Map: devices mapped by each VIOS to partitions
  • Virtual Fibre: virtual fibre channel configuration of client and server with identification of physical adapter assigned
  • SW Cores: LPAR and virtual processor pool configuration matrix to compute the number of software licenses. Simulation of alternative scenarios is possible.
  • CPU Pool Usage: easy to read history of CPU usage of each system. Based on last 12 months of lslparutil data.
  • Sys RAM Usage: easy to read history of physical memory assignement to each LPAR. Based on last 12 months of lslparutil data.
  • LPAR CPU Usage: easy to read history of CPU usage of each LPAR. Based on last 12 months of lslparutil 


To download HMC Scanner and get much info,follow this link: https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/Power%20Systems/page/HMC%20Scanner


Check the following screenshots to get yourself familiar with the output of the HMC Scanner










Notes:
-In PureFlex environments, only Power Systems compute nodes are detected.
-This tool is not officially supported by IBM. No guarantee is given or implied, and you cannot obtain help from IBM.
 
 

Obtaining an unrestricted shell on the HMC and log on as root




When you start a SSH session to you HMC,you get restricted SHELL.  

To obtain unrestricted shell and get the root with its all privileges,Follow the following link and check out the following 2 screenshots:

Accessing the Product Engineering Shell (PESH) Command Line 







POWER6/POWER7 and AIX6 Hands-On Technical Product Demonstrations(Videos)



The following link contains amazing videos explaining varaity of technologies from IBM (AIX,VIOS,WPAR,SDMC,..etc)



http://www.ibm.com/developerworks/wikis/display/wikiptype/movies


https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/Power%20Systems/page/Hands-On%20Technical%20Movies




Notes on getting the movies to work on your PC:
  • These movies are in Windows Movie Format (.wmv) to make them small enough to watch over the internet or download but this means some quality has been lost from the Audio Video Interleave (.avi) originals which are 60 MB to 90 MBs in size.
  • When tested on some PCs it took 4 to 5 minutes to start the movie - please be patient and don't just assume its broken - some browsers download the entire movie before they start playing it.
  • Other browsers handle the media file differently - some start Windows Media Player and some start it within the browser itself. Also I have found that some auto resize the movie to fit the window - so start the movie in a suitable sized browser window. The movies where first recorded at 1024x768 but later ones at 800x600 but higher resolution. Sorry but I rather create new movies than try to regenerate them all to one size. If the movie does not fit your screen the best fix is to upgrade your screen to at least 1280x1024
  • If all else fails try to download the .wmv file and play locally on your machine: using Right Click on the Download link below and selecting "Save Link as" or "Save Target as". This may highlight your PC does not support this format (good luck sorting that out!).
  • Linux workstation users - ideas please, can Linux handle the .mwv format? If so, how or a good alternative solution is welcome.
  • Windows 7 users - some of the older movies do not work with Windows 7 Media Player. This appears to be missing CODEC's from Windows 7 that were in early Windows versions send your comments to Microsoft. We fixed this by downloading the ACELP CODEC from http://www.voiceage.com/acelp_eval.php - strictly at your own risk. I installed the Vista-64 version as I run Windows 7. Then watching the movie via the Windows Media Center (not the Player).
  • For Windows 7 these movies have been remastered (August 2010) to fix Windows 7 problems of lack of certain CODECs found in earlier Windows versions, poor audio or hangs half way through: DFP, HMC7 Partition Mobility, Memory Keys, Partition Priority, CPU Pools and Monitoring Pools, Ganglia and PowerVM LX86.
  • Feed back and further ideas for movies to Nigel Griffiths - nag at uk dot ibm dot com

Sunday, February 3, 2013

Run VIOS command from the HMC terminal (hacking the VIOS from HMC)




If ,for whatever reason, you can`t get access to your VIOS because the Desktop that you are using in different VLAN and dose not has access to the VIOS OR you don`t have the VIOS server Username and Password! 

Well,You don`t have to worry about that ;-) 

First of All,We need to run couple of commands to get the following info:
1)the name of the managed system
2)the ID of the VIOS LPAR

To get the name of the managed system:
hscroot@hmc:~> lssys -r sys -F name
 amer-power795

Where amer-power795 id the name of the managed system.

To get the the LPAR ID of the VIOS:
hscroot@hmc:~> lssys -r lpar -m amer-power795 -F name,lpar_id
VIOS,1
amer,2 

Where VIOS and amer are the name of the LPARs on the managed system amer-power795


I could tell you that you are ready to start hacking and diving into your VIOS server without the need to user name and password.

hscroot@hmc:~> viosvrcmd -m amer-power795 --id 1 -c "The VIOS Command"

Examples 
--------   

-To check the SCSI mapping,run:
hscroot@hmc:~> viosvrcmd -m Power720.2-8202-E4B-SN06CDA0P --id 1 -c "lsmap -all" 


-To check all the adapters,run:
hscroot@plazahmc:~> viosvrcmd -m Power720.2-8202-E4B-SN06CDA0P --id 1 -c "lsdev -type adapter"

-To check the Virtual adapters:
hscroot@plazahmc:~> viosvrcmd -m Power720.2-8202-E4B-SN06CDA0P --id 1 -c "lsdev -type adapter -virtual -field name status"



Hope you like this tricky and geeky piece of info!  :)

 


 
     


Check the Physical adapters and resources of managed systems from the HMC




How to check how many adapters are connected and plugged-into a physical machine that is connected to the HMC!

The simple and the short answer is to check it from the HMC GUI interface!

But,let`s say the Network/Security guy unintentionally closed the ports that let you to access the HMC GUI and did not close the SSH port.If so,then no worries ,You still could accomplish the task and check the physical adapters!

Furthermore,If you would like to document the physical resources of your environment,you have 2 options: 
1)check the the managed systems propters from the HMC GUI intrface (consumes time)
2)run a simple command line and accomplish the task in a few sec ;-)

Before telling you about the command ,let me remind you about another command that you need to get the name of the managed system(physical machines):

#lssyscfg -r sys -F name:serial_num:state
The above command directly and clearly gives you the name of the managed systems! 


After you get he name of the managed systems,you are ready to fire away:

#lshwres -r io -m Power720 --rsubtype slot -F lpar_name:drc_name:description    

Note: Power720 is the name of the managed system! 


The next 2 screenshots prove that the output from the HMC GUI is the same like the output from the HMC CLI.