Archive

Archive for the ‘Quick cuts’ Category

Quick memory usage check by thread

June 29th, 2011 1 comment

Saved for posterity. Possibly there is an easier way.

$# root@mt:/var/log# bash memreport 
Name:   bash:   10588
Name:   bash:   10600
Name:   bash:   20548
Name:   cron:   22420
Name:   getty:  5928
Name:   init:   8352
Name:   ntpd:   38332
Name:   rsyslogd:       54144
Name:   sort:   59840
Name:   sshd:   49168
Name:   sshd:   70452
Name:   udevd:  16864
Name:   udevd:  16864
Name:   udevd:  16868
 
$# cat memreport 
#!/bin/bash
for i in /proc/[123456789]*/status; do 
 size=$(grep VmSize $i | awk '{print $2}')
 (( size > 0 )) && echo -e "$(grep Name: $i): \t$size"
done | sort -n;
Categories: Am a Geek, Quick cuts Tags: , , ,

Firefox 3 slow? Time to vacuum the database…

December 7th, 2009 Comments off

From mozillalinks.org

A few months ago, I posted how to improve Firefox performance by defragmenting its database files executing SQLite VACUUM command. The only con was that it required a Firefox restart to execute the command.
Thanks to Mozilla’s Jeremy Orem, we have now learned it can be done from within Firefox in two short steps:
* Open the Error Console: Tools menu/Error Console
* In the Code text box paste this (it’s a single line):
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL(“VACUUM”);
* Press Evaluate. All the UI will freeze for a few seconds while databases are VACUUMed
Note however that the procedure optimizes the Places database only, but this is precisely where you will get the most significant performance improvements.

Categories: Linux, Quick cuts Tags: , , , , ,

Did you know? v2

December 10th, 2007 Comments off

An official update to the original 2005 “Shift Happens” video from Karl Fisch and Scott McLeod, this June 2007 update includes new and updated statistics, thought-provoking questions and a fresh design. For more information, or to join the conversation, please visit the Shift Happens wiki.

Categories: Quick cuts Tags: , , ,

Intelligent Tire.. Video

August 2nd, 2007 Comments off



Intelligent Tire, just what the marshals always wanted!

Semantic AND intentional honesty

June 28th, 2007 Comments off

This article I Think You’re Fat – Esquire describes the interesting insight of living with fewer intellectual filters. IMHO it’s not just about being honest with ‘others’, but as Aristotle says, “We are what we repeatedly do”. Like the author, I’m not 100% comfortable with this solution, but can see that it must be an all or nothing approach. As soon as a little bit of filtering creeps in, we find the whole house of cards reverting to the way we used to communicate. Lets face it, if you find a situation is uncomfortable, its usually because you have to adapt and change in some way to cope.

I wonder if the intellectual filters we eliminate by this approach are then replaced by a deepening emotional intelligence. Our intentions in communicating can be more clearly conveyed because there are less internal conflicts getting in the way, while our conviction/passion is more evident. Hmm…