I have a case where I'd be keen on (carefully!) killing some old
processes that are database connections.

In particular, the following (AIX) ps command shows 3 plausible
candidates, where the first one, with start time on November 19th, is
the one I'd like to kill off.

twcsds003[/home/postgres]$ ps auxw | egrep "whois" 
postgres 4767900  0.0  0.0 7836 12048  pts/7 A      Nov 19  1:25 postgres: 
whois oxrsorg 149.131.196.100 idle 
postgres 3784818  0.0  0.0 7496 11420  pts/7 A    07:06:30  0:02 postgres: 
whois oxrsorg 149.131.196.101 idle 
postgres 4243692  0.0  0.0 7328 11424  pts/7 A    05:49:22  0:02 postgres: 
whois oxrsorg 149.131.196.101 idle 
postgres 3703014  0.0  0.0  236   248  pts/3 A    16:39:16  0:00 egrep whois 

Should the following seem reasonable?  I have an issue with tminus()
being underdocumented...

filters:
{ olddbconns
  owner=postgres
  command="postgres: whois oxrs"
  FromSTime: "tminus(1,1,1,1,1,1)" ###
  ToSTime: "tminus(0,0,1,0,0,0)"   ### There is no documentation for
                                   ### tminus args...  I assume
                                   ### tminus(YY,MM,DD,hh,mm,ss)???
}

processes: 
  "postgres"
    filter=olddbconns
    signal=int
-- 
(format nil "[EMAIL PROTECTED]" "cbbrowne" "ntlug.org")
http://cbbrowne.com/info/linuxdistributions.html
Rules of the Evil Overlord  #220. "Whatever my one vulnerability is, I
will fake a  different one. For example, ordering  all mirrors removed
from the palace, screaming and flinching whenever someone accidentally
holds up a mirror, etc. In the climax when the hero whips out a mirror
and thrusts it at my face,  my reaction will be ``Hmm...I think I need
a shave.''"  <http://www.eviloverlord.com/>
_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to