<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Dudi.<br>
<br>
On 21/02/2011 7:51 AM, Dudi Goldenberg wrote:<br>
<blockquote
cite="mid:9A4085B7A6E42849838BFCD1672A732A07BC2666F1@IE2RD2XVS101.red002.local"
type="cite">
<blockquote type="cite">
<pre wrap="">There is a thread about this somewhere. Greg Khunert wrote oidfixer.sh
</pre>
</blockquote>
<pre wrap="">
Where can I get oidfixer.sh?
</pre>
</blockquote>
<br>
I actually like Steve's solution too - but for the sake of
completeness, here's the tool I wrote some time back. The actual
name is oidlist.sh<br>
<br>
Instructions:<br>
<br>
1. Create the script and make it executable<br>
2. Stop cced<br>
service cced.init stop<br>
3. Run the script<br>
./oidlist.sh<br>
<br>
The script will print out a list of objects based on the actual
object directories, and it will also print a copy of codb.oids which
is what CCE thinks are the used OID's. Both lists of OID numbers
should be identical.<br>
<br>
If they are not, then copy the reported OID's into
/usr/sausalito/codb/codb.oids<br>
<br>
4. Restart cced<br>
service cced.init start<br>
<pre wrap="">
</pre>
<pre wrap="">#!/bin/bash
LAST=-1
MIN=-1
for X in `ls <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>usr/sausalito/codb/objects<span class="moz-txt-tag">/</span></i> | sort -n`
do
MYNEXT=$(( $LAST + 1 ))
if [ $MYNEXT -eq $X ]
then
LAST=$X
else
if [ $LAST -ge 1 ]
then
if [ $MIN -eq $LAST ]
then
echo -n $LAST,
else
echo -n $MIN-$LAST,
fi
fi
LAST=$X
MIN=$X
fi
done
if [ $MYNEXT -lt $X ]
then
echo -n $LAST
else
echo -n $MIN-$LAST
fi
echo ""
echo "/usr/sausalito/codb/codb.oids reports:"
cat /usr/sausalito/codb/codb.oids
echo ""
</pre>
<br>
<br>
</body>
</html>