Xymon Mailing List Archive search

getting a list of all machines of a specific OS

4 messages in this thread

list Val Polyakov · Mon, 2 Jun 2008 11:13:45 -0400 ·
Is there a way to get a list of all machines in Hobbit sorted by OS?

as in, here is a full list of Linux boxes, here's a full list of Solaris 
boxes, etc.

The OS details are in the info column, so I'm assuming there's a way

i'm currently doing this via this:

(in $HOBBITROOT/data/hostdata)

for i in `ls`
do 
        file=`ls -ltr $i | tail -1 |  awk '{print  $9 }'`
        echo "$i `cat $i/$file | grep -i 'red hat'`"
done

this is ugly and horrible, though (although functional).
any "correct" ways of doing the same thing?
list Stewart L · Mon, 2 Jun 2008 11:55:07 -0400 ·
You could modify the script I uploaded an hour or so ago to pull that.
quoted from Val Polyakov


On Mon, Jun 2, 2008 at 11:13 AM, Val Polyakov <user-f80f448eb4ab@xymon.invalid> wrote:
Is there a way to get a list of all machines in Hobbit sorted by OS?

as in, here is a full list of Linux boxes, here's a full list of Solaris
boxes, etc.

The OS details are in the info column, so I'm assuming there's a way

i'm currently doing this via this:

(in $HOBBITROOT/data/hostdata)

for i in `ls`
do
       file=`ls -ltr $i | tail -1 |  awk '{print  $9 }'`
       echo "$i `cat $i/$file | grep -i 'red hat'`"
done

this is ugly and horrible, though (although functional).
any "correct" ways of doing the same thing?

-- 

Stewart

You only lose what you cling to.
list Anna Jonna Armannsdottir · Tue, 03 Jun 2008 21:59:06 +0000 ·
quoted from Stewart L
On mán, 2008-06-02 at 11:55 -0400, Stewart L wrote:
You could modify the script I uploaded an hour or so ago to pull
that. 
Please can I have a look at that script? 

-- 
Kindest Regards, Anna Jonna Ármannsdóttir,       %&   A: Because people read from top to bottom.
Unix System Aministration, Computing Services,   %&   Q: Why is top posting bad?
University of Iceland.
list John Glowacki · Tue, 3 Jun 2008 21:41:37 -0400 ·
quoted from Anna Jonna Armannsdottir
On Tue, Jun 3, 2008 at 5:59 PM, Anna Jonna Armannsdottir <user-a8cde33204f6@xymon.invalid> wrote:
On mán, 2008-06-02 at 11:55 -0400, Stewart L wrote:
You could modify the script I uploaded an hour or so ago to pull
that.
Please can I have a look at that script?

--
Kindest Regards, Anna Jonna Ármannsdóttir,       %&   A: Because people read from top to bottom.
Unix System Aministration, Computing Services,   %&   Q: Why is top posting bad?
University of Iceland.
Something can scripted using these bb commands.

http://www.hswn.dk/hobbiton/2006/08/msg00581.html

John