DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.


HMC basic commands

Steps: 
Show managed frames attached to a hmc
lssyscfg -r sys -F name:type_model:serial_num

Show managed lpars attached to a frame
lssyscfg -m <frame> -r lpar -F name

Show profiles from a specific lpar
lssyscfg -r prof -m <frame> --filter "lpar_names=<lpar>"

Shutdown lpar from HMC
chsysstate -m <frame> -r lpar -n <lpar> -o shutdown –immed

To perform a partition shutdown using the shutdown command on the client operating system
chsysstate -r lpar -o osshutdown –n <lpar> -m <frame>

To perform a delayed partition shut down (white button shut down):
chsysstate -r lpar -o shutdown –n <lpar> -m <frame>

To perform an immediate partition shutdown (operator panel function :
chsysstate -r lpar -o shutdown --immed –n <lpar> -m <frame>

To perform an immediate restart of a partition (operator panel function 3):
chsysstate -r lpar -o shutdown --immed --restart –n <lpar> -m <frame>

To perform a restart of a partition after initiating a dump (operator panel function 22):
chsysstate -r lpar -o dumprestart –n <lpar> -m <frame>

Boot lpar
chsysstate -r lpar -m <frame> -o on -n <lpar> -f <profile>

To perform a partition boot into system management services:
chsysstate -r lpar -m <frame> -o on -n <lpar> -b sms

To perform a partition boot into diagnostic with default bootlist
chsysstate -r lpar -m <frame> -o on -n <lpar> -b dd

To perform a partition boot into diagnostic with stored bootlist
chsysstate -r lpar -m <frame> -o on -n <lpar> -b ds

To perform a partition boot into diagnostic with stored bootlist
chsysstate -r lpar -m <frame> -o on -n <lpar> -b ds

To perform a partition boot into open firmware OK prompt
chsysstate -r lpar -m <frame> -o on -n <lpar> -b of

To perform a partition boot into normal mode
chsysstate -r lpar -m <frame> -o on -n <lpar> -b norm

Show free processor/memory/adapters on specific frame/lpar

Proc
lshwres -r proc -m <framename> --level sys
lshwres -r proc -m <framename> --level lpar

Mem
lshwres -r mem -m <framename> --level sys
lshwres -r mem -m <framename> --level lpar

Adapters
lshwres -r hca -m <framename> --level sys
lshwres -r hca -m <framename> --level lpar

Show io resources in a frame
lshwres -r io --rsubtype unit -m <frame>
lshwres -r io --rsubtype bus -m <frame>
lshwres -r io --rsubtype slot -m <frame>


What to do if you cannot execute CHMOD?


If you just ran 'chmod -x /bin/chmod'. What to do? How to recover it?
 
If you have just removed execute permission on chmod (/bin/chmod).
So that now you cannot modify file permissions. Not even for chmod itself .
chmod remains useless on your system.

Here is the solution for the problem.

Run the below commands whichever works in your server.

sudo /lib/ld-linux.so.2 /bin/chmod 755 /bin/chmod

or

perl -e 'chmod(0755, "/bin/chmod")'