|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| ==Se configureaza ipfm dupa preferinta== | | ==Se configureaza ipfm dupa preferinta== |
− | <div id="aflknwerkamfs" style="overflow:auto;height:1px;">[http://www.zip.dk/gaeste/bog.php3?id=25415 8 borang permohonan spa] [http://www.zip.dk/gaeste/bog.php3?id=25414 med sona spa] [http://www.zip.dk/gaeste/bog.php3?id=25413 conair foot massaging productpage spa] [http://www.zip.dk/gaeste/bog.php3?id=25412 hotel pittsburgh spa] [http://www.zip.dk/gaeste/bog.php3?id=25411 hot spa springs] [http://www.zip.dk/gaeste/bog.php3?id=25410 day new spa york] [http://www.zip.dk/gaeste/bog.php3?id=25409 hot install replace spa tub] [http://www.zip.dk/gaeste/bog.php3?id=25408 hotel philadelphia spa] [http://www.zip.dk/gaeste/bog.php3?id=25407 day dc spa washington] [http://www.zip.dk/gaeste/bog.php3?id=25406 angeles day los spa] [http://www.zip.dk/gaeste/bog.php3?id=25405 certificate gift spa] [http://www.zip.dk/gaeste/bog.php3?id=25404 dealer pool spa] [http://www.zip.dk/gaeste/bog.php3?id=25403 boob bra ocean pool water] [http://www.zip.dk/gaeste/bog.php3?id=25402 clothes in pool] [http://www.zip.dk/gaeste/bog.php3?id=25401 play a free online pool game] [http://www.zip.dk/gaeste/bog.php3?id=25400 above build ground install pool swimming] [http://www.zip.dk/gaeste/bog.php3?id=25399 polyurethane reaction injection molding] [http://www.zip.dk/gaeste/bog.php3?id=25398 g5 laser logitech mouse] [http://www.zip.dk/gaeste/bog.php3?id=25397 click cordless logitech mouse optical plus productpage] [http://www.zip.dk/gaeste/bog.php3?id=25396 batt insulation poured rolled upgrade] [http://www.zip.dk/gaeste/bog.php3?id=25395 fiberglass insulation roll] [http://www.zip.dk/gaeste/bog.php3?id=25394 insulation plastic window] [http://www.zip.dk/gaeste/bog.php3?id=25393 cold heat insulation material whol] [http://www.zip.dk/gaeste/bog.php3?id=25392 high insulation temperature] [http://www.zip.dk/gaeste/bog.php3?id=25391 blowing insulation machine] [http://www.zip.dk/gaeste/bog.php3?id=25390 guitar string tighteners] [http://www.zip.dk/gaeste/bog.php3?id=25389 how to change electric guitar string] [http://www.zip.dk/gaeste/bog.php3?id=25388 box comment generator myspace] [http://www.zip.dk/gaeste/bog.php3?id=25387 friend generator myspace] [http://www.zip.dk/gaeste/bog.php3?id=25386 custom friend generator myspace space] [http://www.zip.dk/gaeste/bog.php3?id=25385 myspace layout generator] [http://www.zip.dk/gaeste/bog.php3?id=25384 carolina college foundation north] [http://www.zip.dk/gaeste/bog.php3?id=25383 adoption dave foundation thomas] [http://www.zip.dk/gaeste/bog.php3?id=25382 foundation window workflow] [http://www.zip.dk/gaeste/bog.php3?id=25381 foundation hidradenitis suppurativa] [http://www.zip.dk/gaeste/bog.php3?id=25380 foundation indian southwest] [http://www.zip.dk/gaeste/bog.php3?id=25378 colorado foundation hines] [http://www.zip.dk/gaeste/bog.php3?id=25377 elk foundation mountain rocky] [http://www.zip.dk/gaeste/bog.php3?id=25376 dave foundation thomas] [http://www.zip.dk/gaeste/bog.php3?id=25375 concrete foundation raise repair] [http://www.zip.dk/gaeste/bog.php3?id=25374 360 box dvd hd x] [http://www.zip.dk/gaeste/bog.php3?id=25373 box collector dvd friend] [http://www.zip.dk/gaeste/bog.php3?id=25372 decorating home product] [http://www.zip.dk/gaeste/bog.php3?id=25371 cheap free shipping toy] [http://www.zip.dk/gaeste/bog.php3?id=25370 overseas carpentry jobs] [http://www.zip.dk/gaeste/bog.php3?id=25369 but left their card and failed to file out a report] [http://www.zip.dk/gaeste/bog.php3?id=25368 accessory card file] [http://www.zip.dk/gaeste/bog.php3?id=25367 180 buy hcl tablet tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25366 buy hcl.idilis.ro link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25365 buy cheap.k25.net link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25364 buy health.20mbweb.com link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25363 buy link online.int.tc tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25362 buy cheap.be.tc link tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25361 buy link online.blog.com tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25360 buy link online.col.nu tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25359 buy link now.ql.st tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25358 buy href isuyen.blogdrive.com tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25357 buy search tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25356 buy link myblog.de tramadol] [http://www.zip.dk/gaeste/bog.php3?id=25355 buy gem high quality stone] [http://www.zip.dk/gaeste/bog.php3?id=25354 buy gem precious stone] [http://www.zip.dk/gaeste/bog.php3?id=25353 grossmans building supply store] [http://www.zip.dk/gaeste/bog.php3?id=25352 building material tacoma] [http://www.zip.dk/gaeste/bog.php3?id=25351 building kempsville material] [http://www.zip.dk/gaeste/bog.php3?id=25350 building chattanooga material] [http://www.zip.dk/gaeste/bog.php3?id=25349 building las material vegas] [http://www.zip.dk/gaeste/bog.php3?id=25348 building detroit material] [http://www.zip.dk/gaeste/bog.php3?id=25347 building material pasadena] [http://www.zip.dk/gaeste/bog.php3?id=25346 building greenville material sc] [http://www.zip.dk/gaeste/bog.php3?id=25345 building jackson material] [http://www.zip.dk/gaeste/bog.php3?id=25344 building fort material worth] [http://www.zip.dk/gaeste/bog.php3?id=25343 building columbia material] [http://www.zip.dk/gaeste/bog.php3?id=25342 building diego material san] [http://www.zip.dk/gaeste/bog.php3?id=25341 building distributor material] [http://www.zip.dk/gaeste/bog.php3?id=25340 building cincinnati material] [http://www.zip.dk/gaeste/bog.php3?id=25339 building chicago material] [http://www.zip.dk/gaeste/bog.php3?id=25338 building dallas material] [http://www.zip.dk/gaeste/bog.php3?id=25337 building houston material] [http://www.zip.dk/gaeste/bog.php3?id=25336 texas custom build home] [http://www.zip.dk/gaeste/bog.php3?id=25335 a frame home to build] [http://www.zip.dk/gaeste/bog.php3?id=25334 build equity in home] [http://www.zip.dk/gaeste/bog.php3?id=25333 accessory bathroom exposition] [http://www.zip.dk/gaeste/bog.php3?id=25332 airsoft gun gun stun taser] [http://www.zip.dk/gaeste/bog.php3?id=25331 airsoft gun marui tokyo] [http://www.zip.dk/gaeste/bog.php3?id=25330 airline boston ticket] [http://www.zip.dk/gaeste/bog.php3?id=25329 airline italy ticket] [http://www.zip.dk/gaeste/bog.php3?id=25328 airline phoenix southwest ticket] [http://www.zip.dk/gaeste/bog.php3?id=25327 airline miami ticket] [http://www.zip.dk/gaeste/bog.php3?id=25326 airline pittsburgh ticket] [http://www.zip.dk/gaeste/bog.php3?id=25325 airline cheap edinburgh ticket uk] [http://www.zip.dk/gaeste/bog.php3?id=25324 airline ticket travel velocity] [http://www.zip.dk/gaeste/bog.php3?id=25323 airline cheap minute ticket] [http://www.zip.dk/gaeste/bog.php3?id=25322 airline international ticket] [http://www.zip.dk/gaeste/bog.php3?id=25321 airline blue jet ticket] [http://www.zip.dk/gaeste/bog.php3?id=25320 airline cheap really ticket] [http://www.zip.dk/gaeste/bog.php3?id=25319 airline orbitz ticket] [http://jkgff84plhy.com/ jkgff84plhy] [http://jkgff84plhy.com/ jkgff84plhy] </div>
| + | ==Se ia urmatorul script== |
| + | #!/bin/sh |
| + | HOST=$1 |
| + | D=`/bin/date +%Y-%m-%d` |
| + | # Incoming |
| + | inc=`cat /var/log/ipfm/ipfm-global-$D.log | /bin/grep "$HOST "| /bin/gawk '{print $2}'` |
| + | if [ -n "$inc" ]; then echo $inc ; |
| + | else |
| + | echo "0" |
| + | fi |
| + | # Outgoing |
| + | out=`cat /var/log/ipfm/ipfm-global-$D.log | /bin/grep "$HOST "| /bin/gawk '{print $3}'` |
| + | if [ -n "$out" ]; then echo $out ; |
| + | else |
| + | echo "0" |
| + | fi |
| + | |
| + | '''Atentie''': Logurile generate de ipfm trebuie sa fie de forma <tt>ipfm-global-%Y-%m-%d.log</tt>. Acest script il vom denumi <tt>script.pl</tt> si il vom face executabil cu comanda <tt>chmod +x</tt>. |
| + | |
| + | ==mrtg.conf trebuie sa fie de forma== |
| + | Target[84.232.130.xx]: `/etc/mrtg/script.pl 84.232.130.xx` |
| + | MaxBytes[84.232.130.xx]: 1638400 |
| + | AbsMax[84.232.130.xx]: 12500000 |
| + | Title[84.232.130.xx]: Statistica trafic pe calculatorul lui Apocalipt |
| + | PageTop[84.232.130.xx]: <nowiki><H1>Statistica trafic pe calculatorul lui Apocalipt</H1></nowiki> |
| + | Options[84.232.130.xx]: growright |
| + | Daca ai configurat si apache si vrei sa vezi aceste grafice de pe internet dai |
| + | /usr/bin/indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg |
| + | |
| + | ---- |
| + | Un mic script care sa genereze automat config-ul pentru o clasa de ip-uri ar putea fi de forma: |
| + | <pre> |
| + | #!/bin/bash |
| + | echo "# Fisier de configurare MRTG generat automat -- NU editati" |
| + | echo "# intru-cat schimbarile se vor pierde la urmatoarea rulare!" |
| + | echo |
| + | echo "WorkDir: /var/www/mrtg/" |
| + | echo |
| + | for (( i=1; i<256; i++ )); do |
| + | echo "Target[192.168.0.$i]: \`/etc/mrtg/script.pl 192.168.0.$i\`" |
| + | echo "MaxBytes[192.168.0.$i]: 1638400" |
| + | echo "AbsMax[192.168.0.$i]: 12500000" |
| + | echo "Title[192.168.0.$i]: Statistica trafic pentru ip-ul 192.168.0.$i" |
| + | echo "PageTop[192.168.0.$i]: <H1>Statistica trafic pentru 192.168.0.$i</H1>" |
| + | echo "Options[192.168.0.$i]: growright" |
| + | echo |
| + | done |
| + | |
| + | </pre> |
| + | [[Category:HowTo]] |
| + | [[Category:WebStats]] |
Latest revision as of 18:07, 8 May 2006
Se configureaza ipfm dupa preferinta
Se ia urmatorul script
#!/bin/sh
HOST=$1
D=`/bin/date +%Y-%m-%d`
# Incoming
inc=`cat /var/log/ipfm/ipfm-global-$D.log | /bin/grep "$HOST "| /bin/gawk '{print $2}'`
if [ -n "$inc" ]; then echo $inc ;
else
echo "0"
fi
# Outgoing
out=`cat /var/log/ipfm/ipfm-global-$D.log | /bin/grep "$HOST "| /bin/gawk '{print $3}'`
if [ -n "$out" ]; then echo $out ;
else
echo "0"
fi
Atentie: Logurile generate de ipfm trebuie sa fie de forma ipfm-global-%Y-%m-%d.log. Acest script il vom denumi script.pl si il vom face executabil cu comanda chmod +x.
mrtg.conf trebuie sa fie de forma
Target[84.232.130.xx]: `/etc/mrtg/script.pl 84.232.130.xx`
MaxBytes[84.232.130.xx]: 1638400
AbsMax[84.232.130.xx]: 12500000
Title[84.232.130.xx]: Statistica trafic pe calculatorul lui Apocalipt
PageTop[84.232.130.xx]: <H1>Statistica trafic pe calculatorul lui Apocalipt</H1>
Options[84.232.130.xx]: growright
Daca ai configurat si apache si vrei sa vezi aceste grafice de pe internet dai
/usr/bin/indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg
Un mic script care sa genereze automat config-ul pentru o clasa de ip-uri ar putea fi de forma:
#!/bin/bash
echo "# Fisier de configurare MRTG generat automat -- NU editati"
echo "# intru-cat schimbarile se vor pierde la urmatoarea rulare!"
echo
echo "WorkDir: /var/www/mrtg/"
echo
for (( i=1; i<256; i++ )); do
echo "Target[192.168.0.$i]: \`/etc/mrtg/script.pl 192.168.0.$i\`"
echo "MaxBytes[192.168.0.$i]: 1638400"
echo "AbsMax[192.168.0.$i]: 12500000"
echo "Title[192.168.0.$i]: Statistica trafic pentru ip-ul 192.168.0.$i"
echo "PageTop[192.168.0.$i]: <H1>Statistica trafic pentru 192.168.0.$i</H1>"
echo "Options[192.168.0.$i]: growright"
echo
done