Tuesday 29 April 2014

Installation of custom ROM on Huawei u8650

Steps are:
1. Download some custom ROM. This is zip file.
2. Copy that zip file to sd card.
3.Shutdown phone.
4. press VOLUME UP+POWER button. Hold buttons until you enter to CWM Recovery.
5. Use VOLUME UP and DOWN for navigation. POWER button is for confirmation. From options choose

-install zip from sdcard

Then choose

-apply /sdcard/update.zip

6.This will start installation of custom ROM. When installation completes, reboot phone.
New ROM will start.

This is it. To change to another ROM use same procedure.

Installation of CWM Recovery on Huawei U8650

Why do we need this?
In case that we want to install some custom ROM version you need to have CWM Recovery installed.

Ok, so steps are: 
1.First how have to install driver for phone for OS to see it.
There are WinXp drivers and WIN7 drivers. For some reason I could not install CWM Recovery on win7 because it did not see android device. Maybe it will work for you.
2.Download CWM Recovery for U8650.
3.Unzip it. Go in unzip folder.
For me this is C:\Desktop\Recovery_Sonic_u8650_v6.0.1.0\Sonic_u8650
4. On your phone disable fast boot option.  

settings/application/fast boot/fast boot off

5. shutdown phone
6. press VOLUME DOWN + POWER button for 10s. Start up picture should appear after few seconds but hold buttons for 10seconds.

7. Connect phone to computer. Do nothing with phone
8. Install CWM Recovery by executing install-recovery-windows.bat. 
 CMD prompt will appear. In case that you can see message <waiting for device> your computer did not recognize you Android device. This means that your device is not recognised by your computer. This happened to me on Win7. On WinXP I did not have this issue.
9.Phone will reboot. CWM Recovery is installed.

Tip: Because there is no difference between Android phone and Android tablet in terms of Android OS (Android OS is same, hardware is different) you can (probably) install CWM Recovery on your tablet with following steps from 1 to 9.


To start CWM Recovery, shutdown phone, press VOLUME UP+POWER button.




catalina.out too big, compresed file size

Just in case that you have to gzip catalina.out log and you are short on space.
Because catalina.out is plain text, gzip compression will be huge. Here are some numbers just to see about what I am talking about. 

#ls -lh |grep catalina
-rw-r--r-- 1 root root    23G Apr 29 09:30 catalina.out
-rw-r--r-- 1 root root   114M Apr 29 09:30 catalina.out.gz


As you can see it compressed 23GB of plain text in to 114MB gzip file.

Monday 28 April 2014

hpacucli automatic alerting of failed component on Linux

In case that you have HP server, best way for automatic alerting for fail hard drive is tool called hpacucli.

Command that you should issue to see if there are any failed components is

#hpacucli ctrl all show config|egrep -i Failed 

In case that everything is OK, exit of this command will be 0.
In case that you  have failed component(for instance cache battery) your exit will be like this

# hpacucli ctrl all show config detail|egrep -i Failed
   Battery/Capacitor Status: Failed (Replace Batteries)



You can create script that will issue this command every now and then.
My script look like this

#!/bin/bash
/usr/sbin/hpacucli ctrl all show config|egrep -i Failed |wc -l >/tmp/state_disks.txt


This will put in file /tmp/state_disks.txt number of failed components. Everything is OK when this number is 0. With your alerting system(nagious,zabbix,etc.) you can read content of this file and set up alert messages for it or you can setup mail to be sent to admin from system directly.


hpacucli on Linux EXPLAINED!


hpacucli stand for HP Aray Configuration Utility CLI and it is HP propriety software.
What you can do with hpacucli? Well, you can do everything that you can do with your RAID controller: add disk, delete disks, check RAID, status of cache battery on RAID controller,etc....
Why this is good thing? Because you can do this online while server is running

Installation steps:
1.Download it from HP. Download version for your server and OS.

2.#:ls |grep hpacucl
hpacucli-8.50-6.0.noarch.rpm
3.rpm -ivh hpacucli-8.50-6.0.noarch.rpm


4. use it
#:hpacucli
HP Array Configuration Utility CLI 8.30-5.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=>




You can use hpacucli through his console or you can run it as regular Linux command. Result will be same.

Here are few examples of hpacucli and his power!
1 Show status of RAID controllers
#hpacucli ctrl all show status

Smart Array P400 in Slot 0 (Embedded)
   Controller Status: OK
   Cache Status: OK
   Battery/Capacitor Status: OK

2. Show configuration of all RAID controllers: 
#:hpacucli ctrl all show config

Smart Array P400 in Slot 0 (Embedded)

   array A (SAS, Unused Space: 0 MB)


      logicaldrive 1 (68.3 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)

   array B (SAS, Unused Space: 0 MB)


      logicaldrive 2 (68.3 GB, RAID 1, OK)

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 72 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 72 GB, OK)
  
2. Show specific controller configuration
#:hpacucli ctrl slot=0 show config

Smart Array P400 in Slot 0 (Embedded)

   array A (SAS, Unused Space: 0 MB)


      logicaldrive 1 (68.3 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)

   array B (SAS, Unused Space: 0 MB)


      logicaldrive 2 (68.3 GB, RAID 1, OK)

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 72 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 72 GB, OK)












In case that any of components fails status of RAID controller will change

#hpacucli ctrl all show status

Smart Array P400 in Slot 0
   Controller Status: OK
   Cache Status: Temporarily Disabled
   Battery/Capacitor Status: Failed (Replace Batteries/Capacitors)








Without hpacucli this failed battery failure is show when you reboot server and looking at screen or(probably) when you connect on iLo and check health status of server.








Wednesday 23 April 2014

Viber microphone issue on Huawei Y300 SOLVED!

I case that you have bought Huwaei Y300 you probably want to use Viber for free calls and free texting.

In case that you install version that is offered on Google Play market yo might have few issue. I do not know what version is most recent and if this issue still exist but in case that you have issue with Viber calls this is how you will solve them.

There are two issues that is know of:
1. for Viber calls microphone on Y300 do not work. You can normally hear your caller but he/she cannot hear you. Text messages goes normally.
2. Normal calls terminates after 15-20 seconds

In case that you have these problems, do following thing:
1. Deinstall Viber
Settings/Aplication/Viber/Deinstall
2. Download this specific version of Viber. Search for this file on Google Viber_2.2.2.22.apk
Transfer this file to SD card or phone memory.
3.Install application installer on your phone. You can use Google Play for this. There are may different application for this. I used this one App Installer Apk.
4. Run App Installer Apk application. This application will scan you phone and SD card memory for .apk files. Find files will be presented to you. Select Vibber apk. Install it.
5. Run Viber.

After I installed this version, normal call issue never repeat, Viber calls worked normal-microphone now worked normal.

In case that Google play as you to update Viber it is wise to listen number 6. step.

6. Do not update Viber when asked!

Why? In case that issue with microphone returns after Viber update, you will have to repeat steps from 1. to 6.


Skype on Huawei U8650 working slow issue SOLVED!

In case that you want to use Skype on this phone there are one most important tip!

TIP:

DO NOT MOVE SKYPE ON SD CARD

In case that your application is installed on SD card you will find nothing than trouble with it! It will take forever to open Skype and you will have slow response time for typing and speaking!
Big issue with Skype is that he caches your conversation on device that you are using. Do not be surprised if you see that you have 40MB or more of cached data. In case that you empty your cache, first time you log on Skype he will download your conversation and you will again have cache data issue. I don't know if big cache is reason for slow response time when application is on SD card but if you want to use Skype normally keep it on your phone!
When Skype on phone, I can speak normally and make conversation normally!


GZIP vs BZIP2 - which one to use?

In case that you are wondering which one to use here are why thing you should consider!

First of all both of them are two most popular compressing tool in Linux.
Basic use of gzip command is

#gzip folder

Exit is folder.gz


Basic use of bzip2 is

#bzip2 folder

Exit is folder.bz

I archived var folder for this test.
root@ubuntus1:/var# du . -h -s *
381M    .
root@ubuntus1:/var# pwd
/var
root@ubuntus1:/var# du . -h -s *
381M    .
root@ubuntus1:/var# cd ..
root@ubuntus1:/# tar cvf var.tar var/

root@ubuntus1:/# ls -lh |grep var
drwxr-xr-x 13 root root 4.0K Sep  3  2013 var
-rw-r--r--  1 root root 374M Apr 23 07:21 var.tar



Which one to use?

Well it all depence! Here are few thing you should think off and few print screen.

1.CPU consamption
 Bzip is more CPU intensive.



 

2. File system size
Bzip save more file system space

root@ubuntus1:/# ls -lh |grep var
drwxr-xr-x 13 root root 4.0K Sep  3  2013 var
-rw-r--r--  1 root root 111M Apr 23 07:21 var.tar.bz2
-rw-r--r--  1 root root 122M Apr 23 07:22 var.tar.gz


3. Time of executing
Bzip takes longer to compress.

root@ubuntus1:/# time bzip2 var.tar

real    5m47.469s
user    4m40.246s
sys     0m4.588s

root@ubuntus1:/# time gzip var.tar

real    1m10.619s
user    0m41.587s
sys     0m3.912s




I always use gzip just because it is much faster! :)




Tuesday 22 April 2014

Huawei U8650 (a.k.a Sonic) fuzzy and blurry images WHY and SOLVED!

I still have my Huawei U8650 and from time to time I want to take pictures with it!
All my pictures are fuzzy and blurry!

Today I wanted to finally see if my camera is damaged or is it something else problem!
So this is normal picture





And this one is after I find what problem is!


So problem was mask on back! That opening for camera was so covered with dust so after I cleared it everything was OK with pics again!

Mount bind why and how SOLVED and EXPLAINED!

Recently I came across this and applied it.

In case that you don't like symbolic link of files or folders you can use this.


How to do this?
Simple as cake :)

#mount --bind /location_which_you_want_to_mount /location_to_which_you want_to_mount

and that's it!

Personally I use more ln -s then mount --bind.

Many people avoid mount --bind. Here is one of reasons:

With mount --bind, a directory tree exists in two (or more) places in the directory hierarchy. This can cause a number of problems. Backups and other file copies will pick all copies. It becomes difficult to specify that you want to copy a filesystem: you'll end up copying the bind-mounted files twice. 

So I think this is matter of choice.


Thursday 10 April 2014

HP DL 380 G5 overheating when turn off SOLVED and EXPLAINED!!!

One of are customers recently called as to report possible issue with HP DL 380 G5 server.

He is not using server at a moment so he turned him off. He notice that even server is turned off, he is still very warm and produce a lot of heat and from time time it becomes very loud! He suspect at power supply units to be malfunctioning!

It turns out that this is not issue at all. When HP design DL 380 G5 server series, he design them that even server is powered off, if power cables are plugged in power supply units are working. This has causing that server if hot even do it is turned off. When power supply unit reaches critical temperature, power supply fans start to work to reduce heat inside power supply unit. This was causing server to becomes loud from time to time!

Solution for this "issue" is if your server is turned off, unplugged power cables from him! This will save you some precious energy, air conditioning and it will make you server room more quite!

Wednesday 2 April 2014

Phantom reboot on kernel prior to 2.4.2 Linux EXPLAINED!

    In case that you have  up and running Linux server with 32 bit kernel prior 2.4.2 and in case that your uptime is 497 days and in case that you have monitoring software that alerts you for status of system(up,down,restart) that strange thing is about to happen. Your uptime information is about to reset it self and instead of 497 point something uptime you will have 0 days 0 minutes uptime. Depending on your monitoring system(we are using zabbix), you will probably get message that your server has been restarted!

Explanation is simple!

NOTE: The Linux kernel (at least up to 2.4.2) has a flaw: It computes the result of the "uptime" based on the internal "jiffies" counter, which counts the time since boot, in units of 10 milliseconds.
This is typecast as an "unsigned long" - on the Intel boxes, that's an unsigned 32-bit number.
Well, it turns out that in a 32-bit number, you can store 497.1 days before the number wraps.



Going around NTP service and still get corrent time EXPLAINED!

We have one server running on RH 5.9 that have issues with ntp service.
Issue is, well, it is not working. We reinstall ntp package, restart service numerous times, change ntp servers but nothing worked. After sometime it just stops to work. It is pretty embarrassing when user is calling you and say "Can you please fix time because it is 4 hours late?!?!"
So how to fix this strange issue?

Ntpdate command is doing her thing so we simple put it in crontab!

Depending of how often you would like to have synchronisation with your ntp server, your crontab will be different from my crontab. I think that synchronisation interval should not be smaller that one hour.
Crontab looks like this

00 * * * * ntpdate ntp_server > /dev/null 2>&1

This done the tricks for me! I hope this helps you!