Wednesday, December 15, 2010

Profiling with YourKit

To install yourKit, download the bz2 and untar it -
tar xjvf yjp-9.0.7-linux.tar.bz2

If you want to profile a web application running on say Tomcat,
1. You should upload the yourkit to one of the accessible folders on the server.
2. your catalina.sh or setenv.sh should have:
# enable YourKit java profiling.
CATALINA_OPTS_YJP="-agentpath:/home/tom8080/yjp-9.0.9/bin/linux-x86-64/libyjpagent.so"
When you start the application, in the logs yjp will log a line saying on which port it is listening. Use that port when connecting from the local box UI.

Start the application

Connect and then start profiling. End and save to get the snapshot.

Friday, December 10, 2010

Cisco anyconnect vpn client on ubuntu 10

sudo apt-get install ia32-libs lib32nss-mdns libcurl3 libxml2
cd /usr/local
sudo mkdir firefox
cd firefox
sudo ln -s /usr/lib32/libnss3.so
sudo ln -s /usr/lib32/libplc4.so
sudo ln -s /usr/lib32/libnspr4.so
sudo ln -s /usr/lib32/libsmime3.so
sudo ln -s /usr/lib32/nss/libsoftokn3.so
sudo ldconfig

sudo sh ./vpn_install.sh

Wednesday, December 8, 2010

Adding new monitor resolution to Ubuntu

Follow these steps if your ubuntu monitor settings does not contain the resolution that your monitor supports.

Go to /etc/X11/
vi the file xorg.conf

my ubuntu did had the resolution - 1920x1080 so I had to add this file:

# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously

# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
Identifier "Configured Monitor"
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
SubSection "Display"
Depth 24
Modes "1920x1080"
EndSubSection
EndSection

Section "Device"
Identifier "Configured Video Device"
EndSection


-- Installing Intel HD graphics card --
You need to install drivers for the graphics card. Here are the steps for Intel HD graphics card:
sudo add-apt-repository ppa:glasen/intel-driver
sudo apt-get update && sudo apt-get upgrade

-- Change grub ----
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.modeset=1"

in /etc/default/grub

run update-grub after making these changes & reboot.

-- run --
Run the below command:
cvt 1920 1080 60

This should output correct line to be used in xorg.conf
Here is the out put:
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

$ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

$ xrandr --addmode VGA1 1920x1080_60.00