Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Forum italiano (Italian) Forum di discussione italiano
  • Search

[OT] RRD...

Tutte le discussioni direttamente correlabili all'informatica e/o a GNU/*nix.

Moderator: ago

Post Reply
  • Print view
Advanced search
10 posts • Page 1 of 1
Author
Message
Naspe
Guru
Guru
User avatar
Posts: 321
Joined: Wed Dec 10, 2003 8:01 am
Location: Genova - Italy

[OT] RRD...

  • Quote

Post by Naspe » Fri Mar 05, 2004 11:47 am

Ciao gente.

Non resco a far funzionare rrdtools. Il problema è che nn ho capito come funziona. Ho letto il manuale, lo ho ance stampato e riletto piu volte... Solo che nn riesco a capirci molto :(

Nn ho trovato info in italiano su internet...

Mi chiedevo se qualcuno di voi che usa gli rddtools poteva spiegarmi un po il funzionamento...

Grazie, ciao ciao
God Is Real... Unless Declared As Integer...

Provoca Il Più Bravo... Morirai Come Uno Schiavo!!!

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Top
Naspe
Guru
Guru
User avatar
Posts: 321
Joined: Wed Dec 10, 2003 8:01 am
Location: Genova - Italy

  • Quote

Post by Naspe » Fri Mar 05, 2004 1:19 pm

hemm nn ne sa nulla nesuno?
God Is Real... Unless Declared As Integer...

Provoca Il Più Bravo... Morirai Come Uno Schiavo!!!

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Top
antenore
n00b
n00b
User avatar
Posts: 46
Joined: Tue Jul 15, 2003 11:10 am
Contact:
Contact antenore
Website

  • Quote

Post by antenore » Fri Mar 05, 2004 1:39 pm

Io lo uso per lavoro cosa ti serve sapere...
Top
antenore
n00b
n00b
User avatar
Posts: 46
Joined: Tue Jul 15, 2003 11:10 am
Contact:
Contact antenore
Website

  • Quote

Post by antenore » Fri Mar 05, 2004 2:21 pm

...
Hai una fonte di dati per esempio un file di testo che contiene il numero di connessioni ESTABLISHED sulla tua macchina.

Code: Select all

 NETDIR=/var/log
netstat -n | grep -c ESTABLISHED >> $NETDIR/net_log
Questo script gira a crontab ogni 5 minut1.

1. Crea il tuo file rrd

Code: Select all

rrdtool create net_established.rrd       \
                   DS:established:GAUGE:600:U:U       \
                   RRA:AVERAGE:0.5:1:24       \
                   RRA:AVERAGE:0.5:6:10

Code: Select all

 man rrdcreate
Questo ti crea il DB che verrà aggoirnato ogni 5 minuti...
con:

Code: Select all

ESTAB=$(cat $NETDIR/net_log)
rrdtool update net_established.rrd N:${ESTAB}
e anche questo lo devi mettere a crontab...

Code: Select all

 man rrdupdate
A questo punto hai il tuo DB che si aggiorna.. Creiamo la gif...

Code: Select all

#rrdtool graph established.gif --title "Connessioni ESTABLISHED" --start -10800    \
           DEF:NET_ESTA=net_established.rrd:NET_ESTA:AVERAGE    \
            LINE3:NET_EST#000000:"Net_Established"

Code: Select all

man rrdgraph 
A questo punto hai la gif, la carichi da browser e vedi un pò...

http://people.ee.ethz.ch/~oetiker/webto ... /tutorial/
Top
Naspe
Guru
Guru
User avatar
Posts: 321
Joined: Wed Dec 10, 2003 8:01 am
Location: Genova - Italy

  • Quote

Post by Naspe » Fri Mar 05, 2004 2:35 pm

Grazie mille.

Solo che non ho capito come si crea il db. Soprattutto la parte relativa al RRA. Cioè il man lo ho letto ma nn ho capito :( Non è che puoi dirmi cosa sono quei valori in italiano plz? (0.5:1:24)
God Is Real... Unless Declared As Integer...

Provoca Il Più Bravo... Morirai Come Uno Schiavo!!!

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Top
Naspe
Guru
Guru
User avatar
Posts: 321
Joined: Wed Dec 10, 2003 8:01 am
Location: Genova - Italy

  • Quote

Post by Naspe » Sun Mar 07, 2004 11:24 pm

mmm vedo che nn ci sono molti estimatori degli RRDTOOLS...

Vabbè sto imparando da solo....

Una cosa soltanto...

Code: Select all

GPRINT:eth0in:LAST:" Attuale\:%8.2lf %sb/s" \
Non capisco cosa sia %8.2lf %s... alcuni mettono %3.0lf %s...

Sul manuale c'è scritto cosi:

Code: Select all

PRINT:vname:CF:format
    Calculate the chosen consolidation function CF over the data-source variable vname and printf the result to stdout using format. In the format string there should be a '%lf', '%lg' or '%le' marker in the place where the number should be printed. 

    If an additional '%s' is found AFTER the marker, the value will be scaled and an appropriate SI magnitude unit will be printed in place of the '%s' marker. The scaling will take the '--base' argument into consideration!

    If a '%S' is used instead of a '%s', then instead of calculating the appropriate SI magnitude unit for this value, the previously calculated SI magnitude unit will be used. This is useful if you want all the values in a PRINT statement to have the same SI magnitude unit. If there was no previous SI magnitude calculation made, then '%S' behaves like a '%s', unless the value is 0, in which case it does not remember a SI magnitude unit and a SI magnitude unit will only be calculated when the next '%s' is seen or the next '%S' for a non-zero value.
Solo che io nn ho capito... Qualcuno mi spiega plz?

Grazie mille ciao ciao
God Is Real... Unless Declared As Integer...

Provoca Il Più Bravo... Morirai Come Uno Schiavo!!!

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Top
Ginko
Guru
Guru
User avatar
Posts: 371
Joined: Wed May 01, 2002 9:03 am
Location: nearby my linux laptop
Contact:
Contact Ginko
Website

  • Quote

Post by Ginko » Mon Mar 08, 2004 9:50 am

Naspe wrote:mmm vedo che nn ci sono molti estimatori degli RRDTOOLS...
Io uso RRD per il mio tool FwGold e per creare svariate statistiche per un ISP mio cliente.
RRD e' molto potente e flessibile, a scapito di una certa iniziale difficolta' soprattutto se non si hanno basi di statistica.
Ad ogni modo la documentazione per quanto ti possa risultare ostica e' molto ricca e gli esempi in giro per il web non mancano.
Forse per questo nessuno se l'e' sentita di riassumere qui concetti che sicuramente troverai in giro.
E' vero pero' che una bella traduzione in italiano del manuale non guasterebbe...
Naspe wrote:Non capisco cosa sia %8.2lf %s... alcuni mettono %3.0lf %s...
Se ti riferisci ai numeri "8.2" si tratta della lunghezza della stringa che verra' stampata : 8 e' la lungezza della parte intera e 2 quella della parte decimale, vedi printf(3)

--Gianluca
Top
randomaze
Bodhisattva
Bodhisattva
User avatar
Posts: 9985
Joined: Tue Oct 21, 2003 7:55 am
Contact:
Contact randomaze
Website

  • Quote

Post by randomaze » Mon Mar 08, 2004 9:51 am

Naspe wrote:

Code: Select all

GPRINT:eth0in:LAST:" Attuale\:%8.2lf %sb/s" \
Non capisco cosa sia %8.2lf %s... alcuni mettono %3.0lf %s...

Sul manuale c'è scritto cosi:

Code: Select all

PRINT:vname:CF:format
    Calculate the chosen consolidation function CF over the data-source variable vname and printf the result to stdout using format. In the format string there should be a '%lf', '%lg' or '%le' marker in the place where the number should be printed. 
Solo che io nn ho capito... Qualcuno mi spiega plz?
Sono le stringhe di formato per le varie *printf del C.
Qui trovi qualche indicazione in più.
Ciao da me!
Top
Naspe
Guru
Guru
User avatar
Posts: 321
Joined: Wed Dec 10, 2003 8:01 am
Location: Genova - Italy

  • Quote

Post by Naspe » Mon Mar 08, 2004 10:08 am

Grazie mille raga...

Ginko scusa nn è che potresti darmi 2 dritte teoriche su come e cosa graficare? Va bene anche un link...

P.S.: Cmq se tu lo sai uare rrd... Bè un how to lo potresti fare eh :D
God Is Real... Unless Declared As Integer...

Provoca Il Più Bravo... Morirai Come Uno Schiavo!!!

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Top
Ginko
Guru
Guru
User avatar
Posts: 371
Joined: Wed May 01, 2002 9:03 am
Location: nearby my linux laptop
Contact:
Contact Ginko
Website

  • Quote

Post by Ginko » Mon Mar 08, 2004 10:21 am

Naspe wrote:Ginko scusa nn è che potresti darmi 2 dritte teoriche su come e cosa graficare? Va bene anche un link...
Mah credo che quello indicatoti da antenore (http://people.ee.ethz.ch/~oetiker/webto ... l/tutorial) sia piu' che valido. E cmq ti consiglio prima di tutto di pensare a cosa vuoi analizzare, quale e' la natura dei dati che hai a disposizione, come puoi estrarre questi dati dal tuo sistema, quali statistiche vuoi ricavarne e per quanto tempo vuoi memorizzarle. Solo quando tutti questi concetti (che sono indipendenti da RRD) ti sono chiari allora puoi cominciare come implementare le statistiche in RRD. Questo IMHO, of course.
naspe wrote:P.S.: Cmq se tu lo sai uare rrd... Bè un how to lo potresti fare eh :D
In realta' basterebbe tradurre l'ottimo tutorial di cui sopra... conosco Tobias Oetiker di persona, magari gli chiedo se ha nella sua lista di to-do gia' previsto la traduzione.

--Gianluca
Top
Post Reply
  • Print view

10 posts • Page 1 of 1

Return to “Forum di discussione italiano”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic