This is how you can combine (or concatenate) data from two table columns into one column using a mysql SQL query.
SELECT CONCAT(firstname,lastname) AS 'name' FROM tablename
The result would be “firstname lastname”
If you would like to insert this data into a new column
INSERT INTO tablename (full_name) SELECT CONCAT(firstname,lastname) AS 'name' FROM tablename
Posted by Hans-Henry Jakobsen
This post describes how you can get your VMware vSphere Client version 4 running on a 32-bit Windows 7 (RTM) installation until VMware makes an update to fix this Microsoft .Net problem. Be aware that this method of getting the client to run is not recommended in a production environment since you are running the client in development mode.
First you need to edit the VpxClient.exe.config file located in your C:\Program Files\Vmware\Infrastructure\Virtual Infrastructure Client\Launcher folder and make it look like the code below
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.net> <connectionManagement> <clear/> <add address="*" maxconnection="8" /> </connectionManagement> </system.net> <appSettings> <add key = "protocolports" value = "https:443"/> </appSettings> <runtime> <developmentMode developerInstallation="true"/> </runtime> </configuration>
Next we have to ensure that you we the .Net system.dll from a non Windows 7 machine.
It’s possible to download the config file and the DLL filer from here.
Place the modified config file in your C:\Program Files\Vmware\Infrastructure\Virtual Infrastructure Client\Launcher folder.
Then we create a new folder called Lib in the folder noted above and place the downloaded DLL file in the folder.

Reboot your PC and VMware vSphere Client should now work without any error messages.
Edit your system properties and create a new ‘Environment Variable” Name it “Devpath” with the value of C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\Lib. You can locate these variables under Control Panel –> System and Security –> System –> Advanced system settings
This post came to life after reading this thread on the VMware Communties discussion forum. The thread also describes how to make VMware vSphere Client to work on 64-bit Windows 7 but I’m not going to describe that in this post.
Tags: VMWare, vSphere Client, Windows 7
Posted by Hans-Henry Jakobsen
This post gives a short description of how to suspend a VMware Workstation 6.5.x host on a Ubuntu 9.04 Workstation but it shouldn’t be any problem to follow it on other linux distributions. Lately I’ve experienced that one of my VMware hosts lock up and my mouse cursor stops responding. The keyboard doesn’t let me switch applications (Alt+Tab) because the Tab-key doesn’t respond. The solution to my problem was to suspend the virtual machine from the console.
# vmrun suspend /path/to/the/vmx-file/vmxfile.vmx
Switch back to your graphical desktop by pressing Ctrl+Alt+F7. You will now see that the suspend indicator is hard at work suspending the virtual machine that is causing problems. When the host has been suspended you can shutdown VMware Workstation as you normally do.
To make sure that VMware haven’t got any processes that are defunct stop and start the VMware daemon.
Note:
Remember to shut down or suspend all virtual machines before issuing the following commands from the console to avoid losing data
Stopping the VMware daemon
# /etc/init.d/vmware stop Stopping VMware services: Virtual machine communication interface done Virtual machine monitor done Blocking file system done
Starting the VMware daemon
# /etc/init.d/vmware start Starting VMware services: Virtual machine monitor done Virtual machine communication interface done Blocking file system done Virtual ethernet done Shared Memory Available done
Start VMware as you normally do and resume the host. The host should now work without any problems.
The vmrun command gives you other options as well like list, start, stop, reset and upgradevm, but I won’t describe the use of these in this post.
Tags: console, suspend, Ubuntu, vmrun, VMWare, VMWare Workstation
Posted by Hans-Henry Jakobsen
This post came to life after experiencing some upgrade problems with missing dependencies and RPM packages from RPMforge and Redhat Enterprise Linux Client release 5. The prosess to remove or replace the packages was to remove RPMforge as a package repository and replace the blocking packages with Redhats own packages.
The process of replacing RPMforge packages with Redhats own packages
First we remove rpmforge as package repository
rpm -e rpmforge
This command removes the /etc/yum.repos.d/rpmforge.repo file.
Then we list all packages installed from the RPMforge repository to get an overview of the packages causing problems on the system.
rpm -qa --queryformat %{NAME}-%{VERSION}-%{ARCH}-%{RELEASE}\\n|sort|grep el5.rf
The result
dnsmasq-2.47-x86_64-1.el5.rf libsndfile-1.0.17-x86_64-1.el5.rf lftp-3.7.12-x86_64-1.el5.rf ...
The rf ending tells you that these packages are RPMforge packages. This command also tells you if it is 32bit (i386) or 64bit (x86_64) packages. I’ve described the prosess of removing 32- and 64bits packages in a earlier post named Remove duplicate packages when querying the rpm database.
Howto remove 64bit packages
yum remove libsndfile.x86_64
Next we will download the packages we want to replace, in my case dnsmasq
On a RHEL5 system
yumdownloader dnsmasq
If you don’t have yumdownloader in your system you have to install the yum-utils package.
On a RHEL4 system
up2date -d dnsmasq
Then we replace the RPMforge RPM package with Redhats own package
# rpm -Uvh --replacepkgs --oldpackage dnsmasq-2.45-1.el5_2.1.x86_64.rpm Preparing... ########################################### [100%] 1:dnsmasq ########################################### [100%]
If you don’t use the –oldpackage option you might get an error message like this
package dnsmasq-2.47-1.el5.rf.x86_64 (which is newer than dnsmasq-2.45-1.el5_2.1.x86_64) is already installed
I continued removing RPMForge packages until yum managed to resolve any unresolved dependencies.
Tags: RedHat, RHEL4, rhel5, rpmforge
Posted by Hans-Henry Jakobsen
This post continues where my previous post titled Export events including Event Properties from Windows Event Viewer left off.
The data I’m going to work with was exported using eventquery.vbs and saved in a CSV-file, comma separated file and it is presented in the form shown below.
"Information","10","12.05.2009 13:24:48","Print","Servername","None","AD\username","Document 232, filename.pdf owned by username was printed on printername via port IP_192.168.0.254. Size in bytes: 279232; pages printed: 18"
I’m interested in the username, date/time printed and pages printed and will now show how I’ve accomplished that using some simple linux console commands.
awk -F, '{print $7 " " $3 " " $4 " " $NF}' Event_Viewer_System.csv | grep printername | awk '{print $1 "," $2 "," $3 "," $NF}' | sed 's/\"//g'|sort > PrintAccounting.csv
Result
username,14.05.2009,12:58:41,18 username,15.05.2009,09:24:13,2 username,15.05.2009,09:25:00,37 username,15.05.2009,09:30:03,2 username,15.05.2009,09:30:29,2 ...
Where the fields contain username, date, time and the amount of printed pages.
A short description on whats being done
And that’s how you make a primitive print accounting system from data gathered in a Windows Server.
This particular example has been testen on data from a Windows 2003 Server, but I think it can be performed on other versions of Windows as well.
Tags: csv, Event Properties, Event Viewer, eventquery.vbs
Posted by Hans-Henry Jakobsen