lost and found ( for me ? )

Linux Mint 12 : install captcp

You can analyze TCP pcap file with captcp , for example , show connection stats , output the graph etc. nice tool !
http://research.protocollabs.com/captcp/

# lsb_release –a
No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 12 Lisa
Release:        12
Codename:       lisa

# uname -ri
3.2.0-32-generic x86_64


[ install captcp ]
# git clone git://github.com/hgn/captcp.git
# cd captcp/
# make
# make install

# ls -l /usr/bin/captcp
lrwxrwxrwx 1 root root 27 Oct 27 16:22 /usr/bin/captcp -> /usr/share/captcp/captcp.py


Install required python modules
# apt-get install -y python-pypcap python-dpkt python-geoip python-cairo python-numpy


[ sample usage ]

At first , preare a pcap file.
tshark -i br0 port 80 -w zzz.pcap

# /usr/bin/captcp statistic zzz.pcap
General:
       Packets processed:   806 ( 100.00%)
       Network Layer
          ARP:              0 (   0.00%)
          IPv4:           806 ( 100.00%)
          IPv6:             0 (   0.00%)
          Unknown:          0 (   0.00%)
       Transport Layer
          TCP:            806 ( 100.00%)
          UDP:              0 (   0.00%)
          ICMP:             0 (   0.00%)
          ICMPv6:           0 (   0.00%)
          Unknown:          0 (   0.00%)

Connections:

1  192.168.10.15:47385<->74.125.235.83:80

       Packets processed: 10 (1.2%)

       Flow 1.1:  192.168.10.15:47385 -> 74.125.235.83:80
       Flow 1.2:  74.125.235.83:80 -> 192.168.10.15:47385
       Packets:                          6 packets   Packets:                          4 packets
       Data link layer:               1748 bytes     Data link layer:                781 bytes
       Data network layer:            1664 bytes     Data network layer:             725 bytes
       Data transport layer:          1544 bytes     Data transport layer:           645 bytes
       Data application layer:        1344 bytes     Data application layer:         509 bytes
       Retransmissions:                  0 bytes     Retransmissions:                  0 bytes
       Retransmissions:                  0 packets   Retransmissions:                  0 packets
       Retransmissions per byte:      0.00 percent   Retransmissions per byte:      0.00 percent
       Retransmissions per packet:    0.00 percent   Retransmissions per packet:    0.00 percent
       ACK flag set but no payload:      4 packets   ACK flag set but no payload:      3 packets


2  192.168.10.15:47386<->74.125.235.83:80

       Packets processed: 15 (1.9%)

       Flow 2.1:  192.168.10.15:47386 -> 74.125.235.83:80
       Flow 2.2:  74.125.235.83:80 -> 192.168.10.15:47386
       Packets:                          9 packets   Packets:                          6 packets
       Data link layer:               3411 bytes     Data link layer:               1546 bytes
       Data network layer:            3285 bytes     Data network layer:            1462 bytes
       Data transport layer:          3105 bytes     Data transport layer:          1342 bytes
       Data application layer:        2833 bytes     Data application layer:        1142 bytes
       Retransmissions:                  0 bytes     Retransmissions:                  0 bytes
       Retransmissions:                  0 packets   Retransmissions:                  0 packets
       Retransmissions per byte:      0.00 percent   Retransmissions per byte:      0.00 percent
       Retransmissions per packet:    0.00 percent   Retransmissions per packet:    0.00 percent
       ACK flag set but no payload:      3 packets   ACK flag set but no payload:      4 packets

# /usr/bin/captcp throughput --stdio zzz.pcap
 1.0         0.0
 2.0         0.0
 3.0         0.0
 4.0         0.0
 5.0      3403.0
 6.0         0.0
 7.0      2425.0
 8.0     34907.0
 9.0    427526.0
10.0    128772.0
11.0         0.0
12.0     24511.0
13.0     79982.0
# total data (goodput): 703948 byte (5.63 Mbit)
# throughput (goodput): 50576.25 byte/s (404.61 kbit/s)


Output throughput graph

Make a directory to store the graph
# mkdir throuput-graph

# captcp throughput --init --output-dir throuput-graph zzz.pcap


Make png and PDF
# cd throuput-graph/

# ls
Makefile  throughput.data  throughput.gpi

# make png
compillation of throughput.gpi
make: gnuplot: Command not found
make: *** [throughput.eps] Error 127


Error ..
Install gnuplog
# apt-get install gnuplot -y


Try again … error
# make png
compillation of throughput.gpi
conversion in pdf format
make: epstopdf: Command not found
make: *** [throughput.pdf] Error 127
rm throughput.eps

# apt-get install -y texlive-font-utils

# make png
compillation of throughput.gpi
conversion in pdf format
end
conversion in png format
end
rm throughput.eps

Okay.
# ls throughput.p*
throughput.pdf  throughput.png



Output sequence graph
# captcp sequencegraph zzz.pcap  --local=192.168.10.15

# ls *.pdf
seq-graph.pdf



Output specific connection
# captcp sequencegraph --connection-id=3 --local=192.168.10.15 zzz.pcap --filename=con-3.pdf --rtt=0.5



You can check connection ID like this:
# captcp statistic zzz.pcap | grep "<->"
1  192.168.10.15:47385<->74.125.235.83:80
2  192.168.10.15:47386<->74.125.235.83:80
3  192.168.10.15:45850<->176.32.120.15:80
4  192.168.10.15:45851<->176.32.120.15:80
5  192.168.10.15:50662<->210.149.135.93:80
6  192.168.10.15:50663<->210.149.135.93:80
7  192.168.10.15:50664<->210.149.135.93:80


[ how to see help messages ]

Check module name with “captcp –help”
# /usr/bin/captcp --help
Usage: captcp [-h] modulename [modulename-options] <pcap-file>
Available modules:
   stacktrace
   show
   spacing
   statistic
   payloadtimeport
   timesequence
   geoip
   inflight
   sound
   connection
   throughput
   template
   sequencegraph


Check arguments of statstic module.
# /usr/bin/captcp statistic –help
Usage: captcp [options]

Options:
 -h, --help            show this help message and exit
 -v LOGLEVEL, --verbose=LOGLEVEL
                       set the loglevel (info, debug, warning, error)
 -i FILTER, --filter=FILTER
                       limit number of displayed connections "sip:sport-
                       dip:dport", default "*:*-*:*"
 -m FORMAT, --format=FORMAT
                       skip summary and display only selected values

Ubuntu 12.10 KVM : change Memory size of VMs on the f

KVM host
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:        12.10
Codename:       quantal

# uname -ri
3.5.0-17-generic x86_64

# kvm --version
QEMU emulator version 1.2.0 (qemu-kvm-1.2.0+noroms-0ubuntu2, Debian), Copyright (c) 2003-2008 Fabrice Bellard

# libvirtd --version
libvirtd (libvirt) 0.9.13


VM
root@ubuntu12-04-vm1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
Codename:       precise

root@ubuntu12-04-vm1:~# uname -ri
3.5.0-030500-generic x86_64


[ change a memory size of VM on the fly ]

on the KVM host , check the current memory size. ( 512MB )
virsh # qemu-monitor-command --hmp ubuntu12-04-vm1 'info balloon'
balloon: actual=512

On the VM
root@ubuntu12-04-vm1:~# egrep -i memtotal /proc/meminfo
MemTotal:         503052 kB


Change memory sitze to 256MB from 512MB.
On the KVM host
virsh # qemu-monitor-command --hmp ubuntu12-04-vm1 'balloon 256'


On the VM. Mem size has changed from 512 MB to 256MB.
root@ubuntu12-04-vm1:~# egrep -i memtotal /proc/meminfo
MemTotal:         240908 kB

Ubuntu 12.10 : GUI broken after upgrading to 12.10 from 12.04 ( can’t solve )

After upgrading to 12.10 from 12.04 , GUI has broken like this.




# lsb_release –a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.10
Release:        12.10
Codename:       quantal

# uname -ri
3.5.0-17-generic x86_64


Here’s grachic card info
# lshw -class display
 *-display
      description: VGA compatible controller
      product: ES1000
      vendor: Advanced Micro Devices [AMD] nee ATI
      physical id: 3
      bus info: pci@0000:01:03.0
      version: 02
      width: 32 bits
      clock: 33MHz
      capabilities: pm vga_controller bus_master cap_list rom
      configuration: driver=radeon latency=64 mingnt=8
      resources: irq:23 memory:f0000000-f7ffffff ioport:3000(size=256) memory:fb5f0000-fb5fffff memory:fb400000-fb41ffff


# egrep  -R '(\(WW\)|\(EE\))' /var/log/Xorg.0.log
       (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    40.504] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    40.533] (WW) Warning, couldn't open module fglrx
[    40.533] (EE) Failed to load module "fglrx" (module does not exist, 0)
[    40.534] (WW) Warning, couldn't open module fglrx
[    40.534] (EE) Failed to load module "fglrx" (module does not exist, 0)
[    40.538] (WW) Falling back to old probe method for vesa
[    40.538] (WW) Falling back to old probe method for modesetting
[    40.538] (WW) Falling back to old probe method for fbdev
[    40.688] (EE) AIGLX error: Calling driver entry point failed
[    40.688] (EE) AIGLX: reverting to software rendering


-  (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.

There’s no cyrillic
# ls /usr/share/fonts/X11/
100dpi  75dpi  Type1  encodings  misc  util


Install that via apt-get
# apt-get install xfonts-cyrillic -y


-  (WW) Warning, couldn't open module fglrx


# apt-cache search fglrx
fglrx - Video driver for the AMD graphics accelerators

# apt-get install fglrx -y

Reboot the OS
# reboot


After boogint ghe OS
nnn , many errors..
# egrep  -R '(\(WW\)|\(EE\))' /var/log/Xorg.0.log
       (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    40.411] (WW) Falling back to old probe method for fglrx
[    41.925] (EE) No supported AMD display adapters were found
[    41.973] (WW) Falling back to old probe method for modesetting
[    41.973] (EE) open /dev/dri/card0: No such file or directory
[    41.973] (WW) Falling back to old probe method for fbdev
[    42.080] (EE) Screen 0 deleted because of no matching config section.
[    42.283] (EE)
[    42.283] (EE) Backtrace:
[    42.284] (EE) 0: /usr/bin/X (xorg_backtrace+0x36) [0x7f3c2f547ac6]
[    42.284] (EE) 1: /usr/bin/X (0x7f3c2f39f000+0x1ac8f9) [0x7f3c2f54b8f9]
[    42.284] (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f3c2e6c5000+0xfcb0) [0x7f3c2e6d4cb0]
[    42.284] (EE) 3: /usr/bin/X (xf86findOption+0x20) [0x7f3c2f45db10]
[    42.284] (EE) 4: /usr/bin/X (xf86findOptionValue+0x9) [0x7f3c2f45dc99]
[    42.284] (EE) 5: /usr/bin/X (0x7f3c2f39f000+0x94efd) [0x7f3c2f433efd]
[    42.284] (EE) 6: /usr/bin/X (xf86ProcessOptions+0x2f) [0x7f3c2f43447f]
[    42.284] (EE) 7: /usr/lib/xorg/modules/libvbe.so (vbeDoEDID+0xe7) [0x7f3c2a4b6b17]
[    42.284] (EE) 8: /usr/lib/xorg/modules/drivers/vesa_drv.so (0x7f3c2acd2000+0x30a5) [0x7f3c2acd50a5]
[    42.284] (EE) 9: /usr/bin/X (InitOutput+0xb02) [0x7f3c2f436af2]
[    42.284] (EE) 10: /usr/bin/X (0x7f3c2f39f000+0x44386) [0x7f3c2f3e3386]
[    42.284] (EE) 11: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xed) [0x7f3c2d34a76d]
[    42.284] (EE) 12: /usr/bin/X (0x7f3c2f39f000+0x448ad) [0x7f3c2f3e38ad]
[    42.284] (EE)
[    42.284] (EE) Segmentation fault at address 0x0
[    42.284] (EE)
[    42.284] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    42.284] (EE)

# egrep  -R '(\(WW\)|\(EE\))' /var/log/Xorg.failsafe.log
       (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    47.716] (WW) VESA(0): Unable to estimate virtual size
[    47.716] (WW) VESA(0): No valid modes left. Trying less strict filter...
[    47.716] (WW) VESA(0): Unable to estimate virtual size
[    48.539] (EE) GLX error: Can not get required symbols.

uninstall fglrx
# apt-get remove fglrx -y


Reboot the OS

After rebooting the OS
root@ubuntu-1:~# egrep  -R '(\(WW\)|\(EE\))' /var/log/Xorg.0.log
       (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    39.177] (WW) Warning, couldn't open module fglrx
[    39.177] (EE) Failed to load module "fglrx" (module does not exist, 0)
[    39.463] (WW) Warning, couldn't open module fglrx
[    39.463] (EE) Failed to load module "fglrx" (module does not exist, 0)
[    39.537] (WW) Falling back to old probe method for vesa
[    39.537] (WW) Falling back to old probe method for modesetting
[    39.537] (WW) Falling back to old probe method for fbdev
[    40.234] (EE) AIGLX error: Calling driver entry point failed
[    40.234] (EE) AIGLX: reverting to software rendering

# egrep  -R '(\(WW\)|\(EE\))' /var/log/Xorg.
Xorg.0.log             Xorg.failsafe.log
Xorg.0.log.old         Xorg.failsafe.log.old
root@ubuntu-1:~# egrep  -R '(\(WW\)|\(EE\))' /var/log/Xorg.failsafe.log
       (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    47.716] (WW) VESA(0): Unable to estimate virtual size
[    47.716] (WW) VESA(0): No valid modes left. Trying less strict filter...
[    47.716] (WW) VESA(0): Unable to estimate virtual size
[    48.539] (EE) GLX error: Can not get required symbols.

Still have the problem..

How about reinstalling Xorg ??
# apt-get remove --purge xserver-xorg


Install
# apt-get install xserver-xorg -y


reconfigure
# dpkg-reconfigure xserver-xorg

Reboot the OS
# reboot

Can’t solve..



xrog has not been installed..

# apt-cache policy xorg
xorg:
 Installed: (none)
 Candidate: 1:7.7+1ubuntu4
 Version table:
    1:7.7+1ubuntu4 0
       500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages


install
# apt-get install xorg -y

# apt-cache policy xserver-xorg
xserver-xorg:
 Installed: 1:7.7+1ubuntu4
 Candidate: 1:7.7+1ubuntu4
 Version table:
*** 1:7.7+1ubuntu4 0
       500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
       100 /var/lib/dpkg/status

# apt-cache policy xorg
xorg:
 Installed: 1:7.7+1ubuntu4
 Candidate: 1:7.7+1ubuntu4
 Version table:
*** 1:7.7+1ubuntu4 0
       500 http://archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
       100 /var/lib/dpkg/status

Reboot the OS

still can’t solve the problem..
I’ll do the fresh installation when I have time.

Ubuntu 12.10 desktop 64bit : install Glx-Dock

about Glx-Dock

http://glx-dock.org/index.php

In brief , Glx-Dock is one of desktop interfaces , such as unity , gnome-shell.

[ install Glx-Dock on Ubuntu 12.10 ]


root@ubuntu-note:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal

root@ubuntu-note:~# uname -ri
3.5.0-17-generic x86_64


add the repository for ubuntu 12.10 in /etc/apt-sources.list file.
root@ubuntu-note:~# echo "deb http://ppa.launchpad.net/cairo-dock-team/ppa/ubuntu $(lsb_release -sc) main ## Cairo-Dock-PPA" | tee -a /etc/apt/sources.list deb http://ppa.launchpad.net/cairo-dock-team/ppa/ubuntu quantal main ## Cairo-Dock-PPA

root@ubuntu-note:~# tail -1 /etc/apt/sources.list
deb http://ppa.launchpad.net/cairo-dock-team/ppa/ubuntu quantal main ## Cairo-Dock-PPA


install the key
root@ubuntu-note:~# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E80D6BF5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.wtCPTLRBcb --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys E80D6BF5
gpg: requesting key E80D6BF5 from hkp server keyserver.ubuntu.com
gpg: key E80D6BF5: "Launchpad cairo-dock" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

update
root@ubuntu-note:~# apt-get update

install
root@ubuntu-note:~# apt-get install cairo-dock cairo-dock-plug-ins -y

log out , select Glx-Dock as desktop interface and then log on.

Windows 7 : Windows Update : error = 0xC8000247 ( HP pavilion desktop )

Windows update service has not worked after replacing an old HDD with a new one due to HDD failure.I have installed Windows 7 Pro 32bit into the new HDD using the recovery media shipped with HP. ( I replaced 320GB HDD with 500GB HDD )

Windows update service is running , however I can’t apply patches.




The following is the WindowsUpdate.log when issuing updates with CLI

Do the update with CLI

C:\Windows\system32>wuauclt.exe /detectnow


WindowsUpdate.log ( C\Windows\WindowsUpdte.log )
1084694AU###########  AU: Initializing Automatic Updates  ###########
1084694DtaStorFATAL: Failed to initialize datastore, error = 0xC8000247
1084694AgentWARNING: GetServiceList failed with error 0xc8000247.
1084694AUWARNING: QueryRegisteredProvider failed with error 0xc8000247
1084694AU  # Approval type: Scheduled (User preference)
1084694AU  # Scheduled install day/time: Every day at 15:00
1084694AU  # Auto-install minor updates: Yes (User preference)
1084694AU  # Will interact with non-admins (Non-admins are elevated (User preference))
1084694AU  # Power management is turned off through policy
1084694DtaStorFATAL: Failed to initialize datastore, error = 0xC8000247
1084694AUFATAL: Failed to get session from datastore, error = 0xC8000247
1084694AUFATAL: Failed to Unserialize from data store, error = 0xC8000247
1084694AU  # WARNING: Exit code = 0xC8000247
1084694AU###########  AU: Uninitializing Automatic Updates  ###########
1084694AUWARNING: InitAUComponents Failed, will restart AU in 30 mins, error = 0xC8000247
1084694AUAU Restart required....


When googling this issue , I've found that this might be corrected by installing "Intel Rapid Storage Technology Driver".
In my case , I could solve this issue after installing "Intel Rapid Storage Technology Driver" which I downloaded from HP site.
You will find the driver for HP desktop by just googling “HP pavilion model name driver”.

After installing the driver.



Fedora 17 : how to disable automount ( GNOME3 )

install dconf-editor
# yum install -y dconf-editor

launch dconf-editor
# dconf-editor

org -> gnome -> desktop -> media-handling

uncheck “automount” and “automount-open”