Wednesday, June 27, 2007

hsenid becomes mysql enterprise gold partner



Nice to see hsenid becomes mysql enterprise gold partner. I feel we should have become this mush earlier than now since we have been using mysql heavily in our applications for long time. I think we have a good bunch of people in both our development and support teams who have experience in mysql.
I hope this move will give extra boost on our engineers and they will focus more and more on mysql expertises further.

Sunday, June 24, 2007

Eureka !!! Connecting to m1 3g vodafone modem in fedora7

Finally I managed to get my m1 3gsm modem working with my vaio fedora 7. This is the procedure I used for got it working.
My system is: Linux 2.6.21-1.3194.fc7 (fedora 7)
Wvdial version : WvDial 1.54.0

1) Create the following wvdial.conf
[Dialer Defaults]
Phone = *99#
Username = ppp@aplus.at
Password = ppp
Stupid Mode = 1
Dial Command = ATDT

[Dialer pin]

Init2 = AT+CPIN=5623

[Dialer A1]
Modem = /dev/ttyUSB0
Baud = 460800
Init3 = at+cgdcont=1,"ip","sunsurf"
ISDN = 0
Modem Type = Analog Modem


2) Then connect your vodafone mobile usb modem. (HUAWEI)
3) Wait till it is detected properly. (You can see logs from /var/log/messages)
4) Try to connect using wvdial.
wvdial --config wvdial.conf A1

For me it fails always like this
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.


4) Don't worry about that. Apply the following commands
modprobe uhci_hcd ehci_hcd ppp
modprobe usbserial vendor=0x12d1 product=0x1003
rmmod usb-storage


5) Now remove the usb modem again and plug in back.
6) Wait till it is detected and try the following command again.
wvdial --config wvdial.conf A1

This time you should be able to shout "Eureka!!".
You should get the following message

[root@localhost linux-scripts]# wvdial --config wvdial.conf A1
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: at+cgdcont=1,"ip","sunsurf"
at+cgdcont=1,"ip","sunsurf"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Sun Jun 24 11:03:33 2007
--> pid of pppd: 5255
--> Using interface ppp0
--> local IP address 172.22.33.177
--> remote IP address 10.64.64.64
--> primary DNS address 10.11.12.13
--> secondary DNS address 10.11.12.14


Sorry I forgot one thing, You have to be a super user for doing this.

Hope you succeed on this. Else try plug it in back. It will work for sure.

Cheers!
References
1) Linux HSDPA Modem Huawai E220 with Gentoo (Provider: Ausrian A1) - QuirxiPedia
2) Vodafone 3G (UMTS) Howto

Tuesday, June 19, 2007

Getting Screenshots in symbian phones

Today I came across a situation where I wanted to get some screen shots of a Symbian application we developed to update some product documents. Did bit of surfing and ended up with a very nice tool called "Best Screen Snap" which gives similar experience like "Sangit" [Desktop screen capturing tool]. I think this is a very handy tool for mobile application developers. More importantly it is a freeware.
Click here for more info and download.

Sunday, June 10, 2007

Determining true memory usage in linux

Most of us are complaining high memory usage of applications running under linux by merely checking memory using 'top' command. Actually in Linux memory is never wasted. Almost all the free memory is used for Disk Caching. True memory usage can be determined by value of used buffers comes for 'free' command.
We also have lot of concerns over swapping. Linux mainly focus on services and greedy on allocating memory to applications. Anyway swapping can be configured using vm.swappiness parameter at /etc/sysctl.conf. This wiki has very useful information on linux memory management.

Saturday, June 9, 2007

Funny answers in mysql for IS NULL queries

Have you seen mysql returns non-NULL values for NULL query. If not you can try this out.
create table null_test(a int not null auto_increment, b int not null, primary key (a));
insert into null_test(a, b) values (0, 1); select * from null_test where a is null;

           | a | b |
+---+---+
| 1 | 1 |
+---+---+
Then retry mysql> select * from null_test where a is null;
Empty set (0.00 sec)

You can prevent this by
  • setting sql mode to NO_AUTO_VALUE_ON_ZERO. (Then next sequence number is generated only when NULL value for column is inserted.)
  • And setting off SQL_AUTO_IS_NULL server variable. (When ON it returns last inserted row for a table that contains an AUTO_INCREMENT column.)

This behavior is useful for ODBC programs, such as Access. But when such mysql table is restored from a dump, data become different.

"Flying High" Fedora 7

I upgraded my fedora 6 to fedora7 one week ago. There are lot of new features including the gnome 2.18 which is a better one for personal usages.Please refer release notes for further details.

Upgrade procedure is also very safe and easy. I first downloaded the ISO DVD image from here. Then burnt a DVD and upgraded my fedora6 straight away. I took the risk by not getting any backups before doing it. For downloading ,they are recommending bittorrent, It was very slow by that time(Probably I did the download soon after the release and very few in my closer region must have been using it.) , so I used the ftp instead.


This time fedora is promoting the "Flying High" theme contrast to their earlier themes.

They shipped FireFox 2.0 with this release where in fedora6 they didn't recommend to use FireFox2.0. There are lot other features like SE LINUX GUI, mplayer supports, pidgin(former gaim) etc.

I am still struggling to following things and still working on it.

1) For my VAIO FE35GP model, I could not get my in-build wifi working.
2) Motion-eye camera is not working.
3) I am using m1-vodafone 3G usb modem , which is not working in fedora.

All over fedora 7 is looking good and it has lot of applications shipped with, which good for people who use fedora as their personal OS.

Cheers


Monday, June 4, 2007

Carnegie Mellon West - The New Software Industry Conference 2007

Carnegie Mellon West
The Fisher IT Center at the Haas School of Business
Services: Science, Management, and Engineering Program at U.C. Berkeley

Presented a conference on

The New Software Industry:
Forces at Play, Business in Motion

The event took place on April 30, 2007.

Globalization, outsourcing, and world-flattening advances in technology continue to rock the software industry in ways that will significantly alter the way that technologists do business. This conference brought together academics and industry specialists to explore the background setting, the current status, and the future of the software industry. [1]

Watch the videos
Presentation slides

Reference: [1] Carngie Mellon West Website (3 June, 2007)

Saturday, June 2, 2007

Determine Resource Usage for a SQL session

Now we can use profiling session variable to determine resource usage for a sql session.
It is introduced in mysql 5.0.37.
All the information of variable usage can be found at
http://dev.mysql.com/doc/refman/5.0/en/show-profiles.html

This gives an idea of information can be extracted from the variable.

mysql> SHOW PROFILE CPU FOR QUERY 2;

+----------------------+----------+----------+------------+
| Status               | Duration | CPU_user | CPU_system |
+----------------------+----------+----------+------------+
| checking permissions | 0.000040 | 0.000038 |   0.000002 |
| creating table       | 0.000056 | 0.000028 |   0.000028 |
| After create         | 0.011363 | 0.000217 |   0.001571 |
| query end            | 0.000375 | 0.000013 |   0.000028 |
| freeing items        | 0.000089 | 0.000010 |   0.000014 |
| logging slow query   | 0.000019 | 0.000009 |   0.000010 |
| cleaning up          | 0.000005 | 0.000003 |   0.000002 |
+----------------------+----------+----------+------------+


All the profiling information is stored in PROFILING table in INFORMATION_SCHEMA database. More details can be extracted by directly querying the table.
http://dev.mysql.com/doc/refman/5.0/en/profiling-table.html

As this information is session based, they will be lost when session ends.
Profiling information will be very useful for estimating performance of mysql queries.

Friday, June 1, 2007

Offline readings with google reader

This may be a great news to people who carry laptops and who use google reader as their RSS or ATOM feed readers or any goooglers . You always do not need internet to read articles anymore. Just download your subscribed articles [2000 articles] to Google reader when u have internet access, and read them leisurely[ while your traveling, in the flight, in the bus ]...


The newly released Google gadget Google gears [a browser based plugin] enables off line reading on google-reader. You can download upto 2000 articles.


Google recommends Firefox 1.5+ or IE 6+. But some how I was only succeeded with Firefox but failed with IE 6 [understood still it is a beta version].