[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Checken, ob ein (Perl-)Skript schon läuft



Hallo,

Thus spoketh David Haller <lists@dhaller.de> 
unto us on Thu, 26 Apr 2012 17:46:48 +0200:

> 
> Herrschaftszeiten! Genau das hab ich schon in meiner ersten Antwort am
> 21.04.12 um 02:02:31 geschrieben!
> 
> Hallo??? Ist das ein *buntu Webforum hier oder was? *stöhn*
> 

Kein Grund persönlich zu werden ;)
Es geht z.B. folgendes sehr wohl:

~$ ./test.pl&
[1] 10995
~$ ps
  PID TTY          TIME CMD
 4222 pts/4    00:00:00 bash
10995 pts/4    00:00:00 test.pl
11008 pts/4    00:00:00 ps
~$ ps -C test.pl
  PID TTY          TIME CMD
10995 pts/4    00:00:00 test.pl
~$ pgrep test.pl
10995
:~$ ps -f -C test.pl
UID        PID  PPID  C STIME TTY          TIME CMD
ich      10995  4222  0 18:26 pts/4    00:00:00 /usr/bin/perl ./test.pl
~$ ps -l -C test.pl
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
0 S   501 10995  4222  0  80   0 -  2811 -      pts/4    00:00:00 test.pl

Allerdings hast du Recht, was das Thema pidof angeht, dieses findet nur
"perl", da habe ich mich also getäuscht, indem ich pidof das Verhalten von
pgrep unterstellte.

Gruss

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Extreme feminine beauty is always disturbing.
		-- Spock, "The Cloud Minders", stardate 5818.4


Reply to: