Changeset 283 for trunk/curo

Show
Ignore:
Timestamp:
09/01/11 22:33:29 (3 years ago)
Author:
depesz
Message:

Turn locks report into autorefreshed watch. In process, generalize code so that we can "watch" any query

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/curo/s/activity.sql

    r272 r283  
    11-- Current activity 
    2 \! $HOME/.curo/s/activity/prepare.sh 
     2\! $HOME/.curo/c/watch $HOME/.curo/s/activity/query.1.sql ~/.curo/s/activity/fifo "Current activity" 
    33\i ~/.curo/s/activity/fifo 
    44\! rm -f ~/.curo/s/activity/fifo 
  • trunk/curo/s/locks.sql

    r281 r283  
    1 -- Locks information!menuwait 
    2 SELECT 
    3     l.* 
    4 FROM 
    5     pg_locks l 
    6     join pg_stat_activity a on l.pid = a.procpid 
    7 WHERE 
    8     a.datname = current_database() 
    9 
     1-- Locks information 
     2\! $HOME/.curo/c/watch $HOME/.curo/s/locks/locks.sql ~/.curo/s/locks/fifo "Locks information" 
     3\i ~/.curo/s/locks/fifo 
     4\! rm -f ~/.curo/s/locks/fifo 
     5\! clear