Skip to content

Instantly share code, notes, and snippets.

View jmhands's full-sized avatar

JM Hands jmhands

View GitHub Profile
### Keybase proof
I hereby claim:
* I am jmhands on github.
* I am storage_jm (https://keybase.io/storage_jm) on keybase.
* I have a public key ASD3rLRuzwBPVEwldO_vvkfCKeTnNEwgniQ5BzHd1wKtewo
To claim this, I am signing this object:
@jmhands
jmhands / compose.yml
Last active April 2, 2023 21:29
node and prometheus with filesystem access
version: '3.8'
services:
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
ports:
- 9100:9100
volumes:
@jmhands
jmhands / jm_ssd
Created January 31, 2023 05:45
FioSynth JM SSD test
{
"pre":[
{
"template":"prep_flash.fio",
"alias":"seqprep",
"values" : {
"TIME" : "N/A",
"BLKSIZE" : "128K",
"DEPTH" : 256,
"RRATE" : 0,
@jmhands
jmhands / plow_windows.py
Last active April 9, 2023 04:06
windows version of plow
import sys
import glob
import shutil
import random
import asyncio
import os
from pathlib import Path
from datetime import datetime
from collections import defaultdict
from watchdog.observers import Observer
@jmhands
jmhands / compose.yml
Created May 30, 2023 16:23
wordpress
services:
db:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- db_data:/var/lib/mysql
restart: always
@jmhands
jmhands / update.sh
Created July 20, 2023 14:29
update Phison drive
#!/bin/bash
# Check if argument was provided
if [ $# -eq 0 ]
then
echo "No arguments supplied. Please provide a range of NVMe drives (e.g. 0-10)."
exit 1
fi
# Split the range into start and end
@jmhands
jmhands / compose.yml
Created October 30, 2023 16:40
docker compose for nvidia dcgm
version: '3.8'
services:
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
ports:
- 9100:9100
volumes:
@jmhands
jmhands / gist:6512e63079c8a64a73fbbfa001aa5b39
Created November 8, 2023 17:36
spdk icelake P5520 7.68TB x12
[global]
ioengine=/usr/local/lib/fio/spdk_bdev
spdk_json_conf=/home/jm/spdk/icelake.json
thread=1
group_reporting=1
direct=1
time_based=1
runtime=30
ramp_time=5
norandommap=1
@jmhands
jmhands / random_read.csv
Created January 7, 2024 02:49
for use in fio script
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 24 columns, instead of 15 in line 4.
file,job,format,percentile_list,ioengine,direct,norandommap,randrepeat,group_reporting, stonewall,new_group, rw, rwmixread, numjobs,iodepth, bs,time_based, ramp_time, runtime,loops,log_avg_msec,log_hist_msec,write_iops_log,write_hist_log
randread4k11.fio,randread114k,,1:5:10:20:30:50:60:70:75:80:85:90:95:99:99.9:99.99:99.999:99.9999:99.99999,io_uring,1,,,Yes,Yes,Yes,randread, ,1,1,4k,Yes,5,30,,1000,60000,iol_randread_j1_q1_4k,whl_randread_j1_q1_4k
randread4k21.fio,randread124k,,1:5:10:20:30:50:60:70:75:80:85:90:95:99:99.9:99.99:99.999:99.9999:99.100000,io_uring,1,,,Yes,Yes,Yes,randread,,1,2,4k,Yes,5,30,,1000,60000,iol_randread_j1_q2_4k,whl_randread_j1_q2_4k
randread4k41.fio,randread144k,,1:5:10:20:30:50:60:70:75:80:85:90:95:99:99.9:99.99:99.999:99.9999:99.100001,io_uring,1,,,Yes,Yes,Yes,randread,,1,4,4k,Yes,5,30,,1000,60000,iol_randread_j1_q4_4k,whl_randread_j1_q4_4k
randread4k81.fio,randread184k,,1:5:10:20:30:50:60:70:75:80:85:90:95:99:99.9:99.99:99.999:99.9999:99.100002,io_uring,1,,,Yes,Yes,Yes,randread,,1,
import subprocess
import json
import glob
def check_smartctl_for_drive(device):
"""
Runs smartctl on the specified device and parses the JSON output.
Checks for reallocated sectors for SATA drives and grown defect list for SAS drives.
Args: