Skip to content

Instantly share code, notes, and snippets.

View johanburati's full-sized avatar
😄
Alive and Kicking

Johan Burati johanburati

😄
Alive and Kicking
  • Red Hat
  • Tokyo
  • 05:29 (UTC +09:00)
View GitHub Profile
#!/bin/bash
export LANG=C
# If this script hangs, un-comment the below two entries and note the command that the script hangs on. Then comment out that command and re-run the script.
# set -x
# set -o verbose
[[ -d /tmp/sosreport ]] && rm -rf /tmp/sosreport
mkdir /tmp/sosreport && cd /tmp/sosreport && mkdir -p var/log etc/lvm etc/sysconfig network storage sos_commands/networking
@johanburati
johanburati / supportconfig.conf
Created May 11, 2022 05:45
Config for supportconfig, skip memory check
####################################
# Default Options
####################################
OPTION_APPARMOR=1
OPTION_AUDIT=1
OPTION_AUTOFS=1
OPTION_BOOT=1
OPTION_BTRFS=1
OPTION_CIMOM=1
OPTION_CRASH=1
@johanburati
johanburati / sftp.json
Last active December 13, 2021 07:51
Create SFTP enabled storage on Azure
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": ["Standard_LRS", "Standard_ZRS"],
"metadata": { "description": "Storage Account type" }
},
@johanburati
johanburati / waagent.log
Created February 11, 2021 23:19
Debian 11 waagent.log
2021-02-09T00:58:32.839858Z INFO MainThread cloud-init is enabled: True
2021-02-09T00:58:32.848959Z INFO MainThread Using cloud-init for provisioning
2021-02-09T00:58:43.487153Z INFO MainThread cloud-init is enabled: True
2021-02-09T00:58:43.489651Z INFO MainThread Using cloud-init for provisioning
2021-02-09T00:58:43.492226Z INFO MainThread Running CloudInit provisioning handler
2021-02-09T00:58:43.497379Z INFO MainThread Detect protocol endpoints
2021-02-09T00:58:43.500033Z INFO MainThread Clean protocol and wireserver endpoint
2021-02-09T00:58:43.502899Z INFO MainThread WireServer endpoint is not found. Rerun dhcp handler
2021-02-09T00:58:43.506083Z INFO MainThread Test for route to 168.63.129.16
2021-02-09T00:58:43.508661Z INFO MainThread Route to 168.63.129.16 exists
@johanburati
johanburati / disable-hyperthreading.sh
Last active January 8, 2021 06:39
Disable Hyperthreading
#!/bin/bash
for cpu in $(find /sys/devices/system/cpu/cpu* -name online); do echo "$cpu"; echo 0 > $cpu; done
@johanburati
johanburati / rc-local.service
Created July 27, 2020 04:49
rc-local.service
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
@johanburati
johanburati / StackOfAllProcess.sh
Created June 15, 2020 22:52
StackOfAllProcess.sh
#!/bin/bash
echo "Protected disks"
/etc/vxagent/bin/inm_dmit --get_protected_volume_list
echo "Stats"
for dev in `/etc/vxagent/bin/inm_dmit --get_protected_volume_list`
do
echo $dev
echo "=============="
System: Host: nuc Kernel: 5.4.0-14-generic x86_64 bits: 64 Console: tty 1 Distro: Ubuntu 20.04 LTS (Focal Fossa)
Machine: Type: Mini-pc System: Intel Client Systems product: NUC8i5BEH v: J72747-306 serial: G6BE00200Q1M
Mobo: Intel model: NUC8BEB v: J72692-308 serial: GEBE002009ZM UEFI [Legacy]: Intel
v: BECFL357.86A.0073.2019.0618.1409 date: 06/18/2019
Memory: RAM: total: 15.51 GiB used: 1.48 GiB (9.6%)
Array-1: capacity: 32 GiB slots: 2 EC: None
Device-1: SODIMM1 size: 8 GiB speed: 2400 MT/s
Device-2: SODIMM2 size: 8 GiB speed: 2400 MT/s
CPU: Topology: Quad Core model: Intel Core i5-8259U bits: 64 type: MT MCP L2 cache: 6144 KiB
Speed: 799 MHz min/max: 400/3800 MHz Core speeds (MHz): 1: 700 2: 700 3: 700 4: 700 5: 700 6: 700 7: 700 8: 700
@johanburati
johanburati / monitor.sh
Created January 31, 2020 06:57
Script to monitor system
#!/bin/bash
#
echo "============[START]============"
echo
echo "CURRENT TIME AND SYSTEM INFO"
date
uname -a
echo
echo "LARGEST CPU USERS"
echo "# ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10 :"
@johanburati
johanburati / disable-hyperthreading.sh
Last active January 30, 2020 11:32
Disable hyperthreading
#!/bin/bash
for cpu in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list)
do
echo 0 > /sys/devices/system/cpu/cpu${cpu}/online
done