Thursday 21 April 2011

Re-installing vmware modules on linux

This took me a little while to find. If you start up vmplayer after a reboot and the vmware kernel modules are missing viz. not loaded, the easiest way to solve this is :-

sudo vmware-modconfig --console --install-all

You should get something like ...

Stopping VMware services:
   VMware USB Arbitrator                                               done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
Installed vmmon pre-built module
Installed vmnet pre-built module
Installed vmblock pre-built module
Installed vmci pre-built module
Installed vsock pre-built module
Starting VMware services:
   VMware USB Arbitrator                                               done
   Virtual machine monitor                                             done
   Virtual machine communication interface                             done
   VM communication interface socket family                            done
   Blocking file system                                                done
   Virtual ethernet                                                    done
   Shared Memory Available                                             done


Changing the username, UID and GID default rules on linux

I always forget this one but certain companies I work for have a username, UID standard which doesn't comply with the POSIX norm.
I've seen several people on forums saying they have hacked the tools to accomplish this but there is no need. Just edit /etc/login.defs

BTW, to see what files useradd looks at, just use :-

strace -e trace=file useradd somebody

Forcing ethernet duplex and speed during startup on linux (Suse)

a) Modify /etc/sysconfig/network/config file to have
  following options set to 'yes'.

GLOBAL_POST_UP_EXEC="yes"
GLOBAL_PRE_DOWN_EXEC="yes"

b) Create a script file (E.g, ethtool-settings) in
  /etc/sysconfig/network/if-up.d directory with required ethtool commands.

E.g, the file can contain the following ethtool command -

  /usr/sbin/ethtool -s ethX speed 10

c) Set the mode of the file to 755.
#chmod +755 ethtool-settings

Converting java JKS key store DER format to PEM

openssl x509 -out ca.pem -outform pem -text -in ca.der -inform der

after extracting using keytool obviously.

Also see http://mark.foster.cc/kb/cacert-keystore-extraction.html

Syncing a clearcase view with a changed stream

cleartool chstream -gen viewname
cleartool setcs -stream

Using tcpdump and iptrace on AIX

tcpdump -s 0 -i en1 -n tcp port 8766 and ip proto \\tcp and ip host nodename1 and nodename2 > 8766-2.tcpdump

iptrace -a -i en2 -b -d nodename1 -p 22 /tmp/22iptrace.out

For iptrace, you have to kill -15 to end the trace. iptrace output is usable in wireshark/ethereal.

Creating a new perl module

Use something like :-

h2xs -X IB::Soap

AIX CPU Information

Any of the following:
lsdev -Ccprocessor | grep -ci available

lparstat -i | grep "Online Virtual CPUs"
Online Virtual CPUs : x

The following will tell you what the specification is...
lsattr -El proc0

Wednesday 20 April 2011

41 and an era

8 track. Remember that? I do. My dad was a mechanic and a music enthusiast. More to the point, he was country mad. That's what made him having Queen's greatest hits on it even harder to believe! I was 4 - or 5, or even maybe older. Who cares. It was a time of music revolution. We were all encouraged to learn an instrument.. Get involved. So we did. Top of the pops reigned. MTV was non existent. We remembered ABBA. Boney M was brilliant. B sides were as good as the A. Then cassettes came. Duran Duran. OMD. Depeche Mode. Dire Straits. Your brother gets a job and buys you Simple minds. Life would change forever. You miss Queens last ever live gig because you were too young. For the one split second in your life, you hate your mother. You state that when you are older, you will buy every single going. Then CDs happen. And you buy all your best albums all over again. The pixies turn up, and the Smiths, and you buy the Springsteen live double album all over again. Then your tape of Alchemy Live finally can't take any more patching so you buy the CD. Your collection is pretty awesome so you decide that you've had enough and live music is the way to go - for quite some time. Many beers later, you come out of your shell and realise that, once again, all the rules have changed. MP3 is what the game is all about. But wait, apparently, some sneaky b has stolen a quick one and started charging you for having what you already own in some new digital format, which isn't even as good as the one you have! Sod him. Let's try OGG or FLAC or whatever it is they call it. Sod this. Live is the way to go again. Steve comes along and convinces the masses that iTunes is really what is needed. Hmm, ok, fed up with all this fragmentation. After all, Coldplay is the only thing that has changed since Belfast Child - or is that the same? But wait, Sergey has a different view ...
Now, I've got a phone that can do the lot - except it's still not the same as seeing them live. Different skin, same purpose. True to life really ...