AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
Expand all | Collapse all

HMC Report scripts

  • 1.  HMC Report scripts

    Posted Fri October 07, 2005 02:45 PM

    Originally posted by: SystemAdmin


    Is there any script built into the HMC to create a report documenting it's managed systems?

    The low level commands needed to produce the report are all there, (lssysconn, lssysconn, lshwinfo, lshwres, etc). I'm thinking about writting some scripts but don't want to re-invent the wheel.

    Getting around the restricted shell might be a pain, but I could use expect or ssh commands to gather the info.
    #AIX-Forum


  • 2.  Re: HMC Report scripts

    Posted Sat October 08, 2005 10:35 AM

    Originally posted by: BruceSpencer



    The HMC lssyscfg command can be used to create a report. See

    http://www.aixtip.com/AIXtip/hmc_lssyscfg.htm

    #AIX-Forum


  • 3.  Re: HMC Report scripts

    Posted Fri October 14, 2005 11:49 AM

    Originally posted by: SystemAdmin


    Hi, i have created a web based report for the HMC using ssh to login to hscroot and pull back the details off the HMC.

    One point to notice, if you are using F-Secure-ssh on AIX you will need to covert the keys into openssh format before you will be able to contact the hmc.
    #AIX-Forum


  • 4.  Re: HMC Report scripts

    Posted Fri October 14, 2005 11:54 AM

    Originally posted by: SystemAdmin


    Very cool, but how do you make the script run? Do you have to enter a password? Or did you add the key to the authorized_keys file? If so, how did you edit the authorized_keys file?
    #AIX-Forum


  • 5.  Re: HMC Report scripts

    Posted Thu October 27, 2005 10:23 PM

    Originally posted by: MisterX


    any chance you can share those? email maybe?
    #AIX-Forum


  • 6.  Re: HMC Report scripts

    Posted Mon October 31, 2005 04:54 PM

    Originally posted by: SystemAdmin


    I've been working on a script to do the reporting I wanted, and also to allow me to start, stop, and get status on partitions from an easy text menu.

    The script I wrote is meant to be run from a system other than the HMC, and the commands are sent to the HMC via ssh.

    This is because I couldn't figure out an easy way to load scripts onto my HMC. Changing the scripts to run directly on the HMC would be trivial.

    So I submit my script hmcMenu for your approval. Let me know what you think. As a report, it is a little lacking at the moment, I plan on HTMLizing the output, and adding target/anchor links, and a table of contents to make it easier to browse.

    The script is located at http://www.the-welters.com/professional/scripts/hmcMenu.txt

    As I mention in the script comments, you'll want to have ssh agent set up if you want to use this script convienently... Otherwise you'll get prompted for your HMC login password repeatedly.


    #AIX-Forum


  • 7.  Any feedback?

    Posted Sat December 03, 2005 03:11 PM

    Originally posted by: SystemAdmin


    This thread got a fair number of thread views, but I haven't seen any feedback. Has anyone used this script? Any opinions on it, good or bad?
    #AIX-Forum


  • 8.  Re: Any feedback?

    Posted Sun December 11, 2005 06:50 AM

    Originally posted by: alexpo


    Great wtuff.
    Works perfectly on my HMC with 2 p570 and 6 p550 connected.
    HTML output will be a definite plus to keep the configuration documented.
    Regards
    #AIX-Forum


  • 9.  Re: Any feedback?

    Posted Mon December 12, 2005 02:42 PM

    Originally posted by: SystemAdmin


    This is very nice indeed. It worked the first time I tried it, without any fussing around. Thanks for sharing!

    anker
    #AIX-Forum


  • 10.  Improved hmcMenu script. now with html output

    Posted Fri January 13, 2006 10:58 AM

    Originally posted by: SystemAdmin


    FYI,

    I've improved my hmcMenu script. It now supports HTML output for the reports
    and has additional documentation to help get ssh up and running to your HMC.

    Take a look at it, and if you have any feedback, I'd love to hear it.

    Andy Welter.
    http://www.the-welters.com/professional/scripts/hmcMenu.txt
    #AIX-Forum


  • 11.  Re: Improved hmcMenu script. now with html output

    Posted Thu April 19, 2007 09:49 AM

    Originally posted by: SystemAdmin


    I've lots of experience with HMC and know my way around the ssh commands. However, the running remote scripts is new to me. How is it you are running your script? Do you ftp it or cut and past it? Are you using a tool? Any help would be appreciated.
    #AIX-Forum


  • 12.  Re: Improved hmcMenu script. now with html output

    Posted Thu April 19, 2007 01:47 PM

    Originally posted by: SystemAdmin


    You run the script from your Unixy workstation (Mac OS X, Linux, Windows with perl and putty, perhaps--whatever), and it uses ssh to communicate with the HMC of your choosing. From the script itself:

    code# INSTALATION INSTRUCTIONS:
    1. - copy this single script to your desired bin directory
    2. - modify this script so that it uses your desired default
    3. HMC host name. See first instance of $hmcName variable.
    4. This step is optional... it is only if you want to avoid
    5. having to use the "-s <hmc hostname>" parameter in your
    6. command invocations.
    7. - Setup ssh access as defined in the script.[/code]

    Andy then goes on to highlight how to set up ssh such that it does not require the entry of a password at every turn in the script.

    It's a fantastic script, and I use it at least a few times a month. Thanks much, Andy!

    Clayton
    #AIX-Forum


  • 13.  Re: Improved hmcMenu script. now with html output

    Posted Tue April 24, 2007 11:04 AM

    Originally posted by: SystemAdmin


    The installation of the script is done on any system that has perl, ssh, and ssh-agent running on it, and has network access to your HMC.

    You need to setup ssh-agent so that your ssh interactions with the HMC can be done without password prompts, otherwise using the script is too cumbersome. The script then uses ssh to run individual HMC commands. It first gathers information about the systems and LPARs that are managed by the HMC, so startup takes a few seconds. Then each action that you perform will generate some number of ssh command executions on the HMC in order to gather more data or perform the requested actions. Generating the system documentation report can be a little time consuming if you have a lot of systems and LPARs... It takes a minute or two in my environment.

    The good thing about the script is that it doesn't involve loading any software on the HMC, or hacking into the HMC... Everything is straight ssh calls.

    Take a look at the script, I have a decent bit of comments in it about how to set it up and use it. After you read through that, let me know if you have any specific questions.
    #AIX-Forum


  • 14.  Re: Improved hmcMenu script. now with html output

    Posted Thu July 19, 2007 10:32 PM

    Originally posted by: SystemAdmin


    Hi Andy,
    Just wondering if you have the script to support
    HMC Version 6 R1 ..great job with that script btw

    thanks
    #AIX-Forum


  • 15.  Re: Improved hmcMenu script. now with html output

    Posted Sun July 22, 2007 10:28 PM

    Originally posted by: SystemAdmin


    Funny you should ask. We are about to upgrade our HMCs to version 6. I'll let you know. In the mean time, you can give it a try and see how it works... if you do the report and status options, they are safe to run, and should give a pretty good test to see if the commands changed much for the new HMC version.

    If you give it a try, post something here and let me know how it goes.
    #AIX-Forum


  • 16.  Re: Improved hmcMenu script. now with html output

    Posted Mon July 23, 2007 08:14 PM

    Originally posted by: SystemAdmin


    Andy , I'm testing the script currently on ver 6 ..will update on how I go.
    #AIX-Forum


  • 17.  Re: Improved hmcMenu script. now with html output

    Posted Thu July 26, 2007 06:06 AM

    Originally posted by: MarkTaylor


    have been using it on hmc v6 this morning and it all seems to work for the reporting functions.

    "version= Version: 6
    Release: 1.1
    HMC Build level 20061103.1
    MH00912: Fix remote support and cold repair problems (12-18-2006)
    MH00816: InfoCenter updates for HMC V6R1.0 (08-11-2006)
    ","base_version=V6.1.0

    Rgds
    Mark Taylor
    #AIX-Forum


  • 18.  Re: Improved hmcMenu script. now with html output

    Posted Sun July 29, 2007 09:39 PM

    Originally posted by: SystemAdmin


    I can confirm the same.
    All reporting functions seem to work ok.
    #AIX-Forum


  • 19.  Re: HMC Report scripts

    Posted Tue August 12, 2008 04:31 PM

    Originally posted by: SkyMoCo


    Have you updated your script for HMC version 7? And does it report configuration of IVE cards?
    #AIX-Forum


  • 20.  Re: HMC Report scripts

    Posted Wed August 20, 2008 07:22 AM

    Originally posted by: Laurent_Agarini


    really good job, usefull, appreciate the sharing ;o)
    did someone get the error on vterm action after system and lpar selection:
    /bin/stty: standard input: Invalid argument
    ?
    #AIX-Forum


  • 21.  Re: HMC Report scripts

    Posted Tue February 22, 2011 10:04 AM

    Originally posted by: ayalo


    Hello Andy,
    I was looking your hmcMenu script, and I consider It's usefull and easy to work with it. It`s a great script.
    I'm doing something like that but for 'used resources' and for make an excel file or something graphical with java, where you can see at the moment used resources.
    I think is like a mixed of nmon and HMC commands :D
    When I will finished it I will show you.
    My idea is make a instantaeous report showing for example the memory assigned and the real memory used at the moment.
    I was having a problem once, when I has to be on call, and, I didnt have resouces in my p560. The only solution was removing some megas from diferent lpars to assign this megas to other critical lpar.

    Thank you for your script ;)
    #AIX-Forum


  • 22.  Re: HMC Report scripts

    Posted Tue May 10, 2011 07:46 AM

    Originally posted by: bhimsingh


    Hi ,

    Have you made the enhancement which you were talking about it . If yes , would you like to share your script .

    thanks
    bhim
    #AIX-Forum