When running xmrig to mine xmr on low memory systems, it will sometimes get killed by Out of Memory Control. To prevent this, I wrote this script to start xmrig and adjust its oom value:
#!/bin/bash
/opt/xmrig/build/xmrig
PID=$(ps aux | grep xmrig | head -n 1 | awk '{print $2}')
echo -17 > /proc/$PID/oom_adj
Monero donations welcome:
42z1KwEVpbrYBjYuHyyEQZUqBrFpMFmU6TPL2fNrLCVV37BB2ZPbTTKeyettF2TLhiVexXUPyg7W5EzVFiw8gBak8zuL4Pv
Saturday, June 11, 2022
Friday, May 20, 2022
Automatically Downloading The New Book The Art of Mac Malware Book
I wrote this script today to automatically download the chapters from the new book, The Art of Mac Malware by Patrick Wardle, so I could put it on my ereader. Looks very interesting!
#!/bin/bash
lynx -dump https://taomm.org/vol1/pdfs.html | grep "https" | awk '{for(i=2;i<NF+1;i++) printf $i" "; print ""}' | sed -r 's/\s*$//g' | sed -r 's/ /%20/g' > urls.txt && wget -i urls.txt
#!/bin/bash
lynx -dump https://taomm.org/vol1/pdfs.html | grep "https" | awk '{for(i=2;i<NF+1;i++) printf $i" "; print ""}' | sed -r 's/\s*$//g' | sed -r 's/ /%20/g' > urls.txt && wget -i urls.txt
Subscribe to:
Posts (Atom)