Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: [OPGELOST]kill command  (gelezen 2398 keer)

[OPGELOST]kill command
« Gepost op: 2009/07/12, 23:24:24 »
Wat is de juiste syntax om een deamon te stoppen m.b.v de deamons naam i.p.v. de deamons pid?

#kill............  ??
« Laatst bewerkt op: 2009/07/13, 16:02:18 door henkoegema »
𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)

Offline profoX

  • Lid
    • wesley
    • Lionslink
Re: kill command
« Reactie #1 Gepost op: 2009/07/12, 23:30:32 »
killall name-goes-here
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

Re: kill command
« Reactie #2 Gepost op: 2009/07/13, 00:07:13 »
killall name-goes-here


root@medion:~# ps -ax | grep ProxyMan
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
13267 ?        Sl     0:00 python ./ProxyMan.py    <-------dit is de deamon 'to kill'
17447 pts/1    S+     0:00 grep ProxyMan
root@medion:~# killall ProxyMan    <-------- ???
ProxyMan: no process killed
root@medion:~#
𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)

Offline profoX

  • Lid
    • wesley
    • Lionslink
Re: kill command
« Reactie #3 Gepost op: 2009/07/13, 00:23:54 »
probeer "killall ProxyMan.py"
als dat niet werkt, dan wordt de daemon dmv een env shebang of iets dergelijks gestart, waardoor het enkel te killen is door de interpreter (python) te killen... en dan moet je het dus wel op een andere manier doen, zoals bv. pkill -f ProxyMan.py
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

Re: kill command
« Reactie #4 Gepost op: 2009/07/13, 09:08:03 »
Ge kunt het process toch ook killen dmv de PID.

Edit: Laat maar zitten, te snel gelezen :).

Re: kill command
« Reactie #5 Gepost op: 2009/07/13, 09:25:15 »
kill `ps -e | grep ProxyMan | grep -v grep | awk '{ print $1 }'`

Dat zou moeten werken :P
I use a Unix-based system, that means I'll get laid as often as I have to reboot.
LibSylph
SeySayux.net

Offline profoX

  • Lid
    • wesley
    • Lionslink
Re: kill command
« Reactie #6 Gepost op: 2009/07/13, 15:44:02 »
'k vind mijn voorgesteld commando precies toch wel een beetje makkelijker in gebruik :P
Human Knowledge Belongs To The World -- Antitrust (2001)
Nederlandstalige Ubuntu documentatie van Ubuntu-NL (wiki)

Re: kill command
« Reactie #7 Gepost op: 2009/07/13, 16:01:15 »
probeer "killall ProxyMan.py"
als dat niet werkt, dan wordt de daemon dmv een env shebang of iets dergelijks gestart, waardoor het enkel te killen is door de interpreter (python) te killen... en dan moet je het dus wel op een andere manier doen, zoals bv. pkill -f ProxyMan.py

Ja dat werkt wel.     =D

Bedankt.
𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)