Přejít na menu

Processes in Linux

Správa článků

Vyhledávání Vyhledávání
27.12.2013 20:48
,
Počet přečtení: 746

Working with Linux processes - listing, killing etc.

Process theory

  • process exit code is passed to its parent process
  • when parent process does not reap exit code, process becomes zombie
  • the only possibility to kill defunct process is killing the parent

Kill defunct processes by killing their parents

Defunct processes (zombies) usually have to be killed by killing their parent processes. this command retrieves such zombies and their immediate parents and kills all of the matching processes (source).

ps afx | grep defunct -B 1 | grep -Eo "[0-9]{3,}" | xargs kill -9

Listing files opened by process

  • ls -l /proc/<pid>/fd
  • lsof -p <pid>
Vytvořil 27. prosince 2013 ve 20:59:12 mira. Upravováno 1x, naposledy 15. května 2014 ve 21:17:58, mira


Diskuze ke článku

Vložení nového komentáře
*
*
*