Friday, January 24, 2014

Lenovo IdeaPad A10 (Android) hands-on review

Being the "family geek" I am often asked for laptop recommendations. More often than not, functionality requirements are so low that even chromebook will be sufficient. Actually I already recommended two chromebooks and so far both continue to please their owners.

Sometimes the requirements list Skype or greater autonomy as mandatory items. For such users an Android tablet should be enough. Occasional keyboard users require something more substantial. Bluetooth keyboards only complicate the picture.

Since the Lenovo IdeaPad A10 (Android) appeared on the market (end of October 2013), I have been looking on the internet for a hands-on review of the device. And even now, three months later, nothing useful have shown up. This is probably related to Lenovo's refusal to market the laptop in USA (most possibly due to the shaky patents ground there). Lack of cyanogenmod posts on the device and abundance of clearly bought reviews on various blogs did not help either..

Finally couple of days ago, I decided to bite a bullet and buy localized (Hebrew) Lenovo IdeaPad A10 for $310. So here is my list of pros and cons I found so far:

Pros:

  • USB charging is done by standard 2A 5v microUSB jack.
  • Touching the touchpad yields visible mouse pointer that simulates screen touches. This gives expected look and feel in laptop mode.
  • Interface is easy to use, but suffers from touch/pointer dilemma. Long story short - your hand starts aching after some time pressing buttons on vertical screen.
  • Two full-size USB connectors make it easy to connect flash-disks or mouse - this also improves look and feel in laptop mode.
Cons:


  • There is no root jail-breaking application (at the moment). This makes it impossible to install VNC server - a must for tech support of the newbie users.
  • Lack of root access makes it impossible to mount a network share. Lack of any modders activity leaves little hope for that to change though.
  • Built-in "explorer" crashes when trying to connect to a webdav sever.
  • SFTP support in the "exporer" does not allow specifying target path.
  • The touchpad is single-figner only and can not interpret gestures - nice to have with most modern laptops (for example: two fingers down = scroll down).
  • SFTP support in the "exporer" does not allow to specify path on the server, does not show video files as icons, insist on copying the file locally first, and even that it does on ridiculously slow speed of 250 KBytes/s..
  • It is expensive for what it offers. A $150 tablet with a BT keyboard could be bought for less than that. Heck, add a bit more and you can buy weak laptop..
Verdict so far: The tablet/wannabe laptop combination is acceptable for users that are aware of its limitations and feel comfortable about it. Fortunately that was the case for me.

Tuesday, July 2, 2013

Ensure emails are accounted for

Ensure emails are accounted for


Sysadmins often set up scripts that send back "OK" or "Error" emails, but there is no mechanism to send alert if *no* email was received for certain time period. Lack of such emails might indicate serious system failure somewhere, that becomes obvious when it is too late to do anything. There are many stories on internet about backups that were set up properly, but for some reason were disconnected.

Thus I wrote the script ensure_accounted_for.py that informs sysadmins about emails that were supposed to arrive on daily basis, but for some reason did not. Its sample configuration can be taken from ensure_af.cfg.

Tuesday, October 9, 2012

Multiple mysql engines on the same server

Someone asked me for a howto on setting up multiple mysql engines on the same linux server. There are many articles on the topic, but none provides an ready-to-use set of files which one can simply grab and go.

Thus I created multiple_mysql.tar.gz file that includes all files to run four mysql engines. The configuration assumes per-database directories /opt/db-330[4567] with bin_log, mysql  and relay_log directories. The mysql directory must have mysql database with associated tables (should be copied from an existing database).

Note that the files were created on Ubuntu Lucid 10.04 and will likely not work on other distro. Also, the password in debian-330?.cnf files will be different for each DB and must be updated before use.
Use the following command to set the password:
GRANT ALL ON mysql.* to "debian-sys-maint"@"localhost" IDENTIFIED BY "dxaskDkdkSkdSDLd";

The bashrc file contains useful CLI shortcuts to common mysql commands. You are encouraged to add these to your own .bashrc file.

Monday, June 25, 2012

Laggy ssh with clear network

Recently, after reboot, my ssh sessions to remote servers started behaving sluggishly, sometimes taking several seconds for typed characters to appear. The lag was especially noticeable with last character that got typed. Nature of ssh sessions it to type several characters and checking the output. You can imagine the frustration seeing most of keypresses delivered, but getting feedback after some delay. Ping to the server was showing reliable, speedy responses with not a single packet loss. Network was in excellent shape, no torrents or other heavy uploads. I did not know where to look or how to google for the problem. I then remembered that I waited several months for the reboot to check an X-related crash and found that I disabled all X acceleration in the /etc/X11/xorg.conf file:
    Option "DRI" "false"
    Option "shadow" "true"
    Option "NoAccel" "True"
Desperate about the whole issue, I enabled back all X acceleration options, restarted X and voila! The ssh is fast again! Now, I don't know whether it is a bug or which subsystem it is in. So I decided to describe the problem sprinkled with keywords I used while googling for the problem in hope it helps someone. Write in comments if it did. :)

Thursday, February 23, 2012

Playlist detection on python

There are several popular playlists used for internet radio streaming: asx, m3u, smil, asf, pls... The playlist extension is not always visible in the URL that an ipradio station returns. Furthermore, the MIME type is not always correct. Sometimes one has no choice but to guess the playlist type by looking for the presence of certain markers.

After fruitless searches on the internet, I wrote an python library that detects playlist type. You can download it here.

I am sure that the detection algorithm can be improved. Please write suggestions in the comments.

Easy creating and destroying of lxc vservers

One big advantage of using amazon's EC2 servce is its deceptively easy way to create new servers - it is just API call or mouseclick away. The actual physical machine allocation, OS image copying, hostname, IP, dns, firewall and routing setup are done transparently in the background. You are only required to setup the payment ;) .

Big enterprise virtualization technology providers already have a mechanism to create virtual machines with given parameters on demand. Such a system would likely be overkill for a handful of physical servers. I also doubt they support the highly effective pseudo-virtualization LXC technology.

Thus I created a python "lmachine" script for our LXC servers, that copies an OS image into a selected "slot" with already pre-allocated IP number and server name. The script also modifies a couple of system files from the OS image accordingly.

The script can be downloaded here.

Preparing an LXC image

LXC images are easily created using the debootstrap utility. To make them ready for the lmachine script, you need to set the actual IP number with the IPNUMBER string and the actual server name with the VSERVERNAME string. Here is the list of files that needs to be modified:
  • fstab
  • lxc.conf
  • root/etc/network/interfaces
  • root/etc/hosts
  • root/etc/hostname
  • root/etc/mailname
Make sure you pre-allocate IP numbers and ltestXX DNS domain names in advance. Update the lmachine script with the list of pre-allocated IP numbers.

Monday, February 20, 2012

xls2csv using python-uno

While several xls2csv converters exist, on a recent assignment none of them were able to convert a multi-sheet, 300+MB Excel file into CSV format.

While searching for possible solutions, I found this (dated) blog entry on using python-uno. After assembling it into a single script and updating for changed LibreOffice arguments, I made it available here. You can check the script using the sample .XLS file with three sheets.

The power of the solution lies in the LibreOffice+UNO (Universal Network Objects) platform it uses. While xls2csv looks like a trivial task, the platform automatically supports reading all spreadsheet types LibreOffice supports. This means that the script might as well be called xlsx2csv or ods2csv.

The script can become a starting point for someone trying to implement complex documents management automation scripts. Leave a comments if you do :) .