Linux - Memory Usage broken?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
Weedy
Posts: 23
Joined: Thu Jan 26, 2006 7:07 pm

Linux - Memory Usage broken?

Post by Weedy »

http://weedy.1.vg/stats/graph_1.html

Code: Select all

Kana-chan ~ # free -kt
             total       used       free     shared    buffers     cached
Mem:        255332     242856      12476          0      18500      66660
-/+ buffers/cache:     157696      97636
Swap:       499960        200     499760
Total:      755292     243056     512236
free mem is way off any ideas?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post you graph along with your post as an attachment
Thanks
Reinhard
Weedy
Posts: 23
Joined: Thu Jan 26, 2006 7:07 pm

Post by Weedy »

this thing?
Attachments
graph_1_1.png
graph_1_1.png (23.24 KiB) Viewed 3075 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

That seems right....
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Weedy
Posts: 23
Joined: Thu Jan 26, 2006 7:07 pm

Post by Weedy »

Code: Select all

             total       used       free
Mem:        255332     242856      12476 <-- look here
and then the graph says 3k, when i have more like 12000k
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please check, whether CDEFs are used for the graph/legend items
Reinhard
Weedy
Posts: 23
Joined: Thu Jan 26, 2006 7:07 pm

Post by Weedy »

what is a CDEF and where do i look?

edit: nvm found it, all the items do not use CDEF
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The templates you're currently using are for local linux machines only. They use the script linux_memory.pl which in turn uses /proc/meminfo. Please View Poller Cache to see

Code: Select all

 Data Source: Localhost - Memory - Free
RRD: /var/www/html/workspace/branch/rra/localhost_mem_buffers_3.rrd
Action: 1, Script: /usr/bin/perl /var/www/html/workspace/branch/scripts/linux_memory.pl MemFree:
and execute this from command line. This may deviate from the command you're using.
Personally, I'd like to use the ucd/net memory stuff as this will work for remote hosts as well
Reinhard
Weedy
Posts: 23
Joined: Thu Jan 26, 2006 7:07 pm

Post by Weedy »

Code: Select all

Kana-chan ~ # /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl SwapFree:
354696
Kana-chan ~ # /usr/bin/perl /var/www/localhost/htdocs/cacti/scripts/linux_memory.pl MemFree:
11508
Kana-chan ~ # free -t
             total       used       free     shared    buffers     cached
Mem:        255332     242756      12576          0      34440      44276
-/+ buffers/cache:     164040      91292
Swap:       499960     145264     354696
Total:      755292     388020     367272
the numbers look right the graph doesn't
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Modify the Graph template "Linux - Memory Usage" and modify each "Graph Template Item" to use the CDEF "Multiply by 1024"

Had the same issue with that template on all my Linux servers.
Weedy
Posts: 23
Joined: Thu Jan 26, 2006 7:07 pm

Post by Weedy »

i really should have thought of that
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Weedy wrote:

Code: Select all

             total       used       free
Mem:        255332     242856      12476 <-- look here
and then the graph says 3k, when i have more like 12000k
Even took this into account. But the difference between 3 K and 12476 is not matched by multiplying with 1024, eh?
Nevertheless, fine that's working for you :D
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests