Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grafici e Memoria utilizzata...
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Naspe
Guru
Guru


Joined: 10 Dec 2003
Posts: 321
Location: Genova - Italy

PostPosted: Sun Mar 07, 2004 11:17 pm    Post subject: Grafici e Memoria utilizzata... Reply with quote

Ciao gente!
Oggi, dopo aver letto tonnellate di manuali su rrdtools e awk, parto bello convinto x fare i miei grafici. Comincio con quello x il traffico di rete. Dopo un po di prove e casini vari, qualcosa funziona... e sono felice...

Poi comincio a fare il grafico della memoria utilizzata... e qui noto alcune cose che i sorprendono un po...

Se faccio free mi esce sta cosa qui:
Code:

caronte root # free

             total       used       free     shared    buffers     cached
Mem:        240088     232248       7840          0      31664      50156
-/+ buffers/cache:     150428      89660
Swap:       506036        436     505600


mmm 232248 usati??? Ma siamo matti??? Stanno girando si e no 4 servizi... :(

Mi spiegano che il kernel si piglia in automatico tutta la memoria e poi la distribuisce a chi serve... per questo risulta tutta occupata...

Si ma io voglio sapere quanta memoria sto occupando realmente!!!

Allora do un'occhiata con snmpwalk...
Code:

caronte root # snmpwalk -c caronte -v 2c localhost hrSWRunPerfMem
HOST-RESOURCES-MIB::hrSWRunPerfMem.1 = INTEGER: 140 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.2 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.3 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.4 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.5 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.6 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.7 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.8 = INTEGER: 0 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.153 = INTEGER: 668 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.825 = INTEGER: 592 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.1095 = INTEGER: 2624 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.1202 = INTEGER: 432 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.1213 = INTEGER: 4 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.1214 = INTEGER: 4 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.1215 = INTEGER: 4 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.1216 = INTEGER: 4 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.1217 = INTEGER: 4 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.2278 = INTEGER: 964 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.2279 = INTEGER: 964 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.2280 = INTEGER: 964 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.2281 = INTEGER: 964 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.2282 = INTEGER: 848 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.24437 = INTEGER: 1432 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.24567 = INTEGER: 1324 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.26630 = INTEGER: 1588 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.26633 = INTEGER: 16512 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.26639 = INTEGER: 272 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27236 = INTEGER: 3508 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27238 = INTEGER: 3508 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27272 = INTEGER: 1812 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27274 = INTEGER: 1760 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27275 = INTEGER: 1300 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27281 = INTEGER: 968 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27282 = INTEGER: 1356 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27804 = INTEGER: 1208 KBytes
HOST-RESOURCES-MIB::hrSWRunPerfMem.27935 = INTEGER: 1588 KBytes


Questa è una lista dei processi che girano sulla mia macchina con relativa memoria utilizzata.

Se sommassi questi valori... avrei la quantità totale di memoria usata dal mio sistema? Cioè è un ragionamento giusto il mio?

Volevo anche chiedervi cosa secondo voi sarebbe saggio monitorare su di un firewall/router/proxy etc etc...

Infine, qui ci sono i grafici che sto pian piano facendo... Sareste cosi dolci da darci un'occhiata e dirmi cosa ne pensate plz? Soprattutto se secondo voi rispecchiano dati che possono essere reali...


GRazie mille a tutti... Ciao ciao.
_________________
God Is Real... Unless Declared As Integer...

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

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Back to top
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Mon Mar 08, 2004 1:05 am    Post subject: Reply with quote

e' linux che gestisce la memoria in questo modo :)
la ram e' come il maiale, non si butta niente :wink:
Back to top
View user's profile Send private message
silian87
Advocate
Advocate


Joined: 06 Oct 2003
Posts: 2318
Location: Treviso, Italy

PostPosted: Mon Mar 08, 2004 6:27 am    Post subject: Reply with quote

Quote:
Se sommassi questi valori... avrei la quantità totale di memoria usata dal mio sistema?


Non e' proprio cosi'.... infatti a certi processi, troppa memoria non cambia molto le cose. Infatti se tu senza apire niente di piu, guardi la memoria utilizzata con una di quelle applet di kde o gnome o xfce4 (o anche gtkrell,.... boh, come si chiama? ), vedrai che la memoria si alza verso il massimo solo quando hai molta roba aperta; se non sta bassa o quasi a 0.
_________________
Musica che ascolto: http://www.last.fm/user/silian87/

Silian87 FAQs: http://marentax.homelinux.org/~silian87/silian87-faq.txt

GTalk: silian87@gmail.com
Back to top
View user's profile Send private message
Naspe
Guru
Guru


Joined: 10 Dec 2003
Posts: 321
Location: Genova - Italy

PostPosted: Mon Mar 08, 2004 9:35 am    Post subject: Reply with quote

Ma alla fine x sapere quanta memoria il mio sistema sta ciucciando come si fa???
_________________
God Is Real... Unless Declared As Integer...

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

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Mon Mar 08, 2004 9:38 am    Post subject: Reply with quote

Naspe wrote:
Ma alla fine x sapere quanta memoria il mio sistema sta ciucciando come si fa???


Prova a confrontare il risultato di "memoria_utilizzata - free_buffers+swap_usata" con la somma della memoria per ogni programma che risulta da "top" o da "ps".
_________________
Ciao da me!
Back to top
View user's profile Send private message
silian87
Advocate
Advocate


Joined: 06 Oct 2003
Posts: 2318
Location: Treviso, Italy

PostPosted: Mon Mar 08, 2004 9:39 am    Post subject: Reply with quote

usa:
Code:
top


Va bene anche per la cpu-....
_________________
Musica che ascolto: http://www.last.fm/user/silian87/

Silian87 FAQs: http://marentax.homelinux.org/~silian87/silian87-faq.txt

GTalk: silian87@gmail.com
Back to top
View user's profile Send private message
Naspe
Guru
Guru


Joined: 10 Dec 2003
Posts: 321
Location: Genova - Italy

PostPosted: Mon Mar 08, 2004 11:18 pm    Post subject: Reply with quote

Allora. Ho fatto un po di prove: la mem usata - (mem buffer + mem cache) = a circa 150Mb...
che poi è anche la seconda riga dell'output di free...

Ora ho letto un post che era gia comparso sul forum riguardo a sta cosa della memoria. Questo post aveva il tag RISOLTO ma secondo me nn era risolto inquanto la soluzione del problema "ma chi diavolo mi usa sta ram!!!" era che si deve contare anche la ram utilizzata dalle librerie necessarie ad un processo e che il kernel si ciuccia tutta la ram possibile cosi per scorta e che ste librerie rimangono caricate x un tot di tempo anche se il programma si chiude...

Ora dal man di top:
Code:

o: VIRT  --  Virtual Image (kb)
     The total amount of virtual memory used by the task.  It includes all code, data and shared libraries plus pages that have been swapped out.

     VIRT = SWAP + RES.



Quindi la somma dei valori della colonna VIRT dovrebbe restituire il TOTALE della memoria usata dai programmi... Facendo la somma escono si e nò 50Mb... Che poi è lo stesso valore della chiamata snmp che avevo scritto nell'altro mess...

Alla fine mi trovo con 150Mb di ram usata (senza buffer e cache) secondo free... e 50Mb di ram usata sommando l'utilizzo di ogni singolo programma secondo top/snmp.

E glialtri 100Mb? Chi li ha? Ma soprattutto dove sta scritto???

Ciao ciao
_________________
God Is Real... Unless Declared As Integer...

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

Hai Evocato Il Tuono!!! Ora Raccogli Tempesta!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum