Re: Linux (or Ubuntu specific) tools to measure number of page faults
On Tue, May 01, 2012 at 10:04:47PM -0400, Phillip Susi wrote: Note that you need to explicitly specify /usr/bin/time to prevent the shell builtin time command from being used, which is more limited. Or 'command time'. -- Colin Watson [cjwat...@ubuntu.com] -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Linux (or Ubuntu specific) tools to measure number of page faults
On 01/05/12 02:53, Alfred Zhong wrote: Dear Ubuntu Developers, especially Kernel Hackers, This may be a stupid question, please excuse my ignorance. I am doing a project on Linux scheduler that trying to minimize number of page faults. I finished the algorithm implementation and I need to measure the effect. I am wondering if Linux provides tools to record number of page fault happened during the whole execution process? Basically, I want something like $ pfstat ./a.out page faults: 3 Execution Time: 1003 ms Is there such a tool? I want to make sure before deciding to write one by myself, which will be a lot of work... Thanks a lot! Alfred There are well defined APIs for collecting this kind of data, for example you can collect the rusage info for an exiting child process using wait3() or wait4(). References: man 2 wait3 man 2 rusage -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
mysql-server ships with user *
After upgrading to Ubuntu 12.04 my install script broke, which turns out to be related to the default * users in MysQL. When I installed mysql-server on a brand new fresh Ubuntu 12.04 install, it had two 'wildcard' users, which wasn't the case on 11.10 / 5.0: mysql select host, user from mysql.user; +---+--+ | host | user | +---+--+ | 127.0.0.1 | root | | ::1 | root | | jeroen-ubuntu | | | jeroen-ubuntu | root | | localhost | | | localhost | debian-sys-maint | | localhost | root | +---+--+ 7 rows in set (0.00 sec) These wildcard users allow a client to login with an arbitrary username. However, it will also match for any existing user. Hence a problem occurs after additional users are inserted into the table: INSERT INTO mysql.user VALUES('%','myroot','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',''); FLUSH PRIVILEGES; When logging in with user 'myroot', it is first matched to the wildcard user and hence logged in as user @localhost instead of myroot@localhost. The problem can be avoided by deleting this wildcard users from mysql.user. I suspect that more people are running into this problem. What is the intention of including this wildcard user? Is there any way I can force mysql client to login with myroot@localhost instead of @localhost? I want my install script to work on general machines but I don't want to just start removing pre-existing users... -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Linux (or Ubuntu specific) tools to measure number of page faults
Thank you all so much! On Wed, May 2, 2012 at 5:47 AM, Colin Ian King colin.k...@canonical.comwrote: On 01/05/12 02:53, Alfred Zhong wrote: Dear Ubuntu Developers, especially Kernel Hackers, This may be a stupid question, please excuse my ignorance. I am doing a project on Linux scheduler that trying to minimize number of page faults. I finished the algorithm implementation and I need to measure the effect. I am wondering if Linux provides tools to record number of page fault happened during the whole execution process? Basically, I want something like $ pfstat ./a.out page faults: 3 Execution Time: 1003 ms Is there such a tool? I want to make sure before deciding to write one by myself, which will be a lot of work... Thanks a lot! Alfred There are well defined APIs for collecting this kind of data, for example you can collect the rusage info for an exiting child process using wait3() or wait4(). References: man 2 wait3 man 2 rusage -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
Re: Linux (or Ubuntu specific) tools to measure number of page faults
TIME=%Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps time ls On 05/02/2012 10:08 PM, Alfred Zhong wrote: Thank you all so much! On Wed, May 2, 2012 at 5:47 AM, Colin Ian King colin.k...@canonical.com mailto:colin.k...@canonical.com wrote: On 01/05/12 02:53, Alfred Zhong wrote: Dear Ubuntu Developers, especially Kernel Hackers, This may be a stupid question, please excuse my ignorance. I am doing a project on Linux scheduler that trying to minimize number of page faults. I finished the algorithm implementation and I need to measure the effect. I am wondering if Linux provides tools to record number of page fault happened during the whole execution process? Basically, I want something like $ pfstat ./a.out page faults: 3 Execution Time: 1003 ms Is there such a tool? I want to make sure before deciding to write one by myself, which will be a lot of work... Thanks a lot! Alfred There are well defined APIs for collecting this kind of data, for example you can collect the rusage info for an exiting child process using wait3() or wait4(). References: man 2 wait3 man 2 rusage -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss