My server had been on 10.04 for a long time. With the upcoming 11.10 that means it would be 3 major releases behind. So I decided it was time to upgrade.
I ssh'ed to the server then upgraded via command line. First I made sure that all packages were up to date
> sudo apt-get update
> sudo apt-get upgrade
> sudo apt-get dist-upgrade
Now the release upgrade
> sudo do-release-upgrade
It returned with no new release. The Ubuntu Community website provided help. By default, update-manager only looks for LTS releases. Since my server version (10.04) was already LTS, there was no further LTS release to upgrade. I needed to change the setting.
> sudo vi /etc/update-manager/release-upgrades
to change to Prompt=normal
> sudo do-release-upgrade
Now it could find a release to upgrade. However, it gave a warning since I used SSH to connect to the server. Basically, the upgrade process may affect sshd, thus ssh-client. To prevent connectivity issues half-way through the upgrade, another sshd on port 1022 will be started as a backup.
I acknowledged the warning and proceeded. Fortunately there was no issue at all. My ssh session wasn't killed half-way through. Now my server is running 10.10. My next step is to upgrade to 11.04.
Tech Blog
Saturday, October 8, 2011
Tuesday, October 4, 2011
Time Synchronisation with ntp
My server was 5 minutes faster. Simple to fix.
> sudo apt-get install ntp
For more details see this link.
Ubuntu crontab to rsync
I had to schedule a job to back up my home directory on a server. It's quite simple.
As a normal user:
> crontab -e
then create a schedule entry for the backup job every day at 2 am
0 2 * * * /usr/bin/rsync -va --delete /home/me/ /var/me/ >> /tmp/crontab.log
As a normal user:
> crontab -e
then create a schedule entry for the backup job every day at 2 am
0 2 * * * /usr/bin/rsync -va --delete /home/me/ /var/me/ >> /tmp/crontab.log
I had to specify the full path /usr/bin/rsync. It didn't run without the full path.
For more details see this link.
Saturday, March 26, 2011
Java Profiling
Before you make changes to an existing Java application it is a good idea to profile its performance. After the changes you should profile the application again to make sure that the changes you just introduced does not severely affect the overall performance.
Some tools that I have worked with:
JConsole
Apply this parameter when starting the JVM of the application being profiled:
JVisualVM
Available with Sun JDK version 6. It can be used to profile a pre-6 JVM but certain information and feature are unavailable, such as Heap Dump. There is no JVM parameter needed.
GC Viewer
This tool simply needs gc.log generated by a running JVM. Apply these parameters when starting the JVM:
Some tools that I have worked with:
JConsole
Apply this parameter when starting the JVM of the application being profiled:
-Dcom.sun.management.jmxremote
JVisualVM
Available with Sun JDK version 6. It can be used to profile a pre-6 JVM but certain information and feature are unavailable, such as Heap Dump. There is no JVM parameter needed.
GC Viewer
This tool simply needs gc.log generated by a running JVM. Apply these parameters when starting the JVM:
-Xloggc:C:/temp/gcint.log -XX:+PrintGCDetails
Subscribe to:
Comments (Atom)