Find the answer to your Linux question:
Results 1 to 4 of 4
Is there any command/tool/script to categorize the bulky output of ec2-describe-images or ec2-describe-instances. I have a list of around 100 servers with each and every detail. I want to categorize ...
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    11

    Smile Categorize the output of ec2-describe-images or ec2-describe-instances

    Is there any command/tool/script to categorize the bulky output of ec2-describe-images or ec2-describe-instances. I have a list of around 100 servers with each and every detail. I want to categorize them under suitable headings like - RESERVATION, INSTANCE, BLOCKDEVICE, TAG (whatever category is available on the output).

    Thanks in advance. . .

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    I'm not familiar with those programs, but if you post a snippet of output as an example, maybe we could help you with that. Make sure to enclose it in CODE tags for easier reading.

  3. #3
    Just Joined!
    Join Date
    Jul 2010
    Posts
    11
    Here is the output:


    Code:
    RESERVATION     r-e616ea88      156646522928    apps
    INSTANCE        i-3015bb50      ami-cbbc7ea2    ec2-100-23-134-6.order-1.amazing.com        ip-192-168-131-206.ec2.internal   running smsiproduction  0               m1.xlarge       2011-09-24T22:37:54+0000        us-east-1c      aki-b51cf9dc    ari-b31cf9da            monitoring-disabled     100.23.134.6    192.168.131.206                   instance-store                                  paravirtual
    TAG     instance        i-3015bb50      Name    DatabaseUUT
    TAG     instance        i-3015bb50      role    db
    TAG     instance        i-3015bb50      app     apache2
    Note, this is the output for 1 server only. There are multiple servers and have multiple output in this form on the same file appending back to back.

  4. #4
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    Okay, so parsing that won't be hard (another job for awk/sed/grep or perl), but I guess before that, we need to understand where the data is, and what you want to do with it.

    So is this data generate individually, on each of the 100 machines?

    Or does it reside in some sort of logs that will all be in one directory on one machine?

    Most importantly, I see that you want to categorize the data, but what is the desired presentation format? can you post an idea of what you'd like it to look like? The data is a little confusing to me personally, so I can't really tell how you are thinking of breaking it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...