• SQL

    Use the Slow Query Log in MySQL

    Slow queries can cause poor database performance. MySQL has a slow query log, which lets you log queries that take too long (with too long a user-configurable setting). This allows you to quickly find craptastic queries in your logs. To enable the slow query log, use SET GLOBAL and then set the slow_query_log option to ON: SET GLOBAL slow_query_log = 'ON'; By default, the slow query log identifies any query that takes 10 seconds or longer. To change long_query_time using SET GLOBAL. Here, we’ll set it to 7 seconds: SET GLOBAL long_query_time = 7; You can also set the log file to something other than the default location of /var/lib/mysql/hostname-slow.log.…

  • Ubuntu,  Unix

    Install ntpd in Ubuntu Server 10

    I’m sure you’re getting tired of seeing me regurgitate apt-get commands, but here’s another: apt-get install ntp This will install ntpd. Then a quick update to /etc/ntp.conf to configure who you get your updates from (I still like time.apple.com) and you’re now an ntp server. Once changed, restart the daemon: /etc/init.d/ntp restart Then, use ntpq to check your time against the server: ntpq -np Lucky us, ntp is easy, but we’re gonna’ need it for Kerberos now aren’t we…

  • Mac OS X Server,  Mac Security

    Finishing RADIUS Kbase Article for AAPL

    Troubleshooting radius is a crappy task. But crappy articles don’t help: http://support.apple.com/kb/HT3929 To be more specific, the debug mode flag is -X (not sure why that was so hard). In that case it’s doing single server mode and the process cannot fork. You can also do the lowercase, -x (which is part of -X), or -xx for further granularity. In order to set the launchd item to debug mode you would therefore find the /System/Library/LaunchDaemons/org.freeradius.radiusd.plist file (only created once you’ve fired up RADIUS btw). From here, locate the array for invoking the command: <string>/usr/sbin/radiusd</string> <string>-sf</string> Change the -sf to either a -X or add an x or two in there…