Jul 9, 2013

Muse: Roma 06/07/2013

Around Linux there is also MUSIC... The Muse one!
I'm still exited about the concert!!!

The show was the greatest one I've never seen!!
Awesome lights effect, huge high resolution screens, fire spitters, amazing and powerfull audio!!

The idea of  having a long platform goin into the public was awesome, it allowed a higher number of fans to be close to the band and enjoy the terrific performance!!



The stage was a show by itself... great videos and effects from live scenes all the time!


Between me and the fire launcher were at least 50 meters, everytime the spitted fired I felt like being inside an oven!!

Was nice to hear Rage against the Machine : Freedom cover at the end of Stockholm Syndrome.


CAN'T WAIT TO BUY THE TOUR DVD THAT WAS FILMED AT ROME!!!!!!!!!!!!!!!

The track list:



  • Supremacy
  • Panic Station
  • Plug In Baby
  • Map of the Problematique
  • Resistance
  • Animals
  • Knights of Cydonia
  • Dracula Mountain/Explorers
  • Hysteria
  • Monty Jam/Feeling Good
  • Follow Me
  • Madness
  • Time Is Running Out
  • Stockholm Syndrome
  • Unintended
  • Guiding Light
  • Blackout
  • Undisclosed Desires
  • Unsustainable
  • Supermassive Black Hole
  • Survival
  • Isolated System
  • Uprising
  • Starlight


Jul 4, 2013

HOWTO: Attach new lun without reboot on linux

I have a CentOS box with an almost full filesystem so a new lun has been presented from an EMC SAN.

Find your hosts hba identifiers, you will need it:

#ls /sys/class/fc_host
host13  host14

Do this echo to force the scan:
echo "- - -" > /sys/class/scsi_host/host13/scan
echo "- - -" > /sys/class/scsi_host/host14/scan

Or faster:

ls -1 /sys/class/fc_host|while read line; do echo "- - -" > /sys/class/scsi_host/${line}/scan; done


After that you should be able to see your new disk and powerpath device:

fdisk -l|grep emcpower

Disk /dev/emcpowera: 214.7 GB, 214748364800 byte
Disk /dev/emcpowerf: 644.2 GB, 644245094400 byte
Disk /dev/emcpowerh: 209 MB, 209715200 byte
Disk /dev/emcpowerg: 32.2 GB, 32212254720 byte

# ls -l /dev/emcpower*
crw-r--r-- 1 root root  10,  62 31 mag 04:32 /dev/emcpower
brw-r----- 1 root disk 120,   0  4 lug 23:03 /dev/emcpowera
brw-r----- 1 root disk 120,  80  4 lug 23:03 /dev/emcpowerf
brw-r----- 1 root disk 120,  96 31 mag 04:30 /dev/emcpowerg
brw-r----- 1 root disk 120, 112  4 lug 23:22 /dev/emcpowerh


Check it with:

# powermt display dev=emcpowera
Pseudo name=emcpowera
VPLEX ID=CKM00131200661  
Logical device ID=6000144000000010207C908698B31DCB
state=alive; policy=ADaptive; queued-IOs=0
==============================================================================
--------------- Host ---------------   - Stor -  -- I/O Path --   -- Stats ---
###  HW Path               I/O Paths    Interf.  Mode     State   Q-IOs Errors
==============================================================================
  14 qla2xxx                sdaa        04       active   alive      0      0
  14 qla2xxx                sdz         00       active   alive      0      0
  13 qla2xxx                sdy         05       active   alive      0      0
  13 qla2xxx                sdx         01       active   alive      0      0

Jul 3, 2013

Perl: parse complex CSV fast!!!

I've been searching for the fastes way to parse huge csv file (between 2GB and 6 GB)
I don't have a simple csv file like:

first,second,third,

I need to parse a complex csv file like:

first,"second","my row , my column",text,number,"foo, foo",12312312312

where the fields are

  • first
  • "second"
  • "my row , my column"
  • text,number
  • "foo, foo"
  • 12312312312


So using the fast function built-in perl split using the , char as delimiter is not making the job easier.

I've tryed different CSV parsers modules from cpan, test were made in the same csv file (5,6GB of text) some benchmarks:

CSV_PP link
$ time test.pl quarter
real 6m5.302s
user 5m38.423s
sys 0m22.843s

Acme_CSV link
$ time test.pl quarter
real 15m32.683s
user 15m12.215s
sys 0m17.239s

CSV_XS link
$ time test.pl quarter
real 6m5.302s
user 5m38.423s
sys 0m22.843s

Conclusion: CSV_XS have the best performances for the test I made.
Hope that helps!

Jul 1, 2013

Bye bye Google Reader

I was a daily user of the great Google Reader.
... I'll always remember how awesome it was!

Now I falling in love slowly with Feedly!  http://cloud.feedly.com
If you used google reader I think you may like it! Give this guys a try... they are doing an excellent job!

Undesired ssh connectios? check it with lastb

I discovered few weeks ago an easy way to see if there was any unsuccesfull ssh authentications on my linux box.

PLEASE NOTE: Before finding this issue I used to forward my public TCP port 22 to my linuxbox TCP port 22 (after this I changed the public port!! )  ^_^

Now.... how to check if someone is trying to login to your linuxbox without authorization?

You can use lastb

[root@linuxbox ~]# lastb
root     ssh:notty    192.168.0.4   Mon Jul  1 16:48 - 16:48  (00:00)    

You can see that someone from ip 192.168.0.4 tryed to authenticate as root July the 1st at 16:48.

Easier than look in your messages or auth.log files.

How to backup and load cisco configurations

Before changing anything on a cisco switch I do always a backup using tftp.

to check if you cisco is configured to transfer files to an tftp server:

cisco-switch#sh run | include tftp
ip tftp source-interface Vlan211

I have a RHEL server connected to Vlan211, so lets asume the IP address on that Vlan is 192.168.0.2:

cisco-switch#copy running-config tftp
Address or name of remote host []? 192.168.0.2
Destination filename [cisco-switch-confg]? 
!!
45262 bytes copied in 3.666 secs (12346 bytes/sec)

After that command on my Linux box I have the configuration saved:

[root@linux-box ~]$ ls /tftpboot/cisco-switch-confg 
/tftpboot/cisco-switch-confg


You can modify offline you configuration file and then load it to the cisco switch.
Be sure! Checking the sanity of you new confs is a must!!! 
After that just run the following:

cisco-switch#copy tftp startup-config
Address or name of remote host []? 192.168.0.2
Source filename []? cisco-switch-confg-new
Destination filename [startup-config]? 
Accessing tftp://192.168.0.2/cisco-switch-confg-new..
Loading cisco-switch-confg-new from 192.168.0.2 (via Vlan211): !
[OK - 45595 bytes]
[OK]
45595 bytes copied in 0.646 secs (70580 bytes/sec)

 You just now need to reload!
Of course the source-interface for the tftp can be a simple interface not a Vlan.

uptime

This is the firts post, hope to celebrate soon the 100th!
Keep tuned.