Find .d pid files with swift-orphans
Change-Id: I7a2f19862817abf15e51463bd124293730451602
This commit is contained in:
parent
3ec6ce2a0f
commit
e6e31410e0
@ -53,7 +53,7 @@ Example (sends SIGTERM to all orphaned Swift processes older than two hours):
|
|||||||
|
|
||||||
for root, directories, files in os.walk(options.run_dir):
|
for root, directories, files in os.walk(options.run_dir):
|
||||||
for name in files:
|
for name in files:
|
||||||
if name.endswith('.pid'):
|
if name.endswith(('.pid', '.pid.d')):
|
||||||
pids.append(open(os.path.join(root, name)).read().strip())
|
pids.append(open(os.path.join(root, name)).read().strip())
|
||||||
pids.extend(subprocess.Popen(
|
pids.extend(subprocess.Popen(
|
||||||
['ps', '--ppid', pids[-1], '-o', 'pid', '--no-headers'],
|
['ps', '--ppid', pids[-1], '-o', 'pid', '--no-headers'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user