Wednesday, December 26, 2012

VMware Rollup Health State sensor sync problem

Mmmm... The horrible ! icon... the solution:
First you need to compare two sensors. You need two tags:
A - https://vCenter_Server_name/mob/
B - https://NodeAffected_Server_name/mob/
Then:
1. Connect API via Internet browser - https://vCenter_Server_name/mob/ and https://NodeAffected_Server_name/mob/
2. Choose: content | ServiceContent | content
3. Navigate to rootFolder | ManagedObjectReference:Folder | name(or ha)-folder-root (name-folder-root)
4. Find childEntity | ManagedObjectReference:ManagedEntity[] | name(or ha)-datacenter (name-datacenter)
5. Choose: hostFolder | ManagedObjectReference:Folder | name(or ha)-folder-host (host)
6. Then find: childEntity | ManagedObjectReference:ManagedEntity[] | name(or ha)-compute-res
7. Choose: host | ManagedObjectReference:HostSystem[] | name(or ha)-host
8. Finally, go to runtime | HostRuntimeInfo | runtime
9. On doing that, navigate to healthSystemRuntime | HealthSystemRuntime | healthSystemRuntime
10. Click on systemHealthInfo | HostSystemHealthInfo | systemHealthInfo
11. Find: numericSensorInfo | HostNumericSensorInfo[] | numericSensorInfo
In both of browser tags/windows:
12. Compare the value in the following string name string "VMware Rollup Health State"
If they are not equal, then you will need to resync vcenter and the node. How?
1. delete node from vcenter.
2. Restart agents in the node.
3. Insert node in vcenter.
Vicente
view raw gistfile1.txt hosted with ❤ by GitHub
:)

Thursday, November 22, 2012

MINT 13 AND UBUNTU 12.04 CANON IR C2880-C3380 (UFR2) HOW TO

Very crazy driver......
MINT 13 AND UBUNTU 12.04 CANON IR C2880-C3380 (UFR2) HOW TO
--------------------------------------------------------------
Download drivers for Linux from Canon
unzip Linux_UFRII_PrinterDriver_V250_uk_EN.tar.gz
cd Linux_UFRII_PrinterDriver_V250_uk_EN/64-bit_Driver/RPM/
alien --to-deb --scripts cndrvcups-common-2.50-1.x86_64.rpm
alien --to-deb --scripts cndrvcups-ufr2-uk-2.50-1.x86_64.rpm
apt-get install libc6-i386 ia32-libs lib32z1
dpkg -i cndrvcups-common_2.50-2_amd64.deb cndrvcups-ufr2-uk_2.50-2_amd64.deb
cp /usr/lib64/libcanon* /usr/lib
apt-get install libjpeg62 libjpeg62:i386
Note:
It is weird but you could need to modify the file /etc/apparmor.d/local/usr.sbin.cupsd adding this lines:
/usr/lib64/cups/backend/cnusb Uxr,
/usr/lib64/cups/filter/pstoufr2cpca Uxr,
Vicente
view raw gistfile1.txt hosted with ❤ by GitHub
:O

Thursday, August 16, 2012

Checking Varnish Auth via terminal

Trick! is the auth of Varnish working?: https://gist.github.com/vicendominguez/8803517
#!/usr/bin/env perl
#
#
# If you don't have access to:
# * shell
# * varnishadm
# you can try this to pass the challenge in varnish auth-session console
#
# Vicente
use strict;
use warnings;
use Digest::SHA qw (sha256 sha256_hex);
my $challenge = $ARGV[0];
my $key = $ARGV[1];
my $result= sha256_hex($challenge . "\n" . $key . "\n" . $challenge . "\n");
print $result ."\n";
view raw varnish-pass.pl hosted with ❤ by GitHub
The first script parameter should be your password (in clear) ;)

Tuesday, May 29, 2012

IP2Location.com perl lib

Using the ugly perl library to IP2location file from IP2location.com: https://gist.github.com/vicendominguez/8803359
#!/usr/bin/perl -w
# a lot of years ago... recovered
use Geo::IP2Location;
if ($#ARGV != 1 ) {
print "usage: checkip.pl <fichero.bin.ip> <ip>\n";
exit;
}
$fichero=$ARGV[0];
$IP=$ARGV[1];
$obj = Geo::IP2Location->open($fichero);
my ($countryshort, $countrylong, $region, $city, $latitude, $longitude, $zipcode, $timezone, $isp, $domain, $netspeed) = $obj->get_all($IP);
print "\nhash: $obj\n";
print "isp: $isp\n";
print "ciudad: $city\n";
print "pais: $countrylong\n";
print "\n";
view raw checkip.pl hosted with ❤ by GitHub
Too old... i know... :)

Sunday, May 27, 2012

My tmux.conf

This is my old tmux conf from: https://gist.github.com/vicendominguez/8802592
# Ademas de Ctrl+B, agregamos un atajo de teclado tipo screen (Ctrl+A)
# Para tmux < 1.6:
#set-option -g prefix C-a,C-b,Escape
# Para tmux >= 1.6:
set-option -g prefix C-a
#set-option -g prefix2 C-b
set-option -g prefix2 Escape
# Si quisieramos reemplazarlo totalmente:
# set-option -g prefix C-a
# Empezar la numeración de las ventanas creadas en 1 (la primera ventana)
set -g base-index 1
# Reducir el tiempo de espera para secuencias de escape en los comandos
set -s escape-time 0
# Si corremos un tmux dentro de otro, como enviar comandos al más interno (C-A C-A comando)
bind-key a send-prefix
# Pasar a modo buffer con C-A espacio ademas de con [ y RePag
bind-key Space copy-mode
# Partir ventanas intuitivamente con | y -
unbind %
bind | split-window -h
bind - split-window -v
# Establecer barra de estado personalizada
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-left-length 40
set-option -g pane-active-border-fg green
set-option -g pane-active-border-bg black
set-option -g pane-border-fg white
set-option -g pane-border-bg black
set-option -g message-fg black
set-option -g message-bg green
#setw -g mode-bg black
setw -g window-status-bg black
setw -g window-status-current-fg green
setw -g window-status-activity-attr default
setw -g window-status-activity-fg yellow
set -g status-left '#[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[default]'
# set -g status-right '#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g status-right '#[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g history-limit 4096
# `+r reloads the configuration, handy
bind r source-file ~/.tmux.conf
# Iluminar de rojo en la barra de estado la ventana activa ademas del "*"
set-window-option -g window-status-current-bg red
view raw tmux.conf hosted with ❤ by GitHub
:)

Sunday, May 20, 2012

UNSTABLE LIANLI - Lian Li EX-503 - Mac OS 10.6.x

From my gist: https://gist.github.com/vicendominguez/8802441
UNSTABLE LIANLI - Lian Li EX-503 - Mac OS 10.6.x - Snow Leopard (English Version)
-----------------------------------------------------------------------------------
E-SATA
- SiliconImage included with the pack is a must. There are problem with other cheaper cards.
- There is a trick in Mac Pro which use internal sata ports for e-sata. FORBIDDEN!!!
- Warning: this config is very unstable. Later patch or updates can be incompatible.
- Workflow:
- Install Hardware and card. Warning: Harddisk in RAID5 config is not extensible later.
- We create a new folder in Applications folder. (ex: LIANLI-RAID)
- Download from SiliconImage webpage the driver: Sil3132r5_1.7.5.0_Sil_Pkg_mpkg
- Install package and not reboot or you will get a CRASH OF THE DEATH!
- mv /System/Library/Extensions/SiliconImage3132r5.kext /Applications/LIANLI-RAID/
- touch /System/Library/Extensions
- Reboot and breath.
- If you are lucky you will see in About this Mac - More information - Hardware - PCI Cards another storage controller.
- If that is ok, continue:
- cd /Applications/LIANLI-RAID/SiliconImage3132r5.kext/Contents/
- Edit Info.plist and we change/put this lines:
<key>IOPCIClassMatch</key>
<string>0x01800000</string>
<key>IOPCIMatch</key>
<string>0x35311095</string>
Info:
IOPCIClassMatch is for cardtype. In our case, for RAID5 storage cards is 0x01800000
IOPCIMatch is found in About this Mac - More information - Hardware - PCI Cards another storage controller - you will see it in the card's name, in this case: pci1095,3531.
- Now:
- Open automator.
- Paste the next lines:
on run {input, parameters}
do shell script "sudo kextload /Applications/LIANLI-RAID/SiliconImage3132r5.kext" with administrator privileges
return input
end run
- Save it in the desktop.
- When we need the storage, click on the icon.
- If all is ok you will see a new unit on the Mac.
- To configure RAID type, you need the program inside of the CD (it comes with the hw)
troubleshooting
If you get a crash-of-the-death when you click on the automator icon is possible the card does not talk with the OS and may be you need to reboot the system and LIANLI.
test banking with:
Mac Pro early 2008
Snow Leopart 10.6.8
Lian Li EX-50
5xHD SATA
Config with RAID 5
AUTHOR
Vicente
view raw gistfile1.txt hosted with ❤ by GitHub

Problems with keyboard in Synergy solved in Mac OS X

Too Old.... and Synergy, in Mavericks, needs to run only from terminal.
SYNERGY with MAC OS X (x86+PPC)
--------------------------
If someone has this config:
* Server: Mac OS X 10.6.8
* Client: Mac OS X 10.5.8 PPC
and keyboard not works correctly. Successful install for Synergy is:
- Server:
* 1.4.9.r1432 from http://synergy-foss.org/nightly/
- Client:
* SynergyKM 1.0b7 from http://sourceforge.net/projects/synergykm/files/Binaries/1.0%20Beta%207/
That's all....
Vicente
view raw gistfile1.txt hosted with ❤ by GitHub
:|

Tuesday, May 1, 2012

Hello World

GOLIATH:~ $ id sysadmin
id: sysadmin: no such user

False.... I am here.... ;)