[10:59] <tdr112> morning all
[11:00] <tdr112> afternoon
[11:00] <tdr112> anyone know a good tool for finding memory leaks on a ubuntu server
[11:02] <tdr112> i have tomcat and mysql running on it
[11:02] <tdr112> i keep running out of ram
[11:03] <czajkowski> tdr112: ask in #ubuntu-server or poke Daviey in here
[11:04] <tdr112> thanks a good idea czajkowski
[11:04] <tdr112> thanks
[11:05] <tdr112> at the moment i dont know if its a java thing or my server set up
[11:06] <slashtom> tdr112: you could use munin to monitor the memory usage against time
[11:07] <czajkowski> tdr112: Daviey is usally nice and easy to talk to and doesnt mind being poked
[11:11] <tdr112> slashtom: i will give that a go
[11:12] <ebel> tdr112: use top (or htop) to see which is using the most memory
[11:12] <ebel> a "memory leak" usually means a bug in the programme that's causing it to use too much memory.
[11:12] <ebel> Which is different from "my programme is using too much memory"
[11:14] <ebel> in that case there are other potential causes (a) your server needs more ram (b) you have configured the various programmes to use too much memory, (c) you are trying to get the programmes to do too much
[11:14] <tdr112> ebel: to tell you the truth i am not sure if it is the code or my set up , i am just looking at top and see my ram is being eaten up
[11:14] <ebel> (a) can be solved with money, (b) can be solved by tweaking the settings of the various programmes (but that might cause (c))
[11:15] <ebel> (c) is the hardest since you then have to change your code
[11:15] <ebel> tdr112: make sure it's not a case of this: http://www.linuxatemyram.com/
[11:15] <ebel> unused ram is wasted ram.
[11:16] <ebel> Linux will use ram (if possible) as a disk cache. it makes your server much faster.
[11:16] <ebel> Don't look at the ram usage in top to figure out how much ram you have/don't have.
[11:16] <ebel> Look at how much swapping is happening.
[11:16] <ebel> Also, if programmes are being killed by OOM (out of memory killer) then you have problems,
[11:17] <ebel> If there is lots of swapping then you don't have a lot of ram.
[11:17] <ebel> You can see how much swapping is happening with "vmstat 1"
[11:17] <tdr112> well must look into them , I have just been told by the boss that the server has http://www.linuxatemyram.com/
[11:17] <ebel> if you see 0 for si (swap in) and 0 for so (swap out), then you are not swapping and have sufficent ram.
[11:18] <tdr112> New window
[11:18] <tdr112> Print all
[11:18] <tdr112> Ubuntu Memory Leak
[11:18] <tdr112> 				
[11:18] <tdr112> 	
[11:18] <tdr112> 				
[11:18] <tdr112> 				
[11:18] <tdr112> 	
[11:18] <tdr112> Inbox X	
[11:18] <tdr112> ReplyReply
[11:18] <tdr112> More
[11:18] <tdr112> [Offline] Sacchi Mestry . to me, Jim, Sean, Ameen
[11:18] <tdr112> show details Sep 2 (3 days ago)
[11:18] <tdr112> Hi Jeffrey,
[11:18] <ebel> hehehe, copy paste job.
[11:18] <tdr112> Can you please check if there memory leak on Ubuntu (new POAM server).
[11:18] <tdr112> Regards,
[11:18] <tdr112> Sacchi
[11:18] <tdr112> Reply
[11:18] <tdr112> fecking hell i hate putty
[11:18] <tdr112> anyway thanks all i will double check it
[11:19] <ebel> If the server is swapping (ie run out of ram), then the load will increase, and performance will go to the dogs.
[11:20] <ebel> If the server is not swapping (it's not uncommon for there to be a little bit of swap used), then there is no memory problem now.
[11:20] <tdr112> so i should check free -m
[11:20] <ebel> The important thing to look at is the amount of stuff going into or out of swap.
[11:21] <ebel> yes "free -m" is your friend
[11:26] <ebel> memory leaks usually mean a bug in your code, and can be identified by you code slowly requireing more memory as time goes on, and requireing restarts
[11:26] <ebel> they are hard to do in the likes of java
[11:26] <ebel> i strongly doubt you did not find a memory leak in mysql
[11:27] <ebel> However your PHB might call any memory problem a 'memory leak'.
[11:27] <tdr112> ya , i think it will be more likly the code , i will set up a test ubuntu server and try some things on it firist
[11:28] <ebel> first look at the live system and see if it's using a lot of memory or swapping. if it isn't, there might be no memory problem.
[11:29] <ebel> 'premature optimization ...' and all that
[11:31] <tdr112> ebel: i use did free -m  and its showing 3gb free ram
[11:31] <tdr112> i will ask the PHB to explain what he wants
[11:32] <ebel> Tell him you've looked into it, and everything is fine.
[11:32] <ebel> Managers like to think they are doing something.
[11:32] <tdr112> that does sound better
[11:32] <ebel> and must be seen to be doing things.
[11:32] <ebel> No point making work for yourself to fix problems that don't exist. :)
[11:32] <ebel> Welcome to the world of work.
[11:32] <ebel> ☺
[11:33] <tdr112> ebel: i dont like it here :)
[11:36] <czajkowski> why the :) then
[11:37] <ebel> go back job hunting?
[11:38] <czajkowski> http://likeknow.com/ *sigh*  really in this day and age :/
[11:41] <ebel> I don't think that's a real programming site/project... since it doesn't do anything
[11:42] <czajkowski> indeed
[20:50] <czajkowski> ebel: you have mail re DNS
[20:53] <ebel> ah i see
[20:55] <czajkowski> if you need anything else just shout
[20:55]  * ebel must digest and investigate
[20:56] <czajkowski> if any issues you can login into Rt.u.c and comment on the ticket