This file contains 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
$drive = "C:" | |
Get-CimInstance -ClassName Win32_LogicalDisk | Where-Object { $_.DeviceID -eq $drive } | |
$partition = Get-CimInstance Win32_LogicalDiskToPartition | Where-Object { $_.Dependent.DeviceID -eq $drive } | Select-Object -ExpandProperty Antecedent | Select-Object -ExpandProperty DeviceID | |
$diskDrive = Get-CimInstance -ClassName Win32_DiskDriveToDiskPartition | Where-Object { $_.Dependent.DeviceID -eq $partition } | Select-Object -ExpandProperty Antecedent | Select-Object -ExpandProperty DeviceID | |
Get-CimInstance -Class Win32_DiskDrive | Where-Object { $_.DeviceID -eq $diskDrive } |
This file contains 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/sh | |
file="/tmp/exos_smartctl" | |
if [ -f "$file" ] ; then | |
rm "$file" | |
fi | |
sudo smartctl /dev/sata1 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file" | |
sudo smartctl /dev/sata2 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file" | |
sudo smartctl /dev/sata3 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file" | |
sudo smartctl /dev/sata4 -a -v 1,raw48:54,Read_Error_Rate -v 7,raw48:54,Seek_Error_Rate -v 9,msec24hour32,Power_On_Hours -v 188,raw16,Command_Timeout -v 194,raw24/raw32,Temperature -v 240,msec24hour32,Head_Flight_Hours >> "$file" | |
sudo smartctl /dev/sata5 - |
This file contains 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
import requests | |
import json | |
import time | |
import datetime | |
import os.path | |
INTERVAL_TIME = 10 | |
HOST = 'https://...' | |
CAMERA_NAME = 'Mango' | |
# Set up an offline username/password in UniFi with Protect read permissions |
This file contains 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
# As of SQL 2017 | |
/Record @id @type @time | |
/Record/ConnectivityTraceRecord/ClientConnectionId | |
/Record/ConnectivityTraceRecord/IsClient | |
/Record/ConnectivityTraceRecord/LocalHost | |
/Record/ConnectivityTraceRecord/LocalPort | |
/Record/ConnectivityTraceRecord/OSError | |
/Record/ConnectivityTraceRecord/RecordSource | |
/Record/ConnectivityTraceRecord/RecordTime |
OlderNewer