Skip to content

Instantly share code, notes, and snippets.

View DaffyDuke's full-sized avatar

Olivier Duquesne DaffyDuke

View GitHub Profile
@DaffyDuke
DaffyDuke / Oracle.md
Created March 4, 2017 15:01
Administration Base de Données

Lister les objets dans un schéma

select object_name,object_type from user_objects;

Trouver le propriétaire d'une table

select owner,table_name from dba_tables where table_name = '$TABLE';

Voir les tablespaces et leurs index

@DaffyDuke
DaffyDuke / puppet_list_changed.md
Last active March 4, 2017 15:17
Puppet: List Changed Files

Source : http://lzone.de/blog/Puppet:%20List%20Changed%20Files

If you want to know which files where changed by puppet in the last days:

cd /var/lib/puppet
for i in $(find clientbucket/ -name paths); do
	echo "$(stat -c %y $i | sed 's/\..*//')       $(cat $i)";
done | sort -n

will give you an output like

@DaffyDuke
DaffyDuke / check_dmesg.sh
Created March 4, 2017 17:04
Nagios Plugin for dmesg Monitoring
#!/bin/bash
# Source : http://lzone.de/blog/Nagios%20Plugin%20for%20dmesg%20Monitoring
SEVERITIES="err,alert,emerg,crit"
WHITELIST="microcode: |\
Firmware Bug|\
i8042: No controller|\
Odd, counter constraints enabled but no core perfctrs detected|\
Failed to access perfctr msr|\
echo 0 > /proc/sys"
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
 
# Licensed under the Python License (see http://www.python.org/psf/license/)
# Copyright (C) 2008 Pierre Duquesne <stackp@online.fr>
#
# Changelog:
# 20080722 * disable spinning when output is redirected to a file
# 20080718 * Use BODY.PEEK[] in the fetch command as specified in RFC 3501
# (fix by Stefan)
@DaffyDuke
DaffyDuke / susecon2015.md
Created March 5, 2017 11:45
Notes Susecon 2015 - Amsterdam

Keynote Ouverture

Video Control, Optimlize,Innovate

Nils Brauckman open spource the way to innovate openstack success story agile, complet, sous control cost 2 marker distibuted storageceph May the open source be with you

@DaffyDuke
DaffyDuke / Migration de LPAR de datacenter.md
Created March 5, 2017 14:10
Migration de LPAR de datacenter

Avant la migration

NIM source> ssh <lpar_name> "chdev -l sys0 -a ghostdev=1

NIM target> cd /home/admin
NIM target> ./ident_hdisk_vg_lun.sh -l <lpar_name>

Migration

Arrêt de la lpar source

@DaffyDuke
DaffyDuke / update_firmware_VIO.md
Created March 5, 2017 14:12
Mise à jour de firmware VIO

Scénario

oem_setup_env
rpm -ivh --ignoreos df1000f114108a03.203305.aix.rpm
diag -d fcs0 -T download
diag -d fcs1 -T download
diag -d fcs2 -T download
diag -d fcs3 -T download

En cas de problèmes, pour vérifier

@DaffyDuke
DaffyDuke / cfgmgmt2016.md
Last active March 5, 2017 14:13
Notes Configuration Management Camp 2016

Ouverture

600 personnes, complet HoGent = univ. management

Mark Shuttleworth, Canonical

Magic if application modeling => stop cfgmgmt !, juste écrire des logiciels "on ne compile plus" on ne manage plus sa collection, on cherche de la musique, => cfg / "big software" Besoin d'un liant comme apt-get/rpm le fait pour les soft c++ & co => secr pour lier les briques openstack ? Beosin de définir un modèle de "liant" pas les machines, ni les configuration, mais le logiciel lui même

@DaffyDuke
DaffyDuke / sysadminday6.md
Created March 5, 2017 14:18
Notes Sysadmin Days #6 - Paris

on est pas là pour vendre de la magie, 8 ans de conf

sysadmin de combat (FRED DE VILLAMIL)

attention au budget divergence de priorité => "redonner confiance dans l'infrastructure" 50/50 scrum+run, planif ve pm, daily standup mach. café astreinte tournante, toujours donner une date pour le delivery les dev font la MEP via jenkins+ansible (=> java / go) monte une équipe sénior (pour ne pas faire de micromanagement, montée en compétence rapide) profil cher entre 50/90