Admins eHow SysAdmin Tips & Tricks

January 11, 2022

Log the memory usage of a process in Linux

Filed under: linux — Tags: , , , — admin @ 10:27 pm

Create with following contents :

#! /usr/bin/python3

import json, psutil, datetime, sys, time

f = open('memory_usage_'+sys.argv[1]+'.log', 'a')

while True:

Make it executable :

chmod +x

Usage :

./ PID

By default it logs the memory usage info every 60 seconds in a file named memory_usage_PID.log in the same folder, if you want, you can change time.sleep(60) in the code to suit your needs.

January 9, 2022

Linux DNS dig utility for Windows x64 (update)

Filed under: dns,Windows — Tags: , , — admin @ 12:10 am

This installer installs the dig utility in Windows directory by default.
Download installer : Dig-x64-9.16.24-setup.exe

Powered by WordPress