RE: {bb} big brother monitoring a df that it shouldn't be

"Larry Sabados \(IT\)" <[email protected]> Wed, 12 Mar 2008 10:27:15 -0400
Newsgroups gmane.network.bb4.general
Message-ID <E487C0DE205E3145943194A360156EC00AB63B01@corpex03.bordersgroupinc.com>
I had the same issue on a Red Hat 5.1 client and I updated the $BBHOME/bin/bb-disk.sh  in the following manner. (look at code prior to "(DFSORT)").

Updated 

eval "$DFCMD | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"+${DFSORT}\" > $BBTMP/DFOUT.$$"
to
eval "$DFCMD | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"-k ${DFSORT}\" > $BBTMP/DFOUT.$$"

and 

wclen1=`eval "$DFCMD | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"+${DFSORT}\" | $WC"`
to
wclen1=`eval "$DFCMD | $EGREP \"$DFUSE\" | $EGREP -v \"$DFEXCLUDE\" | $SORT \"-k ${DFSORT}\" | $WC"`

I also combined this with 

Update to $BBHOME/etc/bbsys.local update

Updated 
DF="/bin/df -k"
to
DF="/bin/df -P"

As the "df -k" was wrapping the Filesystem information to the next line of trhe result.

Combine these 2 updates, following by an BB client recycle and you should be good to go!

-Larry


-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Philip
Clark
Sent: Tuesday, March 11, 2008 6:05 PM
To: [email protected]
Subject: Re: {bb} big brother monitoring a df that it shouldn't be



On Tue, 2008-03-11 at 17:03 -0400, Scott Mohnkern wrote:
> Well, I think I figured it out.
> Somewhere big brother is doing a:
> 
> sort +4 <filename>
> 
> and I need it to do a:
> 
> sort -k 4 <filename>

It's actually a little more complex than that. The input is being
piped in and the "new" sort will only accept that if you specify a
"-" as the file name. What was "sort +4" now needs to be something
like "sort -n -k 5 -". The "5" is because the offset has also likely
changed.

> $BBHOME/etc/bbsys.sh has a 
> DFSORT="4"
> 
> But changing this to "-k 4"  generates:
> 
> /bin/sort: open failed: +-k 4: No such file or directory
> 
> So the question is, what do I need to change so instead of doing a
> sort +4 <filename> it does a sort -k 4 <filename>

You'll need to edit the client script. Exactly where you need to make
the change is difficult to say. I can't accurately remember how things
where arranged in 1.6e1. If you grep for SORT in the client scripts, you
should be able to identify the correct location(s). Essentially,
anything that uses the sort command should be investigated.

Cheers, Phil.



--
I've never wished a man to meet his maker before his time.
But, there are a few obituaries that I've read with approval.
(Leslie Nielsen)


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:[email protected] with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:[email protected] with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.