Date: Mon, 13 Aug 2007 18:50:38 -0400 From: "Chris Thunes" <cthunes@tqhosting.com> To: "Miroslav Lachman" <000.fbsd@quip.cz> Cc: cdjones@novusordo.net, freebsd-jail@freebsd.org Subject: Re: jtune not showing resource usage - fixed Message-ID: <b722430e0708131550i12ac1f25ke7197c2f4cb28857@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
------=_Part_19013_31806782.1187045438113 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/13/07, Miroslav Lachman <000.fbsd@quip.cz> wrote: > > Chris Thunes wrote: > > Hey all, > > I've been working with the resource limiting patches on a 6.2installation > > and haven't been able to get jtune to show memory usage for jails at > all. > > > > [root@virt1] ~ # jtune -j 15 -i > > JID Hostname Memory Used / Limit CPU Shares > > 15 jail0.rootbsd.net 0 M / 256 M 0 > > > > I have the limits enabled in sysctl and really have idea as to why this > > wouldn't be displaying correctly. If there is anyone who can point me in > the > > right direction the help would be greatly appreciated. > > Hi, > I had same question more than month ago, but no answer (2007-06-29). So > I think no competent person is subscribed to this list. > [I CCed cdjones now = maybe he knows :)] > > Miroslav Lachman > I found the problem and was able to fix it and created a small patch for anyone who needs this fixed. A function called prison_memory in sys/kern/kern_jail.c is called to calculate the memory usage for a given jail but this value is never stored back to the corresponding prison object which is used by jtune to check the memory usage. This patch just drops a few lines in at the end of prison_memory to store this value to the structure. If anyone knows any adverse side effects this would cause please let me know. - Chris ------=_Part_19013_31806782.1187045438113 Content-Type: application/octet-stream; name=jtune_fix-2007-08-13.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_f5bk680t Content-Disposition: attachment; filename="jtune_fix-2007-08-13.patch" LS0tIHNyYy9zeXMva2Vybi9rZXJuX2phaWwuYyAgICBUdWUgSnVsIDE3IDExOjI3OjUzIDIwMDcK KysrIHNyYy9zeXMva2Vybi9rZXJuX2phaWwuYyAgICBNb24gQXVnIDEzIDEzOjEwOjA0IDIwMDcK QEAgLTU3MCwxMiArNTcwLDYgQEAKICAgICAgICAgICAgICAgIG1lbV91c2VkICs9IHZtc3BhY2Vf cmVzaWRlbnRfY291bnQocC0+cF92bXNwYWNlKTsKICAgICAgICB9CiAgICAgICAgICAgICAgICBt ZW1fdXNlZCAqPSBQQUdFX1NJWkU7Ci0KLSAgICAgICAvLyBIb3BlZnVsbHkgdGhpcyB3b3JrcyA6 KQotICAgICAgIG10eF9sb2NrKCZwci0+cHJfbXR4KTsKLSAgICAgICBwci0+cHJfbWVtX3VzYWdl ID0gbWVtX3VzZWQ7Ci0gICAgICAgbXR4X3VubG9jaygmcHItPnByX210eCk7Ci0KICAgICAgICBy ZXR1cm4gbWVtX3VzZWQ7CiB9CiAK ------=_Part_19013_31806782.1187045438113--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b722430e0708131550i12ac1f25ke7197c2f4cb28857>