PDA

View Full Version : [SHELL UNIX] killare processi vecchi


magnus77
25-09-2008, 15:53
Ciao ragazzi,
avrei bisogno di killare n processi del tipo:

...
postgres 6331 0.0 0.0 21456 2320 ? S 14:43 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:44 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:45 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:46 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
postgres 6331 0.0 0.0 21456 2320 ? S 14:47 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
...

in base al pił vecchio.

Le parole chiave nel processo dovrebbero essere nomeutente e postgres.

Lanciando un comando del tipo:

killa 4 nomeutente

la shell dovrebbe generare il seguente risultato ( lanciando ps aux ):

...
postgres 6331 0.0 0.0 21456 2320 ? S 14:47 0:00 postgres: nomeutente nomedatabase 62.149.206.XXX idle
...

Chi mi aiuta a realizzare la cosa?
:(

cionci
25-09-2008, 19:06
Quel 4 a cosa corrisponde ?