Identifying The Hottest Tables (Informix)

Yesterday I posted about how to identify the hottest table in a PostgreSQL database. Pretty much the same functionality is available for administrators of Informix databases as well; this kind of information is found in the sysmaster database which is the database engine's own database.

Identifying The Hottest Tables (PostgreSQL)

In recent versions of PostgreSQL there is a magical view called pg_stat_user_tables which provides per table information on usage; there is one row per table and eight counters per row.

Fields

Tags: 

Converting M4B's to MP3

I ended up with some M4B audio files; these are "MPEG v4 system, iTunes AAC-LC" files. In order to reliably manage these files along with every other audio file [all of which are MP3] the simplest solution is just to convert them to MP3. In order to accomplish that I dumped them back out to WAV using mplayer and re-encoded them to MP3 using lame.

Where and what is /var/run/named?

    # service named start
    Starting name server BIND checkproc: Can not stat /var/run/named/named.pid: Too many levels of symbolic links
    - Warning: /var/run/named/named.pid exists! start_daemon: Can not stat /var/run/named/named.pid: Too many levels of symbolic links                                                          done

Changing Your FreeNode Password

There is no shortage of documentation for common IRC operations like registering your nick and managing channels. But I had quite the time figuring out the syntax for changing my password; turns out it's obvious:

    /ns set password new_password

There is no password confirmation - so make sure you type it correctly.

On a related note, for anyone new to IRC, it is possible to bind multiple nicks to your FreeNode account. Just switch to the nick you want to bind and then issue the "group" command.

Printing Via LPR

If you have a Python app, or almost any kind of app, the accepted manner for printing is to use some kind of subprocess to invoke some command-line utility to submit the print job. Of course this requires that the underlying subsystems are aware of printers [and thus run a printer subsystem]. It also assumes the name of the command-line utility, the permissions are adequate to execute it, and all manner of other things. To put it simply: this is terrible! Why does my web server, workflow server, etc... need to run a print service?

SQLAlchemy & Upcoming Birthdays

OpenGroupware Coils uses SQLAlchemy as it's ORM. One of the desired features was a Logic command that efficiently returns contacts with upcoming birthdays. In raw SQL this query would be very simple to write - but how to do it in SQLAlchemy? The answer: sql.expression.extract which will create an expression column equivalent to EXTRACT. With EXTRACT it is possible to compare to the year-of-day represented by a date. The Python code looks like:

XSLT Transform to TXT, with LXML

Maybe this should be obvious, but it wasn't to me. I've got an XML document and an XSLT stylesheet. But that stylesheet just produces text, not XML; it is essentially a template for an e-mail. So I was extending OIE's transformAction for performing XSLT transforms that produce other than XML... but the documentation is a bit thin and every example is XML results. The trick is pretty simple, just

unicode(result)

and make sure [of course] that you have

Changing Terminal Services License Mode

You are provisioning a Window 2008R2 server for remote desktop service; you've configured the terminal services license manager in one mode [ device | user ]. But when you receive the license documentation you discover that the CALs purchased were for the other mode. Then the Windows terminal license server manager tells you to change the mode of the license server.... but there is no obvious way to change the mode [because Windows is user-friendly!]. One option is to go old-school - hack the registry!.

zOGI Now In ZideStore

The main branch of zOGI is now included in Zidestore (as of r1995). So if you use nightly builds the next time you update you should automatically have the zOGI protocol bundle - no installation required. The Google Code repository will now be used as the experimental branch; those wanting a stable zOGI should use the one included in ZideStore. For now the documentation remains on the Google Code Wiki.

Pages

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer