This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change this to the SSD you want to check | |
drive="/dev/sda" | |
# Extract the sector size and LBA written from the output | |
sector_size=$(sudo smartctl -Ai $drive | grep 'Sector Size' | awk '{print $3}') | |
lba_written=$(sudo smartctl -Ai $drive | grep 'Total_LBAs_Written' | awk '{print $10}') | |
lba_read=$(sudo smartctl -Ai $drive | grep 'Total_LBAs_Read' | awk '{print $10}') | |
# Calculate TBW and print the result | |
tb_write=$(echo "scale=2; $sector_size * $lba_written / 1024^4" | bc -l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
import argparse | |
import os, binascii | |
@dataclass | |
class AccessPoint: | |
name: str | |
mac_addr: str |