{"id":16408671,"url":"https://github.com/creativeprojects/hardware-events","last_synced_at":"2025-02-24T00:44:33.180Z","repository":{"id":38316633,"uuid":"428050466","full_name":"creativeprojects/hardware-events","owner":"creativeprojects","description":"Server motherboard hardware monitoring","archived":false,"fork":false,"pushed_at":"2023-10-02T15:46:04.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-05T21:44:44.170Z","etag":null,"topics":["drivetemp","event","fan","hardware","ipmi","ipmitool","motherboard","sensor","server","speed","supermicro","temperature"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/creativeprojects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-14T21:55:39.000Z","updated_at":"2022-01-24T08:23:01.000Z","dependencies_parsed_at":"2024-06-20T00:05:13.751Z","dependency_job_id":"362b905e-7685-4394-9783-544ebb111a95","html_url":"https://github.com/creativeprojects/hardware-events","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":0.2666666666666667,"last_synced_commit":"8a2d41ef47397a7c2f738932f0484a783c5a38db"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhardware-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhardware-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhardware-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/creativeprojects%2Fhardware-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/creativeprojects","download_url":"https://codeload.github.com/creativeprojects/hardware-events/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240400292,"owners_count":19795331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drivetemp","event","fan","hardware","ipmi","ipmitool","motherboard","sensor","server","speed","supermicro","temperature"],"created_at":"2024-10-11T06:17:30.239Z","updated_at":"2025-02-24T00:44:33.143Z","avatar_url":"https://github.com/creativeprojects.png","language":"Go","readme":"# hardware-events\n\nThis software helps with the monitoring of a server motherboard.\n\nThe project started when I changed the FANs on a Supermicro motherboard and they started to run at full speed because their nominal speed was measured too low for the motherboard. I could have bought some other FANs, but I didn't want to.\n\nThis project:\n* reads temperature from various sensors (CPU, motherboard, disks)\n* sets FAN speed via the command line like `ipmitool` (multi-zones)\n* sends sensor and FAN data to a monitoring platform (zabbix)\n* suspends hard drive when there's no activity (while still being able to read the temperature before suspending)\n\nI have it running on various Supermicro server boards (X9/X10/X11) and manage the different FAN zones separately.\n\n## Configuration\n\nEverything is in the configuration file. This configuration is Linux based. The project probably works on FreeBSD (although not tested) but you might need to change the sensor settings (I'm using linux `sysfs`):\n\n```yaml\n---\nsensors:\n  hddtemp:\n    command: \"/usr/sbin/hddtemp -n ${DEVICE}\"\n    timeout: 5s\n  smartctl:\n    command: \"/usr/sbin/smartctl -l scttempsts ${DEVICE}\"\n    regexp: \"Current Temperature:\\\\s+(\\\\d+) Celsius\"\n    timeout: 5s\n  cpu:\n    file: \"/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input\"\n    divider: 1000\n  cpu-average:\n    files:\n    - \"/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp?_input\"\n  pch:\n    file: \"/sys/class/thermal/thermal_zone1/temp\"\n    divider: 1000\n  drivetemp:\n    file: \"/sys/block/${DEVICE_NAME}/device/hwmon/hwmon*/temp1_input\"\n    divider: 1000\n\nfan_control:\n  # set fan mode to full\n  init_command: \"/usr/bin/ipmitool raw 0x30 0x45 0x01 0x01\"\n  set_command: \"/usr/bin/ipmitool raw 0x30 0x70 0x66 0x01 ${FAN_ZONE} ${FAN_SPEED}\"\n  # set fan mode to normal\n  exit_command: \"/usr/bin/ipmitool raw 0x30 0x45 0x01 0x00\"\n  timeout: 5s\n  parameters:\n    FAN_ZONE:\n      format: \"%#x\"\n    FAN_SPEED:\n      format: \"%#x\"\n  zones:\n    zone1:\n      id: 0\n      min_speed: 25\n      sensors:\n        cpu:\n          average: 30s\n          run_every: 10s\n          rules:\n          - temperature:\n              from: 40\n              to: 60\n            run_every: 5s\n            fan_speed:\n              from: 25\n              to: 100\n        pch:\n          average: 1m\n          run_every: 20s\n          rules:\n          - temperature:\n              from: 50\n              to: 70\n            fan_speed:\n              from: 25\n              to: 100\n    zone2:\n      id: 1\n      min_speed: 25\n      run_every: 5m\n      sensors:\n        rpool1:\n          average: 1m\n          run_every: 1m\n          rules:\n          - temperature:\n              from: 40\n              to: 60\n            fan_speed:\n              from: 30\n              to: 100\n        datapool1:\n          average: 5m\n          rules:\n          - temperature:\n              from: 40\n              to: 60\n            fan_speed:\n              from: 30\n              to: 100\n        datapool2:\n          average: 5m\n          rules:\n          - temperature:\n              from: 40\n              to: 60\n            fan_speed:\n              from: 30\n              to: 100\n        datapool3:\n          average: 5m\n          rules:\n          - temperature:\n              from: 40\n              to: 60\n            fan_speed:\n              from: 30\n              to: 100\n        datapool4:\n          average: 5m\n          rules:\n          - temperature:\n              from: 40\n              to: 60\n            fan_speed:\n              from: 30\n              to: 100\n\ndisk_power_status:\n  hdparm:\n    check_command: \"/sbin/hdparm -C ${DEVICE}\"\n    active: \"active/idle\"\n    standby: \"standby\"\n    sleeping: \"sleeping\"\n    standby_command: \"/sbin/hdparm -y ${DEVICE}\"\n    timeout: 5s\n\ndisk_pools:\n  rpool:\n    - rpool1\n    - rpool2\n  datapool:\n    - datapool1\n    - datapool2\n    - datapool3\n    - datapool4\n\ndisks:\n  rpool1:\n    device: \"/dev/disk/by-id/ata-SAMSUNG_SSD_first\"\n    temperature_sensor: drivetemp\n    monitor_temperature: always\n  rpool2:\n    device: \"/dev/disk/by-id/ata-SAMSUNG_SSD_second\"\n    temperature_sensor: drivetemp\n    monitor_temperature: always\n  datapool1:\n    device: \"/dev/disk/by-id/ata-ST2000DM001-first\"\n    temperature_sensor: drivetemp\n    monitor_temperature: when_active\n    last_active: 50m\n    standby_after: 1h\n  datapool2:\n    device: \"/dev/disk/by-id/ata-ST2000DM001-second\"\n    temperature_sensor: drivetemp\n    monitor_temperature: when_active\n    last_active: 50m\n    standby_after: 1h\n  datapool3:\n    device: \"/dev/disk/by-id/ata-ST2000DM001-third\"\n    temperature_sensor: drivetemp\n    monitor_temperature: when_active\n    last_active: 50m\n    standby_after: 1h\n  datapool4:\n    device: \"/dev/disk/by-id/ata-ST2000DM001-fourth\"\n    temperature_sensor: drivetemp\n    monitor_temperature: when_active\n    last_active: 50m\n    standby_after: 1h\n\ntemplates:\n  zabbix:\n    source: \"zabbix_template.go.txt\"\n\ntasks:\n  zabbix_sender:\n    command: \"zabbix_sender -z 127.0.0.1 -s \\\"Zabbix server\\\" -i -\"\n    timeout: 5s\n    stdin:\n      template: zabbix\n\nschedule:\n  zabbix:\n    task: zabbix_sender\n    when:\n    - startup\n    - every 5m\n```\n\n# External resources\n\n* This is where I found out I could control the FAN myself: https://forums.servethehome.com/index.php?resources/supermicro-x9-x10-x11-fan-speed-control.20/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativeprojects%2Fhardware-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcreativeprojects%2Fhardware-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcreativeprojects%2Fhardware-events/lists"}