Memory on my Laptop

I just wanted to know what memory was in my Linux laptop to buy another stick. It is actually easy and very descriptive on what can be done with your latop:

sudo dmidecode –type 17

Gives you a nice output with all the details:

# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x003E, DMI type 17, 40 bytes
Memory Device 
    Array Handle: 0x003D 
    Error Information Handle: Not Provided 
    Total Width: 64 bits 
    Data Width: 64 bits 
    Size: 8192 MB 
    Form Factor: SODIMM 
    Set: None 
    Locator: DIMM A 
    Bank Locator: BANK 0 
    Type: DDR4 
    Type Detail: Synchronous Unbuffered (Unregistered) 
    Speed: 2400 MT/s 
    Manufacturer: 000000000000 
    Serial Number: 00000000 
    Asset Tag: 00000000 
    Part Number: HMA81GS6AFR8N-UH     
    Rank: 1 
    Configured Clock Speed: 2400 MT/s 
    Minimum Voltage: 1.2 V 
    Maximum Voltage: 1.2 V 
    Configured Voltage: 1.2 V

Handle 0x003F, DMI type 17, 40 bytes
Memory Device 
    Array Handle: 0x003D 
    Error Information Handle: Not Provided 
    Total Width: Unknown 
    Data Width: Unknown 
    Size: No Module Installed 
    Form Factor: Unknown 
    Set: None 
    Locator: ChannelB-DIMM0 
    Bank Locator: BANK 2 
    Type: Unknown 
    Type Detail: None 
    Speed: Unknown 
    Manufacturer: Not Specified 
    Serial Number: Not Specified 
    Asset Tag: Not Specified 
    Part Number: Not Specified 
    Rank: Unknown Configured 
    Clock Speed: Unknown 
    Minimum Voltage: Unknown 
    Maximum Voltage: Unknown 
    Configured Voltage: Unknown

 

Environment variables for a cronjob

It has happen to me too often that a script runs well at the command line when you test it but when you schedule it through cron it fails. After some troubleshooting I realize that it is caused by missing environment variable like PATH or JAVA_HOME.

After searching on the topic for a few minutes this morning I saw a recommendation that I adapted.

Before the script in crontab I just added:

source /home/user/.bashrc

This runs the .bashrc content and all my expected environment variables are there for the script to run the same way in cron as it does at the command line.

The entire cron line would look something like this:

50 3 * * *    source /home/user/.bashrc; /path/to/script 1>>/tmp/logfile.log 2>>/tmp/logfile.log

 

KDE 4 and moving app window to full or half screen

Windows 7 certainly brought this very useful feature of maximizing an app window from the keyboard. You can also get app windows to use half the screen (left or right) with your keyboard only.

I have added an app to my Mac to do the same and now I have configured KDE tohave the same convenience:

System Settings => Shortcuts and Gestures => Global Keyboard Shortcuts and choose KWin from the KDE component dropdown.

You are looking for the Quick Tile and the Maximize Window actions.

Installing VirtualBox Guest Additions in CentOS 6.5

I had some difficulties installing the guest addition in my centos 6.5 VM so after upgrading to VirtualBox 4.3.8 I searched a bit and found an article that pointed me in the right direction.

Everyone points you to click on the Devices menu and then on Insert Guest Addition CD…

I then needed to:

sudo mount /dev/cdrom /media

and I could then
cd /media
./VBoxLinuxAdditions.run

Since I already had the dkms module installed everything worked as expected.

CentOS6 in VirtualBox Quick notes

From a default install of CentOS 6 in VirtualBox there is a few things I need to remember to do every time (as root under /tmp):

  1. rpm –import http://apt.sw.be/RPM-GPG-KEY.dag.txt
  2. wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
  3. rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
  4. rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
  5. yum install dkms
  6. /etc/init.d/vboxxadd setup

Nexus 7

I could not resist and I bought a Nexus 7 last Thursday.

My only other tablet experience is with the iPad 1. I liked it very much but I am not happy with its end of life when iOS6 is released. For no good reason Apple is not going to allow original iPads to upgrade to the new iOS. The hardware is more capable than other devices (iPhone 3GS) that will get the upgraded OS so it is business choice that Apple made.

Since I am quite displeased with their business choice I decided to look at my options.

The Nexus 7 was a logical choice.

Hardware wise it is quite capable with a quad core processor, a gig of RAM and the 1280 x 800 screen. Basically everything is much better than my iPad 1 except for storage: 16 Gb vs 64 Gb.

With the smaller storage I will have to be less of a digital hoarder. Only the music I listen too and just enough video podcasts for the free time I have. I think that 16 Gb will be more than enough.

I have also been playing with Android since I have a Motorola Atrix for the last year so I am used to it. Yes it is different and I think that this latest version (4.1) is better than iOS5. The details are what makes it easier to do regular tasks. I can highlight some text and send it to Evernote to create a new note. 2 steps to do what takes many steps in iOS (select, copy, go to apps, open evernote, create a new note, paste).

It is a very nicely visual OS for tablets. Smooth and all the details are taken care of. It shows you in a much easier way everything that is running and all the notifications you have. I have always liked seeing more and it does it very simply and cleanly. I also like the flexibility of deciding to have animation even in the background. I prefer it when the user is in control.

The battery life is very good even though it has 4 cores to run all the apps and I watched movies. I was still able to read emails and other news on the Internet for the last couple of days without charging it. It will take months to really test the battery life to compare it to the iPad but it looks good for now.

The size is actually very good. I can easily hold it in 1 hand and it is much lighter. Since I have a better resolution on the Nexus 7 I am liking the smaller size. May sound trivial but because of its size it also fits in a back pocket. It is convenient when you have a few things to pick up to be able to put it away in the back pocket.

Because of the pixel density it is easy to read text. I like the fine lines of small text. I was under the impression that text was looking very nice on my iPad but after seeing the new screen on the Nexus 7 I know I was living a delusion. I can see the difference and I like it very much.

Price. How can I not mention that the small price is more than attractive. At this price I can buy a new tablet every year and it will cost me less than my iPad over the years.

This fact also make the upgrade path less of an issue. I will buy a new tablet when there is a new version that I want. I can also decide to root the tablet and upgrade it. My choice.

From the short time I had with the Nexus 7 I can see how it will be my tablet from now on.

Red Hat Summit 2012

Last week, I attended Red Hat Summit in Boston and I was curious to know where they hosted over the years.

Here is what I found:

Red Hat Summit & JBoss World 2012 – June 26-29 in Boston
Red Hat Summit & JBoss World 2011 – May 3-6 in Boston
Red Hat Summit & JBoss World 2010 – June 22-25 in Boston
Red Hat Summit 2009- September 1-4 in Chicago
Red Hat Summit 2008 –  June 18-20 in Boston
Red Hat Summit 2007 – May 9-11 in San Diego
Red Hat Summit 2006 – May 30 to June 2nd in Nashville
Red Hat Summit 2005 – June 1st-3rd in New Orleans

I can certainly say that I enjoy every Summit I attended. There is always a lot of good information and very nice people to meet. I certainly hope I can make it next year.

VirtualBox on MacOSX running RHEL6.1

I will cut the suspense right away: not working very well.

Actually all my Linux VMs on the Mac have not worked well with VirtualBox. I have tried many version of VirtualBox and there is not one that worked better for me.

I searched on the community forums on the virtualbox.org site but did not find much help.

The experience of installing RHEL 6.1 in VirtualBox was not easy at first because I was allocating the maximum memory it would allow me. I have plenty of available RAM on my iMac so that was not the issue. I was monitoring with the Activity monitor app and we were not hitting any limits from what I could see. In the middle of the installation VirtualBox would give me an error about the host being low on memory and would pause the installing VM. Only when I dropped the memory allocation from 3500 Mb to 2048 Mb did the installation work to the end.

The VirtualBox tools installed no problem but since I did not use the VM enough before installing the tools I am not sure if it was stable in the first place. If I start Firefox and Eclipse it freezes and I have to force a shutdown of the VM.

VirtualBox works great on my Windows 7 laptop and I have no problem running many apps in it. It is actually a very good development environment for what I do.

On the Mac I am afraid that I will have to find another solution and that is too bad because the iMac is a much better machine than the laptop to test RHEL 6.1.

OpenShift and MacOSX

If I wanted the least amount of trouble I would probably use OpenShift on a Fedora laptop or a RHEL6 server.

Since I always give myself a challenge, I decided to use MacOSX to work with OpenShift. Not that it is a bad idea but it gives additional challenges I did not expect. There is always something positive about these challenges. When the basic things don’t work you have to learn about them and how everything is setup. It is always the best setup to learn. Certainly a quick success on that aspect.

Installing the rhc tools to create a domain and app on openshift requires that you have XCode installed. Only $5 to get the app from the Mac App Store but I did not know that it was installing an installer. Once I learned that I needed to install from the installation I was golden to get something done. So I had a relatively empty application from the WSGI template setup on my MacBook Air.

It is great to code on the laptop but sometimes I prefer to use the iMac with the bigger screen and more comfortable setup. I tried to simply do a git pull to get the repo but it would always fail on me. After getting some help from the OpenShift Express Forums I learned that I needed to copy the files from .ssh that were created with the rhc tools. The config and libra_* files were copied and my git pull worked as it should.

Basic things but it is great when it works and that you have learned where things are.

Now I have this great idea that I should try to put Spring Python in OpenShift Express. Looking for more learning, I guess.

Red Hat Summit: The culture shock I needed

I was not suppose to go this year because it was the turn for a co-worker but since that person left us for greener pastures I was lucky to be the next in line.

I was quite happy to be going.

I did not really remember why I wanted to be there until I was there for a few hours. Yes I wanted to go to many of the technical sessions and my agenda was made before the event started. I am always impressed that the presenters are the people doing the code or in charge of the technical team responsible for what is being presented. The presenter can answer many of the questions and if they can’t most of the time the rest of their team are in the audience. The quality of these presentations are great because of this involvement.

But as much as the technical sessions are great it was Jeremy from trendhunter.com that reminded me why I loved the Summit so much. It is about the culture.

The culture at the Summit and at Red Hat is very different than what I see where I work. The collaboration with everyone is the norm in the open source communities and Red Hat certainly makes it a point to always act in collaboration.

That different mentality is good shock and certainly allowed me to see others thinking differently but also to wake me up. When you are challenged in how you execute your job you can better evaluate the reasons you do it that way. You can also see what you can change.

In my case it is a little more than that. I am uncomfortable in how we approach our execution of what we need to do. I am a lot more interested in the collaboration model that I have seen during the Summit. In that regard I think that I need to challenge a lot more than just myself. Is it just the greener pasture syndrome, I don’t know. I think that I will have to wait a month and re-evaluate what I have seen and how I feel about it.

I think that the most important sentence from this Summit will be “culture over strategy”.