#!/usr/bin/env python3
import subprocess
import re
import sys
import platform

argv = sys.argv
print("cmdline: " + str(argv))
ps = subprocess.check_output(["ps", "ax"]).decode('utf-8')
ps = ps.split("\n")

for i in ps:
    if argv[0] not in i and "migrate.sh" not in i and argv[1] in i:
        pid = i.split()[0]


print("PID: " + pid)

ret = subprocess.check_output(["/CR_for_FreeBSD/crtools", "dump", "-t", "-p", pid])

print(ret.decode('utf-8'))
#subprocess.check_output(["kill", "-TERM", pid])
print("======================")

print(pid)

b37eb9ce1a86ce0643096d3ab03a1bd4904b0257
<mask token>

<mask token>
print('cmdline: ' + str(argv))
<mask token>
for i in ps:
    if argv[0] not in i and 'migrate.sh' not in i and argv[1] in i:
        pid = i.split()[0]
print('PID: ' + pid)
<mask token>
print(ret.decode('utf-8'))
print('======================')
print(pid)

<mask token>
argv = sys.argv
print('cmdline: ' + str(argv))
ps = subprocess.check_output(['ps', 'ax']).decode('utf-8')
ps = ps.split('\n')
for i in ps:
    if argv[0] not in i and 'migrate.sh' not in i and argv[1] in i:
        pid = i.split()[0]
print('PID: ' + pid)
ret = subprocess.check_output(['/CR_for_FreeBSD/crtools', 'dump', '-t',
    '-p', pid])
print(ret.decode('utf-8'))
print('======================')
print(pid)

import subprocess
import re
import sys
import platform
argv = sys.argv
print('cmdline: ' + str(argv))
ps = subprocess.check_output(['ps', 'ax']).decode('utf-8')
ps = ps.split('\n')
for i in ps:
    if argv[0] not in i and 'migrate.sh' not in i and argv[1] in i:
        pid = i.split()[0]
print('PID: ' + pid)
ret = subprocess.check_output(['/CR_for_FreeBSD/crtools', 'dump', '-t',
    '-p', pid])
print(ret.decode('utf-8'))
print('======================')
print(pid)

#!/usr/bin/env python3
import subprocess
import re
import sys
import platform

argv = sys.argv
print("cmdline: " + str(argv))
ps = subprocess.check_output(["ps", "ax"]).decode('utf-8')
ps = ps.split("\n")

for i in ps:
    if argv[0] not in i and "migrate.sh" not in i and argv[1] in i:
        pid = i.split()[0]


print("PID: " + pid)

ret = subprocess.check_output(["/CR_for_FreeBSD/crtools", "dump", "-t", "-p", pid])

print(ret.decode('utf-8'))
#subprocess.check_output(["kill", "-TERM", pid])
print("======================")

print(pid)
