Tuesday, 23 July 2013

find the version of ODROID

Following command does the work

$ cat /proc/cpuinfo | grep -i odroid | awk {'print $3'}


Installing new gcc and changing symbolic link

Ubuntu



$sudo add-apt-repository ppa:ubuntu-toolchain-r/test $sudo apt-get update
$sudo apt-get install gcc-4.7-base $sudo apt-get install gcc-4.8

after installation remove the previous sym link and point to new gcc-4.8

$ which gcc
$ ls -ld /usr/bin/gcc
$ sudo rm /usr/bin/gcc
$ sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
$ ls -ld /usr/bin/gcc

Compiling from source?

sudo apt-get install gcc-multilib
error: no acceptable m4 could be found in $PATH.
$sudo apt-get install m4

see this one


Monday, 15 July 2013

Plotting uneven data on x-axis in gnuplot

In order to plot uneven data on x-axis in gnu plot, we have to do a little bit of modification

For example; Consider the data

#Procs SomeValue
1              1
2              2
4              4
8              8
16            16
32            32
64            64

we want to play #Procs on x-axis which if we use simle plot and 'using 1:2' it will be uneven.

what you need to do is;

plot the graph as '2:xticlabels(1)' , rest is as-it-is

- remove xrange
- keep yrange

Monday, 8 July 2013

Compiling and upgrading kernel for Odroid-x2



wget http://builder.mdrjr.net/tools/kernel-update.sh
chmod +x kernel-update.sh
sudo ./kernel-update.sh
Thanks to mjdr on http://forum.odroid.com/viewtopic.php?f=8&t=1516


To udpate to 3.0.75 on odroid x2 (only)

http://forum.odroid.com/viewtopic.php?f=15&t=1136



see the original post about kernel compilation and stuff.
http://forum.odroid.com/viewtopic.php?f=52&t=81



Friday, 5 July 2013

Installing and configuring Ganglia

[Done on CentOS 6.3]
================


Download ganglia latest release from here

Untar
$ tar xvf <your ganglia tar file>


packages you need to install if it asks for any (in my case these are the ones):

pakage 'apr-1' not found
$ ... install apr-devel


package 'libconfuse' not found
download libconfuse package here
manually install by using

$./configure --enable-shared
$make
$make install




package 'libexpat' not found
$..install expat expat-devel

package 'libpcre' not found
$..install pcre-devel

zlib library not configured properly
$..install zlib-devel
nfigure --sysconfdir=/opt/ganglia/ --sbindir=/usr/sbin/ --with-gmetad --enable-static-build CC=/tmp/gcc-4.8.1/rtf/bin/gcc
./configure --sysconfdir=/opt/ganglia/ --sbindir=/usr/sbin/ --with-gmetad --enable-static-build CC=/tmp/gcc-4.8.1/rtf/bin/gcc

hydra_pmi_proxy: error while loading shared libraries: libcr.so.0: cannot open shared object file: No such file or directory


if you encounter this error while running mpich
then install this:
$ sudo apt-get install libcr-dev

if you still facing this problem then you might not have configured your LD_LIBRARY_PATH and PATH correctly, then go to ~/.bashrc

you will see this line at the start of your bash:
[ -z "$PS1" ] && return

put you LD_LIBRRAY_PATH and PATH variable exports before this line.

Clear disk cache in linux

When you execute 'htop' command in linux, sometimes you might have noticed a big yellow chunk in memory bar. That is the disk cache used by the sytem as a memory - usually for running services.

If this 'yellow' chunk gets bigger then the things really start to get worse. Here is a simple command to clear the cache.


sync; echo 3 > /proc/sys/vm/drop_caches 


If above does not work (in case of permissions denied), try to use the below line :


sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"