This blog is owned and manged Ahmed Amer. ((My Contacts: ahmedamer12@gmail.com , Don`t hesitate to contact me if u need to ask about any thing related to AIX!))
Wednesday, June 12, 2013
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.
- I am told that Linux can indeed play this format - have a look at this website for hints Ubuntu - Installing Mplayer Codecs and installing OpenSUSE codecs is really simple too.
- 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.
Thursday, January 31, 2013
A one-line HMC command to check the managed systems and its LPARs
I wrote couple of blogs about :
Checking the LPARs in a phyiscal machines from the HMC CLI
And Checking the connected physical machines to HMC using the CLI.
For the sake of the simplicity and to quickly get the desired information,I found a one-command line and (my friend Sakker,the owner of www.how-2-know.com ) edited it to make it visually easier to read and understand!
hscroot@myhmc:~>for m in $(lssyscfg -r sys -F name); do echo "......................";echo "Physical Machine ===> $m";echo "--------------" ; lssyscfg -r lpar -m $m -F name:state ; done
This command gives you the name of the Physical Machines and the name of the LPARs withing each one!
Checking the LPARs in a phyiscal machines from the HMC CLI
After I wrote a blog about Checking the connected physical machines to HMC using the CLI ,
I wondered why I don`t guide you to get more info from the the HMC CLI and what came 1st into my mind is "checking the LPARs and its state withing a physical machine"
let me rtemind you and tell you how to get the name.serical number and the state of the physical machine:
hscroot@myhmc:~> lssyscfg -r sys -F name:serial_num:state
amer:1234567:operating
Up till now what we got are:
-pysical machine called "amer"
-the serial umber of the machine which is 1234567
-the state of the machine which is operating
The question now is "how many LPARs are in this machine?"!
The short answer(there is shortest answer from the HMC GUI) is to the run the following command:
hscroot@myhmc:~> lssyscfg -r amer -r lpar -F name:statelpar1:Running
lpar2:Not Activated
VIOS:Running
Now you get a clue about the Name of the LPARs and its stat!
Checking the connected managed systems (physical machines) to HMC using the CLI
Sometimes and for whatever reasons you would like to know or get the name of the physical machines that are connected to your HMC.
The easy way is to check them from the HMC GUI interface!
The geeky way is to discover them from the HMC CLI.
let`s discover the name of the connected machines:
hscroot@myhmc:~> lssyscfg -r sys -F name:serial_num:state
This simple command tells you about the following:
-the name of the machines
-the serial number of the machines
-the state of the machines
Note:the command vtmenu gives you only the name of the machines!
That command could be handy if you want to collect the serial number and the state of all your physical machine with one-command line!
Related blogs:
Checking the LPARs in a phyiscal machines from the HMC CLI
Monitoring and Modifing HMC file systems
Full HMC file systems cause serious problems that affect the HMC operations.Monitoring HMC file systems is an easy task,But you have to Enabling the HMC for remote command execution!
Let us start by know how to Enabling the HMC for remote command execution:
Follow this guide to accomplish this task:
http://pic.dhe.ibm.com/infocenter/director/v6r1x/index.jsp?topic=/director.virtual_6./eica7_t_enabling_hmc_7_remote_command_execution.html
Now,you could open SSH session with your HMC.once you logged in (default user name "hscroot" and default password "abc1234"),you get restricted shell.
Although,you log int HMC with restricted shell ,you still have the ability to monitor and Modify the File systems of the HMC!
-To Monitor the file systems
#monhmc -r disk (the default time interval is every 4 sec)
Note: full /var file systems cause a lot of problems!
Additionally ,you can set time count to monitoring your HMC file systems :
#monhmc -r disk -n 10 (every 10 sec)
For the sake of completion,i have to tell you about another command to monitor and check your HMC file systems which is lshmcfs ,thie command gives you much more information!
Let`s see how we can clean up the full file systems:
Freeing up HMC file systems (to be more specific,freeing up the logs),we simply run:
#chhmcfs -o f -d 0
-o inidacate opration and "f" means freeing
-d meaning no. of days and zero means ALL
NOTE: chhmcfs frees up space in Hardware Management Console (HMC) file systems. Space is freed by removing temporary HMC files that are used for HMC and managed system firmware problem analysis from the HMC hard disk.
If for any reason you want to freeing up a specific file systems or do more sophisticated tasks,then you need full access with root privilege to you HMC.To get root access ,give your IBM guy a call to give you a password based on your serial machine(valid for only 24 hours).
This way of accessing the HMC with root is called PESH,Produce Engineering Shell.
The scope of this blog dose not cover the PESH,for more info go to the following link:
http://www-01.ibm.com/support/docview.wss?uid=nas1dba3b86d228b9b6c862570d1008009fd
Tuesday, January 15, 2013
Subscribe to:
Posts (Atom)