Mr.Combet Webshell
Your IP :
216.73.216.136
Server IP :
103.233.58.157
Server :
Windows NT WIN-4PGF72KEHKB 10.0 build 17763 (Windows Server 2016) AMD64
Server Software :
Microsoft-IIS/10.0
PHP Version :
7.3.25
Add File :
Submit
Add Directory :
Submit
Dir :
C:
/
Program Files
/
Python312
/
Lib
/
test
/
Edit File Name :
memory_watchdog.py
"""Memory watchdog: periodically read the memory usage of the main test process and print it out, until terminated.""" # stdin should refer to the process' /proc/<PID>/statm: we don't pass the # process' PID to avoid a race condition in case of - unlikely - PID recycling. # If the process crashes, reading from the /proc entry will fail with ESRCH. import sys import time from test.support import get_pagesize while True: page_size = get_pagesize() sys.stdin.seek(0) statm = sys.stdin.read() data = int(statm.split()[5]) sys.stdout.write(" ... process data size: {data:.1f}G\n" .format(data=data * page_size / (1024 ** 3))) sys.stdout.flush() time.sleep(1)
Save