Hinzugefuegt:

* QoS-Graphen - Erste Version!
Pakete:
  * Applejuice bearbeitet
  * Depends.txt in alle eingefuegt
  * Clamav bearbeitet

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@258 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2006-08-26 13:20:12 +00:00
parent 0937506a8f
commit 7ccede9b39
63 changed files with 141 additions and 17 deletions

View File

@@ -20,10 +20,6 @@
use RRDs;
if (not defined $rrd_datadir) {
our $rrd_datadir = "/var/spool/rrdqueues/";
}
if (not defined $STEP) {
my $STEP=10;
}

View File

@@ -1,3 +1,11 @@
------------------------------------------------------------------------
r257 | ms | 2006-08-26 10:42:48 +0200 (Sat, 26 Aug 2006) | 5 lines
Update:
* Pakfire!
Fixes:
* ConnScheduler
------------------------------------------------------------------------
r256 | ms | 2006-08-23 23:55:46 +0200 (Wed, 23 Aug 2006) | 8 lines

View File

@@ -7,6 +7,7 @@
# (c) The IPFire Team
#
use RRDs;
use strict;
# enable only the following on debugging purpose
use warnings;
@@ -85,6 +86,9 @@ $qossettings{'DOCLASS'} = '';
$qossettings{'DOSCLASS'} = '';
$qossettings{'DOLEVEL7'} = '';
$qossettings{'DOPORT'} = '';
$qossettings{'CLASS'} = '';
$qossettings{'CLASSPRFX'} = '';
$qossettings{'DEV'} = '';
&General::readhash("${General::swroot}/qos/settings", \%qossettings);
@@ -373,6 +377,39 @@ elsif ($qossettings{'ACTION'} eq 'Statusinformationen')
&Header::closepage();
exit
}
elsif ($qossettings{'ACTION'} eq 'Grafische Auswertung')
{
&Header::openbox('100%', 'left', 'QoS Graphen');
print <<END
<table width='100%'><tr><td colspan='2' align='center'><font color='red'>Diese Seite braucht je nach Geschwindigkeit des Computers laenger zum Laden.</font>
END
;
open( FILE, "< $classfile" ) or die "Unable to read $classfile";
@classes = <FILE>;
close FILE;
foreach $classentry (sort @classes)
{
@classline = split( /\;/, $classentry );
$qossettings{'DEV'}=$classline[0];
$qossettings{'CLASS'}=$classline[1];
&gengraph($qossettings{'DEV'},$qossettings{'CLASS'});
print <<END
<tr><td colspan='2' align='center'><font color='darkblue'><b>$qossettings{'CLASS'} ($qossettings{'DEV'})</b></font>
<tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png'>
<tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-borrowed.png'>
<tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-bytes.png'>
END
;
}
print <<END
</table>
END
;
&Header::closebox();
&Header::closebigbox();
&Header::closepage();
exit
}
elsif ($qossettings{'ACTION'} eq 'Parentklasse hinzufuegen')
{
&parentclass();
@@ -481,7 +518,13 @@ END
<tr><td width='40%' align='right'>Uploadstandardklasse: <td width='40%' align='left'>$qossettings{'DEFCLASS_OUT'}
<tr><td width='40%' align='right'>ACKs: <td width='40%' align='left'>$qossettings{'ACK'}
<tr><td colspan='3' width='100%'><hr>
<tr><td colspan='3' width='100%' align='center'><input type='submit' name='ACTION' value='Parentklasse hinzufuegen'><input type='submit' name='ACTION' value='Erweiterte Einstellungen'><input type='submit' name='ACTION' value='Statusinformationen'>
<tr><td colspan='3' width='100%' align='center'>
<table boder='0' cellpadding='0' cellspacing='0'>
<tr><td><input type='submit' name='ACTION' value='Parentklasse hinzufuegen'>
<td><input type='submit' name='ACTION' value='Erweiterte Einstellungen'>
<tr><td><input type='submit' name='ACTION' value='Statusinformationen'>
<td><input type='submit' name='ACTION' value='Grafische Auswertung'>
</table>
</form>
END
;
@@ -1329,3 +1372,74 @@ sub validsubclass {
}
}
}
sub gengraph {
$qossettings{'DEV'} = shift;
$qossettings{'CLASS'} = shift;
my $ERROR="";
if ( $qossettings{'DEV'} eq $qossettings{'RED_DEV'} ) {
$qossettings{'CLASSPRFX'} = '1';
} else {
$qossettings{'CLASSPRFX'} = '2';
}
RRDs::graph ("/home/httpd/html/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png",
"--start", "-3240", "-aPNG", "-i", "-z",
"--alt-y-grid", "-w 800", "-h 150", "-r",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
"--color", "BACK#FFFFFF",
"-t $qossettings{'CLASS'} ($qossettings{'DEV'})",
"DEF:pkts=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:pkts:AVERAGE",
"DEF:dropped=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:dropped:AVERAGE",
"DEF:overlimits=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:overlimits:AVERAGE",
"AREA:pkts#00FFFF:packets",
"GPRINT:pkts:LAST:total packets\\:%8.3lf %s packets\\j",
"LINE3:dropped#FF0000:dropped",
"GPRINT:dropped:LAST:dropped packets\\:%8.3lf %s packets\\j",
"LINE3:overlimits#0000FF:overlimits",
"GPRINT:overlimits:LAST:overlimits\\:%8.3lf %s packets\\j",
);
$ERROR = RRDs::error;
print "$ERROR";
RRDs::graph ("/home/httpd/html/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-borrowed.png",
"--start", "-3240", "-aPNG", "-i", "-z",
"--alt-y-grid", "-w 800", "-h 150", "-r",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
"--color", "BACK#FFFFFF",
"-t $qossettings{'CLASS'} ($qossettings{'DEV'})",
"DEF:lended=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:lended:AVERAGE",
"DEF:borrowed=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:borrowed:AVERAGE",
"DEF:giants=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:giants:AVERAGE",
"AREA:lended#99ff99:lended",
"GPRINT:lended:LAST:lended\\:%8.3lf %s packets\\j",
"LINE3:borrowed#f70566:borrowed",
"GPRINT:borrowed:LAST:borrowed\\:%8.3lf %s packets\\j",
"LINE3:giants#05ad05:giants",
"GPRINT:giants:LAST:giants\\:%8.3lf %s packets\\j",
);
$ERROR = RRDs::error;
print "$ERROR";
RRDs::graph ("/home/httpd/html/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-bytes.png",
"--start", "-3240", "-aPNG", "-i", "-z",
"--alt-y-grid", "-w 800", "-h 150", "-r",
"--color", "SHADEA#EAE9EE",
"--color", "SHADEB#EAE9EE",
"--color", "BACK#FFFFFF",
"-t $qossettings{'CLASS'} ($qossettings{'DEV'})",
"DEF:bits=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:bits:AVERAGE",
"DEF:bytes=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:bytes:AVERAGE",
"CDEF:kbytes=bytes,1024,/",
"CDEF:kbits=bits,1024,/,8,/",
"AREA:kbytes#FFBE7D:kbytes",
"GPRINT:kbytes:LAST:rate\\: %8.3lf kbytes\\j",
"GPRINT:kbits:LAST:rate\\:%8.2lf kbits\\r",
);
$ERROR = RRDs::error;
print "$ERROR";
}

View File

@@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = applejuice
PAK_VER = ipfire-beta1
PAK_VER = 1
###############################################################################
# Top-level Rules
@@ -80,5 +80,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && mkdir -p /opt/applejuice && mv -fv ajcore.jar /opt/applejuice
cd $(DIR_APP) && mv -fv libajnetmask.so /opt/applejuice
cd $(DIR_APP) && cp -rfv phpaj /opt/lampp/htdocs
-mkdir /var/ipfire/applejuice
echo "RAMSIZE=64" > /var/ipfire/applejuice/settings
chown nobody.nobody /var/ipfire/applejuice -R
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -860,6 +860,8 @@ buildpackages() {
cat $i | sed "s%^\./%#%" | sort >> $BASEDIR/log/FILES
fi
done
cd $BASEDIR/packages; ls -w1 *.tar.gz | awk -F ".tar.gz" '{ print $1 }' > $BASEDIR/packages/packages_list.txt
echo "###EOF###" >> $BASEDIR/packages/packages_list.txt
cd $PWD

View File

@@ -26,7 +26,7 @@ int main(int argc, char *argv[]) {
exit(1);
}
safe_system("chmod 755 /var/ipfire/qos/bin/qos.sh");
safe_system("chmod 755 /var/ipfire/qos/bin/qos.sh 2>&1 >/dev/null");
if (strcmp(argv[1], "start") == 0) {
if ((fd = open("/var/ipfire/qos/bin/qos.sh", O_RDONLY)) != -1)
{

View File

View File

@@ -1,3 +1,4 @@
etc/init.d/applejuice
opt/applejuice
opt/applejuice/ajcore.jar
opt/applejuice/libajnetmask.so
@@ -132,4 +133,5 @@ opt/lampp/htdocs/phpaj/style/tango/icons/up.png
opt/lampp/htdocs/phpaj/style/tango/icons/warning.png
opt/lampp/htdocs/phpaj/style/tango/icons/x.png
opt/lampp/htdocs/phpaj/style/tango/tango.css
opt/lampp/htdocs/phpaj/vars.php
opt/lampp/htdocs/phpaj/vars.php
var/ipfire/applejuice

View File

@@ -0,0 +1 @@
java

View File

@@ -8,4 +8,3 @@
#
# Extract the files
tar xfz files.tgz -C /
cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2

View File

@@ -6,5 +6,3 @@
#################################################################
#
# Delete the files
## Befehl fehlt noch
rm -f /opt/pakfire/installed/ROOTFILES.$2

View File

View File

View File

View File

View File

@@ -8,4 +8,3 @@
#
# Extract the files
tar xfz files.tgz -C /
cp -f ROOTFILES /opt/pakfire/installed/ROOTFILES.$2

View File

@@ -6,5 +6,3 @@
#################################################################
#
# Delete the files
## Befehl fehlt noch
rm -f /opt/pakfire/installed/ROOTFILES.$2

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
src/paks/mc/depends.txt Normal file
View File

View File

View File

View File

0
src/paks/nfs/depends.txt Normal file
View File

View File

View File

View File

@@ -4,3 +4,6 @@ usr/sbin/pmap_set
#usr/share/man/man8/pmap_dump.8
#usr/share/man/man8/pmap_set.8
#usr/share/man/man8/portmap.8
usr/lib/libwrap.so
usr/lib/libwrap.so.0
usr/lib/libwrap.so.0.7.6

View File

View File

View File

View File

View File

View File

View File

0
src/paks/sox/depends.txt Normal file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -15,6 +15,7 @@ else
mkdir -p /install/packages/package
cp -f /usr/src/src/paks/$PROG/{,un}install.sh /install/packages/package
cp -f /usr/src/src/paks/$PROG/ROOTFILES /install/packages/package
cp -f /usr/src/src/paks/$PROG/depends.txt /install/packages/package
chmod 755 /install/packages/package/{,un}install.sh
cd / && tar --create --directory=/ --files-from=/install/packages/package/ROOTFILES --file=/packagetmp.tar --exclude='#*'
@@ -24,7 +25,7 @@ else
cd / && rm -rf /tmp/*
cd /install/packages/package && cat ROOTFILES | grep -v "#" > ROOTFILES
tar cfz ../$PROG-${VER}_$PAK_VER.tar.gz files.tgz install.sh uninstall.sh ROOTFILES
tar cfz ../$PROG-${VER}_$PAK_VER.tar.gz files.tgz install.sh uninstall.sh ROOTFILES depends.txt
cd /install/packages && md5sum $PROG*.tar.gz > $PROG-${VER}_$PAK_VER.tar.gz.md5
cd /install/packages && md5sum $PROG*.tar.gz >> all-progs.md5

View File

@@ -46,8 +46,8 @@ use strict;
# Configuration options:
#
my $device = "imq0";
our $rrd_datadir = "/var/log/rrd";
my $device = "$ARGV[0]";
our $rrd_datadir = "/var/log/rrd/";
our $event_datadir = $rrd_datadir;
our $STEP = 10;
our $tc_command = "/sbin/tc";