Skip to content

Instantly share code, notes, and snippets.

View DaffyDuke's full-sized avatar

Olivier Duquesne DaffyDuke

View GitHub Profile
@DaffyDuke
DaffyDuke / proxy.md
Created March 5, 2017 14:23
Spacewalk timeout
@DaffyDuke
DaffyDuke / openssl.md
Created March 5, 2017 15:19
Faire cohabiter OpenVPN et HTTPS sur le port 443 en IPV4 et IPV6 avec SSLH
@DaffyDuke
DaffyDuke / mise_a_jour_vio.md
Last active March 5, 2017 17:04
Mise à jour OS de VIO

Connexion sur la HMC

Accès console aux VIOs ou Servers ( ~. pour sortir) vtmenu

Attention, si modifications VIO, le faire en user vio, surtout pas root, sinon pas supporté par IBM, ne pas faire le oem_setup_env

Chrono

Downtime de 2h car passage sur 1h multipath+check VIO , réseau va basculer tout seul lspath pour contrôle des chemins multipath

@DaffyDuke
DaffyDuke / foreman.md
Created March 5, 2017 17:08
Notes Foreman

identify hosts with specific error (here, bad /etc/hosts in foreman reports)

SELECT DISTINCT "hosts"."name", "reports".id, "reports"."reported_at" AS alias_0 FROM "reports" LEFT OUTER JOIN "hosts" ON "hosts"."id" = "reports"."host_id" AND "hosts"."type" IN ('Host::Managed') LEFT OUTER JOIN "hosts" "hosts_reports_join" ON "hosts_reports_join"."id" = "reports"."host_id"AND "hosts_reports_join"."type" IN ('Host::Managed') LEFT OUTER JOIN "environments" ON "environments"."id" = "hosts_reports_join"."environment_id" LEFT OUTER JOIN "logs" ON "logs"."report_id" = "reports"."id" LEFT OUTER JOIN "messages" ON "messages"."id" = "logs"."message_id" LEFT OUTER JOIN "logs" "logs_reports_join" ON "logs_reports_join"."report_id" = "reports"."id" LEFT OUTER JOIN "sources" ON "sources"."id" = "logs_reports_join"."source_id" where messages.value like 'Could not prefetch host provider ''parsed'': Could not parse line%';
@DaffyDuke
DaffyDuke / lpar_installation_with_nim.md
Created March 5, 2017 17:31
AIX : LPAR installation with NIM

#. Create partition Via HMC : configuration, create partition, AIX profile_name ~ partition name_normal (best practice) Processors : notion EC nominal, VP max possible => le plus souvent config en shared (intégration dans un pool de CPU, ex: un pool de CPU Oracle pour les licences) Weight = Dispo(EC)*EC/somme(EC) Class :

  • 254 pour un VIO
  • 32 pour une machine de production
  • RAM : mini = désiré 8 G , max x2 => gestion pas auto, action de configuration en profil actif Attention, si max trop élevé, impact sur page d'allocation de l'hyperviseur
SELECT
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
GROUP_CONCAT(field_name ORDER BY field_name SEPARATOR ','),
',', 95/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS `95th Per`
FROM table_name;
@DaffyDuke
DaffyDuke / holidays_fr.pl
Created March 6, 2017 12:50
Congés et jours fériés en script
#!/usr/bin/perluse strict;
# source : http://forum.hardware.fr/hfr/Programmation/Divers-6/resolu-calendrier-perpetuel-sujet_141270_1.htm
use warnings;
use DateTime;
use Date::Holidays::FR;
foreach my $month (1..12) {
foreach my $day (1..31) {
if (my $holi = is_fr_holiday(2014, $month, $day)) {
my $dt = DateTime->new(year => 2014, month => $month, day => $day);
my $dow = $dt->day_of_week();
@DaffyDuke
DaffyDuke / harddisk_model.md
Last active March 6, 2017 13:08
Find your hardisk model