Monday, September 8, 2014

unable to see wireshark command ?





unable to see wireshark command , you need to install wireshark-gnome(wireshark-gnome.x86_64)  package !

detect your android mobile in Linux


Unable to detect your android mobile in Linux .


You need to turn on USB mass storage option (present in setting -> usb utitlites) in order to access you mobile contents.

Why this type of option ? Unless Somebody who got physical access to your mobile knows the pattern, they will NOT be able to enable this options , right ?  


Qemu author fabrice bellard


All about fabrice bellard here, really awesome techie



Friday, August 8, 2014

Kies issues - Upgrading samsung android moblie

Had some tough time updating android using kies.
 ( I am having a samsung android mobile).

Tried multiple things as mentioned in forums.

Few ideas which I think that worked for me:

1. connect the mobile after logging in and system is in Desktop. Do not connect from the beginning you switch on the pc.

Everytime you do something, reboot the machine. for example, just after installing kies, DO NOT use it directly.  first reboot  and then start using.

Do this even after installing the drivers, and updating kies to latest version.


Most important :
Right click on kies, and "Run it as administrator." Otherwise kies just crash silently without informing anything.

Happy upgrading :)

Wednesday, July 9, 2014

convert pdf to doc



like to convert a pdf to doc ?

use https://cloudconvert.org/pdf-to-doc from google docs.

go to google docs.
add additional plugin as cloudconvert.
choose the document and convert . thats it.

Sunday, June 1, 2014


measure io performance using iometer :

http://www.linuxintro.org/wiki/Iometer

Fedora 16 x32

  • install wget
  • download IOMeter
cd
wget http://downloads.sourceforge.net/project/iometer/iometer-stable/2006-07-27/iometer-2006_07_27.linux.i386-bin.tgz
  • unpack it
cd
tar xvzf iometer-2006_07_27.linux.i386-bin.tgz
  • start the dynamo backend
cd iometer-2006_07_27.linux.i386-bin/src
./dynamo &
  • install wine
yum install wine
confirm with y when asked
  • download IOMeter from Sourceforge
cd
wget http://downloads.sourceforge.net/project/iometer/iometer-stable/2006-07-27/iometer-2006.07.27.win32.i386-setup.exe
  • install IOMeter:
cd
wine iometer-2006.07.27.win32.i386-setup.exe
  • start IOMeter:
cd
cd ".wine/drive_c/Program Files/Iometer.org/Iometer 2006.07.27"
wine Iometer.exe

Use Iometer

  • delete all workers but one by clicking onto "Disconnect Selected Worker or Manager"
  • select "Access Specifications" -> 512B; 100% Read; 0% random -> Add
  • select "Disk Targets" -> Maximum Disk Size -> 5000 Sectors
  • select a target. In this example, let's just choose sdh.
  • select Test Setup -> Run Time -> 2 Seconds
  • click on "Start Tests"
  • as file name, enter example -> Ok
  • find your data at ~/.wine/drive_c/Program Files/Iometer.org/Iometer 2006.07.27/example.csv
  • or click on "Results Display":
"Results Display" under IOMeter.

Tuesday, May 13, 2014

qemu build fix


unable to build qemu due to this error :??



./configure ;
Disabling libtool due to broken toolchain support

ERROR: DTC (libfdt) not present. Your options:
         (1) Preferred: Install the DTC (libfdt) devel package
         (2) Fetch the DTC submodule, using:
             git submodule update --init dtc




So, just do this before configure
git submodule update --init dtc 

Monday, April 28, 2014

ltp individual test case running


To run ltp individual test case, use this:

[root@localhost ltp]# pwd
/opt/ltp
[root@localhost ltp]# ./runltp -s memcg_regression 
[root@localhost ltp]# 

This will get results and logs saved.


Here I have selected one entry from runtest/controllers., select accordingly from 
runtest/testcases/

Sunday, April 13, 2014

bonnie++ Can't open file


While running bonnie++ , you may face this error :


# ./bonnie++ -d /mnt -s 8056M -n 0 -m TEST_IO -f -b -u username
Using uid:1000, gid:1000.
Can't open file ./Bonnie.3497.000

You need to add -u root:root , to the command line like :

./bonnie++ -d /mnt -s 8056M -n 0 -m TEST_IO -f -b -u root:root



Caveat:
Please note running as root is not recommended. So, ensure you try this only on a test system.

As per man page:

       -u     user-id to use.  When running as root specify the UID to use for
              the  tests.   It is not recommended to use root (since the occa‐
              sion when a Bonnie++ bug wiped out someone's system), so if  you
              really  want  to run as root then use -u root.  Also if you want
              to specify the group to run as then use the  user:group  format.
              If  you  specify  a  user  by name but no group then the primary
              group of that user will be chosen.  If you  specify  a  user  by
              number and no group then the group will be nogroup.



Friday, March 28, 2014

loop back in same machine - physically send packet out




http://serverfault.com/questions/127636/force-local-ip-traffic-to-an-external-interface

eth2 10.50.0.1 eth3 10.50.1.1

ping 10.60.0.1
This goes via eth3.
route for 10.60.0.1 added in eth3
10.60.0.1 arp set in eth3
source            dst
============ =============
= 10.50.1.1 =                      = 10.60.0.1  =
============               =============
changed into
source*           dst
============       =============
= 10.60.1.1 =                   =  10.60.0.1  =
============              =============
received by eth2. 10.60.1.1 arp resolved by eth2.
 10.60.1.1 route in eth2.
source               dst
============ =============
= 10.60.1.1 =                     = 10.60.0.1  =
============               =============
changed into
source           dst*
============        =============
= 10.60.1.1 =                    = 10.50.0.1  =
============               =============

10.50.0.1 => eth2 address. so reply  back.


ifconfig p3p1 10.50.0.1/24
ifconfig p3p2 10.50.1.1/24

iptables -t nat -A POSTROUTING -s 10.50.0.1 -d 10.60.1.1 -j SNAT --to-source 10.60.0.1

iptables -t nat -A PREROUTING -d 10.60.0.1 -j DNAT --to-destination 10.50.0.1

iptables -t nat -A POSTROUTING -s 10.50.1.1 -d 10.60.0.1 -j SNAT --to-source 10.60.1.1

iptables -t nat -A PREROUTING -d 10.60.1.1 -j DNAT --to-destination 10.50.1.1

ip route add 10.60.1.1 dev p3p1
arp -i p3p1 -s 10.60.1.1 A0:36:5F:05:E8:2E  //p3p2's mac address

ip route add 10.60.0.1 dev p3p2
arp -i p3p2 -s 10.60.0.1 A0:36:4F:05:E8:2C //p3p1 mac address.


Thursday, March 27, 2014

Fedora + arm guestfish: no operating system was found on this disk error - Solved



I thought of trying ARM based Fedora using emulation platform:

tried this command :
virt-copy-out -a Fedora-XFCE-armhfp-20-Alpha-4-sda.raw  /boot .

got this erorr:
guestfish: no operating system was found on this disk


Thanks libguestfs author , libguestfs which I used is very OLD.
So I tried using another command which he informed about.
guestfish --ro -a Fedora-XFCE-armhfp-20-Alpha-4-sda.raw -m /dev/sda1 tar-out / boot_simple.tar

This worked out. Thanks to rwmjones !

Wednesday, March 26, 2014

NAT




Nice intro on NAT:




Source IP addresses are changed to the exterior IP address of the Nat Host

Source Port numbers are changed to a unique value

transalted session must be saved in a state table.

Return traffic is matched in the state table and destination IP and port numbers are modified accordingly.


- impossible to map the real topology of the network.

- interior hosts are NOT reachable from the internet.


IP masquerading IS NOT a TRUE NAT implementation.(Linux 2.2.x kernels)

Linux 2.4.x kernels uses IPTables which provides NAT. It is TRUE NAT.


http://bio3d.colorado.edu/tor/sadocs/tcpip/nat.html#true%20nat

libguestfs virt-copy-out

how to install libguestfs?

use this :
yum install '*guestf*' -y

Now , you will have binaries like virt-copy-out

Thursday, March 13, 2014

network naming eth0 as em1 , p1p1


I have observed some different naming for ethernet interfaces in the Server.

You can find  the reason here
====================================================================
Systems, particularly servers, with multiple network ports, name the ports ethX in a non-deterministic order, and are therefore not useful for system administrators.
System Administrators can then use BIOS-provided names, which are consistent and not arbitrarily named, for their network ports. This eliminates the confusion that non-deterministic naming brings, and eliminates the use of hard-coded MAC address based port renaming which a) is racy and error-prone, and b) introduces state into an otherwise stateless system.
This change affects most desktop, notebook, and server-class systems.
The em means that the interface is embedded onto the motherboard. Other names apply for add-on cards:p#p# names refer to PCI (and its modern derivatives) expansion cards, where the first number is the slot on the motherboard which they're plugged into, the second number is the port on the card (a card may contain multiple ports) and the third number, if present, is a virtual function number.
====================================================================

Thursday, March 6, 2014

kernel debugging via UML



I was going through UML linux kernel debugging here:
http://www.youtube.com/watch?v=li5EiItG-GU
Very Good effort.

some tips  based on my expereince:

you need to enable following , if you are going to use Fedora20 based rootfs.(available here fs.devloop.org.uk )

CONFIG_BLK_DEV_INITRD=y

CONFIG_CGROUPS=y

CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXT4_DEBUG=y

./linux ubda=$PWD/Fedora20-x86-root_fs  mem=512m  init=/bin/bas


Wednesday, March 5, 2014

IOGEAR switch not switching

IOGEAR switch not working....

just switch mouse and keyboard connected to the IOGEAR switch , it will start working and start switching between CPUs.

Reason here :
http://iogear.custhelp.com/app/answers/detail/a_id/2210/~/gcs632u%3A-unable-to-switch-kvm-ports%3F


Friday, February 28, 2014

KVM VM with root user - avoid connection reset error



While creating a VM with root user logged in :

 /etc/libvirt/qemu.conf  must have following values  set  : 
user = "root"
group = "root"
clear_emulator_capabilities = 0

Otherwise , you will get connection reset error while launching the guest.

Thursday, January 23, 2014

watch command -n with fraction of seconds

I never know that watch command can run with fraction of seconds.

This is fun :)

watch -n .1 cat /proc/interrupts


Sunday, January 19, 2014

git user.name has multiple values


warning: user.name has multiple values
error: cannot overwrite multiple values with a single value
       Use a regexp, --add or --set-all to change user.name.
[user@fc ~]$

[user@fc ~]$ cat ~/.gitconfig
remove the name here.

Add the new name in /etc/bashrc
[user@fc ~]$ vi /etc/bashrc
git config --global user.name "Firstname lastname"

[user@fc ~]$

Refer:

https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup


To set email, use
$ git config --global user.email  "youname@yours.com"

To verify the results, use 
$ git config -l