Skip to content

Instantly share code, notes, and snippets.

View xontik's full-sized avatar

Benjamin Borlet xontik

View GitHub Profile
@xontik
xontik / linux-kill-pts.md
Created June 27, 2020 20:39 — forked from holmberd/linux-kill-pts.md
Kill tty/pts sessions in Linux

Kill user tty/pts sessions in Linux

Commands

  • w: show who is logged on and what they are doing
  • who: show who is logged on
  • tty: show current users pseudo terminal
  • ps -ft pts/1: get process id for the pseudo terminal
  • pkill: signal process based on name and other attributes
#!/bin/bash
# This is a modified version of the Supermicro PID Logic Fan Script from https://forums.freenas.org/index.php?resources/fan-scripts-for-supermicro-boards-using-pid-logic.24/
# and is designed to run on Supermicro X9 boards using an Nuvoton WPCM450 BMC.
#
# IPMI raw commands are gathered from https://www.supermicro.com/support/faqs/faq.cfm?faq=15634
# and https://www.reddit.com/r/homelab/comments/8fhomj/getting_those_supermicro_x9_motherboard_fans/
#
# Attention: When i modified this script, i had already configured full fan mode via ipmi web interface.
# Therefore this script may not enable full fan mode. Please enable it manually, otherwise the ipmi
#!/bin/bash
#from :
#https://gist.github.com/deviantony/2b5078fe1675a5fedabf1de3d1f2652a
#https://gist.github.com/tancou/adbdacd1aa1d3afc68c2d877c6ef353c
apt update -y
apt install curl -y
apt install qemu-guest-agent -y