2008-02-19 15:43:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-06-13 12:42:28 +02:00
|
|
|
## YOU NEED TO EDIT add_ds_proc.pl BEFORE YOU RUN THIS!!
|
|
|
|
## You need to edit the line:
|
|
|
|
## my $newlinkname = 'NEWIDFROMKNOWNLINKSFILE';
|
|
|
|
## to reflect the ID in the known links file
|
|
|
|
|
2020-11-27 09:55:21 +01:00
|
|
|
A=`find . -type f -name '*.rrd' | sed -r 's|/[^/]+$||' |sort |uniq`
|
|
|
|
W=`pwd`
|
2010-06-14 11:33:53 +00:00
|
|
|
|
|
|
|
for i in $A ; do
|
|
|
|
cd $i
|
|
|
|
|
|
|
|
for f in *.rrd; do
|
2020-11-27 09:55:21 +01:00
|
|
|
echo "file: $i/$f"
|
2010-06-14 11:33:53 +00:00
|
|
|
mv $f $f.old
|
2020-11-27 09:55:21 +01:00
|
|
|
rrdtool dump $f.old | $W/add_ds_proc.pl | rrdtool restore - $f.new
|
2010-06-14 11:33:53 +00:00
|
|
|
mv $f.new $f
|
2014-03-06 23:44:02 +08:00
|
|
|
rm -f $f.old
|
2010-06-14 11:33:53 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
cd ../
|
2008-02-19 15:43:28 +00:00
|
|
|
done
|