This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
__author__ = "Arun KR (kra3) <[email protected]>" | |
__license__ = "Simplified BSD" | |
''' | |
Can be found at: https://gist.github.com/2409397 | |
Public Clone URL: git://gist.github.com/2409397.git | |
Private Clone URL: [email protected]:2409397.git | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = "Arun K Rajeevan (kra3)" | |
__copyright__ = "Copyright 2011-2012" | |
__license__ = "BSD" | |
__version__ = "2" | |
__email__ = "[email protected]" | |
__status__ = "Production" | |
import time | |
import ctypes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# All right reserved. Distributed Under BSD Lisence | |
__author__="Arun.K.R <[email protected]>" | |
__date__ ="$May 11, 2011 6:23:17 PM$" | |
import os, time | |
from random import choice | |
WIDTH = 3 |
NewerOlder