HMC one liner script to run a command on every VIO server

, par  brian_s , popularité : 2%

Here is a quick HMC one line script to run a command on every VIO server attached to the HMC. It uses "viosvrcmd" which uses RMC so there is no SSH keys or anything to setup ; it just works as long as RMC is working in your environment.

In this example, it runs the "errlog" (aka errpt) command on every VIO server. You can change this to whatever command you would like to run. The script looks through all managed systems for VIO partitions, and attempts to use viosvrcmd to run the specified command on each VIO server.

for sys in lssyscfg -r sys -F name ; do for vio in lssyscfg -r lpar -m $sys -F name,lpar_env | grep vioserver | cut -f 1 -d, | sort ; do echo $vio ; viosvrcmd -m $sys -p $vio -c errlog ; done ; done

Voir en ligne : https://www.ibm.com/developerworks/...

Publications Derniers articles publiés

Sites favoris Tous les sites

84 sites référencés dans ce secteur