Jul 29, 2008

Using / Migrating Libraries defined in Netbeans on different computers

I have the problem to use some Netbeans Projects on differnt Computers/Platforms ( Solaris/Windows ).
So the defined Libraries are not available on all.
Here ( Migrating Libraries between different Installations of Netbeans ) is described how to migrate.

The only thing is to change the path in the xml descriptions if the mounts are available on Solaris and
Windows with different pathes.

Jul 28, 2008

Netbeans 6.1 Java Editor RefCard

On refcardz.com or http://refcardz.dzone.com/ is a free reference card for the Java Editor in
Netbeans 6.1

Jul 27, 2008

Adding a JMS Ressources to a WebSphere 6.1 Intance.

It was a troublesome way to add JMS resources to a the running websphere application server trial.

The first thing was the usage of netbeans with the Websphere on a Windows XP platform.
First installation was with security. This is a problem in netbeans, because there is no access control allowed.

Before creating JMS resources,a bus must be created.
The newly created bus needs a member - the current server and a file based message store and the message-engine must be started ( may need a restart of the app server ).
Add a destination which provides a message store, which provides a storage area.

After this in the Resources/JMS/ActivationSpec, an activation spec was defined, which references the bus, type, and destination and the JNDI-Name for referencing this activation spec.
Then ConnectionFactories and Queues or Topics can be defined.

My larger problem was the missing definition of the bus including a bus member and destinations. The Activationspec is referenced form the deployment descriptor.

Jul 25, 2008

Informative document about Project Crossbow for Network virtualization in solaris

Found yesterday a link in BigAdmin about an informative document with examples for the
project Crossbow developed in OpenSolaris , which virtualizes the network interface ( NIC ), with software routers and so on.
It contains a lot of command line examples how to use it.
Flowcontrol about Ressource and bandwith control is also a little bit covered.

It contains also an example about connecting multiple networks in a T2000 system via zones.
Here is the link for the PDF document.

Jul 24, 2008

Cake "Schwarzwälder Kirsch" with turtle




the turtle on the "Schwarzwälder Kirsch" cake

undo a just added element from SubVersion

I had just the problem to add a directory and after adding, I detected that there were also
some log files, which should not be in the repository of SubVersion.

svn add server


Now I just wanted to undo the just added files.

The solutions is

svn revert


The detailed describtion I've found from this Blog.

Jul 22, 2008

updated firefox on OpenSolaris Nevada Build 91

Also updated the firefox installation on my laptop running
Nevada Build 91 with firefox 3.0.1 from mozilla.com.

Didn't have any problems till yet, while writing directly from this version.

Solaris 10 updated with Firefox 3.0.1

Updated our SunRay-Installation with Solaris 10 U4 with the tar-File from
mozilla to install firefox 3.0.1

Many thanks to the

Sun Desktop Beijing Team

for supplying this compilation.

We use CUPS on the installation as a print server. Therefore I have to change
the print command every usage, because currently I haven't found the
correct setting to keep
/opt/sfw/cups/bin/lp -c -d rogDev
as LPR command.

Jul 18, 2008

SiS 900 ethernet driver in Solaris

On my PC I have the SiS 900 onboard ethernet driver. This did not work reliable
in OpenSolaris.

After some search I found a disccusion on opensolaris.org with a link to upgrade
the driver.

Here is the link to the driver, which is a little bit newer than my installed version.

sfe driver link

This allowed the upgrade of the installed image with a reliable network connection.

Upgrade local installation of OpenSolaris to Build 93

Yesterday evening I upgraded my PC to the last Build 93 in the package-system
of OpenSolaris.

First Problem of the old PC was the network. It has a SiS900 network card.
It started up in the last update to Build91, but after some time there was no
connectivity, although a snoop showed package transfere when pinging the
router.

So I switched back to the original 2008.05 Build, where I installed the network
driver sfe from Free NIC Drivers for Solaris.
From here I upgraded the system by the commands from the Announcement-List of OpenSolaris.

After this I installed the sfe-Driver again and the network worked.
The difference is, that per default the version 2.6.1 is available, but the
download site had the 2.6.1t10.
This solved the network connectivity.

The command to list the boot environment
beadm list


After this I deleted the upgrade to Build 91

beadm destroy opensoLaris-1

Jul 17, 2008

Switching between multiple network configurations in OpenSolaris - inetmenu

On my laptop, I have SXCE running and also the package inetmenu from
opensolaris.org.

inetmenu enables to use different network profiles on a solaris installation.
You can activate a profile by commandline or via a gui provided by inetmenu.
It is also described how to setup RBAC to let normal users start inetmenu and
configure the network.

So I have a profile for the LAN interface in the company and a profile for the
WLAN-Interface for using it at home.

apptrace, sotruss another two tools for tracing in the userland

This are two other tools you can look for, when you're interested into tracing
of applications in the userland of a process.

apptrace
sotruss

tracing library calls in Solaris with truss

It is possible to trace systemcalls with truss in Solaris as well known, but it is also possible to trace calls in a shared object. As the example below shows, all calls in the libc Library are traced. It is also possible to trace only a specified function like


truss -u libc::memcpy


bash-3.2$ truss -u libc:: ls
execve("/usr/bin/ls", 0x0804705C, 0x08047064) argc = 1
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xCEBF0000
resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12
resolvepath("/usr/bin/ls", "/usr/bin/ls", 1023) = 11
xstat(2, "/usr/bin/ls", 0x08046D08) = 0
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
sysconfig(_CONFIG_PAGESIZE) = 4096
xstat(2, "/lib/libc.so.1", 0x08046468) = 0
resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14
open("/lib/libc.so.1", O_RDONLY) = 3
mmap(0x00010000, 32768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xCEBB0000
mmap(0x00010000, 1368064, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xCEA60000
mmap(0xCEA60000, 1258857, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_TEXT, 3, 0) = 0xCEA60000
mmap(0xCEBA4000, 30506, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_INITDATA, 3, 1261568) = 0xCEBA4000
mmap(0xCEBAC000, 4416, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xCEBAC000
munmap(0xCEB94000, 65536) = 0
memcntl(0xCEA60000, 202492, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
/1: -> libc:__tls_static_mods(0xcebf0308, 0x200)
/1: -> libc:lmalloc(0x200)
/1: -> libc:getbucketnum(0x200)
/1: <- libc:getbucketnum() = 3 /1: -> libc:initial_allocation(0xceba9c40)
/1: -> libc:__systemcall(0x8046c38, 0x73, 0x10000, 0x6000)
/1: mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xCEA50000
/1: <- libc:__systemcall() = 0 /1: <- libc:initial_allocation() = 0xceba9dc0 /1: <- libc:lmalloc() = 0xcea51800 /1: -> libc:tls_modinfo_alloc(0xceba9f40, 0x0)
/1: -> libc:lmalloc(0x400)
/1: -> libc:getbucketnum(0x400)
/1: <- libc:getbucketnum() = 4 /1: <- libc:lmalloc() = 0xcea52000 /1: <- libc:tls_modinfo_alloc() = 0xcea52000 /1: <- libc:__tls_static_mods() = 0 /1: munmap(0xCEBB0000, 32768) = 0 /1: -> libc:libc_init()
/1: -> libc:atexit(0xceae51e0)
/1: -> libc:lmalloc(0x8)
/1: -> libc:getbucketnum(0x8)
/1: <- libc:getbucketnum() = 0 /1: <- libc:lmalloc() = 0xcea50000 /1: <- libc:atexit() = 0 /1: -> libc:__getcontext(0x8046ab0)
/1: getcontext(0x08046AB0)
/1: <- libc:__getcontext() = 0 /1: -> libc:lmalloc(0x460)
/1: -> libc:getbucketnum(0x460)
/1: <- libc:getbucketnum() = 5 /1: <- libc:lmalloc() = 0xcea52800 /1: -> libc:getrlimit(0x3, 0x8046aa8)
/1: getrlimit(RLIMIT_STACK, 0x08046AA8) = 0
/1: <- libc:getrlimit() = 0 /1@1: -> libc:getpid()
/1: getpid() = 1916 [1915]
/1@1: <- libc:getpid() = 1916 /1@1: -> libc:lmalloc(0x4)
/1@1: -> libc:getbucketnum(0x4)
/1@1: <- libc:getbucketnum() = 0 /1@1: <- libc:lmalloc() = 0xcea50040 /1@1: -> libc:___lwp_private(0x0, 0x1, 0xcea52a00)
/1: lwp_private(0, 1, 0xCEA52A00) = 0x000001C3
/1@1: <- libc:___lwp_private() = 451 /1@1: -> libc:set_curthread(0xcea52a00)
/1@1: <- libc:set_curthread() = 0xcea52a00 /1@1: -> libc:mutex_setup()
/1@1: <- libc:mutex_setup() = 0xcea52a00 /1@1: -> libc:atfork_init()
/1@1: -> libc:pthread_atfork(0xceac8240, 0xceac8290, 0xceac8265)
/1@1: -> libc:mutex_lock(0xceba8300)
/1@1: -> libc:mutex_lock_impl(0xceba8300, 0x0)
/1@1: <- libc:mutex_lock_impl() = 0 /1@1: <- libc:mutex_lock() = 0

Jul 16, 2008

firefox 3.0u1 for Solaris 10 SPARC FCS from mozilla.com and printing

After Installaing I just see"print LPR" and "print to file".
Using print lpr I had to use the lp command from cups, because I'm using
cups here, otherwise I had to kill the browser.

Next step will be to get a list of printers again like with the 2.0-Series.

Acquire the used databases from nsswitch.conf

With the command "getent" you can acquire any database and the tool
uses the configuration form the nsswitch.conf to retirve the data.

e.g.
getent hosts
shows you all resolveable hosts in NIS,DNS,files or whaterver you defined.

Jul 15, 2008

VisualVM - Java tool for inspecting memory/gc/...


Last Weekend I red about a "new" tool called VisualVM.
It is for Java processes to inspect with a lot of support.
There are also some plugins, but you need direct internet access for
download, because the proxy does not work.
On the picture beside you see the plugin
VisualGC which shows everything about
the memory management.


The Tool is already integrated into the JDK 1.6 Update 7 version as jvisualvm.
Here the user ressources under $HOME/.visualvm is 6u7, whereby the tool downloaded from VisualVM-Website is in the directory 1.0. But as I've tested you can copy the content of 1.0 to directory 6u7 and it works.

Jul 14, 2008

Resolution setting on a SunRay

Today a colleague came back after one year in germany. Now he had problems
setting the resolution to 1600x1200 on the SunRay with the new TFT we got
during the year.

I deleted all settings from the SunRay 4 Database and from the SmartCard-Token, but it was not possible to show the 1600x1200 over the whole screen.
The desktop was only shown on about 2/3 of the screen.

After changing the SmartCard it was possible again. It was also regardless if I switched to an other Desktop-Unit.
After using the new card everything was fine.

The other problem was to switch a Desktop-Unit as Card-Reader. This required a cold restart of the SunRay-Services which was not possible during the day.

Jul 13, 2008

Visited Seefestbspiele Mörbish - Im weißen Rössl

Yesterday we visited "Im weißen Rössl" at Mörbisch/Austria.
It was really nice to see. An OpenAir act with about 6000 visitors and a a stage in the lake. Weather
was good, also clouds and wind came in, there was no rain but lighting was around the area.


Jul 11, 2008

new cakes




Hello Kitty Cake

Eclipse 3.4 Ganymed on Solaris 10 SPARC

Today I installed the Eclipse 3.4 Version on our SunRay-Severs ( SPARC - Solaris 10 ).
The actual CDT 5.0.0 and the last subversive Plugin. But neither the CDT nor
subversive is recognized.

I'm happy to use netbeans for myself give it a try. It runs on windows,linux and solaris x86 and SPARC.

Jul 10, 2008

Accessing ZFS snapshots

Per default the snapshot directory is not visible in the filesystem, but
can be used by the zfs command.

# zfs list
NAME USED AVAIL REFER MOUNTPOINT
pool/zones/soldemoprogvsk@zfs-auto-snap:daily-2008-07-09-00:00:00 316K - 90,9M -
pool/zones/soldemoprogvsk@zfs-auto-snap:daily-2008-07-10-00:00:00 206K - 90,9M -
pool/zones/soldemoprogvssap 278M 8,13G 269M /zones/soldemoprogvssap

Here are the zfs filesystems with the snapshots. Listing the directory reveals, that the snapshot is not visible.

# ls -al /zones/soldemoprogvssap
Gesamt 14
drwx------ 4 root sys 4 Mrz 21 08:51 .
drwxr-xr-x 10 root sys 10 Jul 8 13:23 ..
dr-xr-xr-x 3 root root 3 Mrz 21 08:48 .zfs
drwxr-xr-x 12 root root 51 Mrz 21 08:53 dev
drwxr-xr-x 20 root root 24 Mai 6 17:51 root


Now we fetch the property defining the visibility:
# zfs get snapdir pool/zones/soldemoprogvssap
NAME EIGENSCHAFT WERT QUELLE
pool/zones/soldemoprogvssap snapdir hidden local

Now we set the property to visible:

# zfs set snapdir=visible pool/zones/soldemoprogvssap


And here is the content:

# pwd
/zones/soldemoprogvssap/.zfs/snapshot/zfs-auto-snap:daily-2008-07-09-00:00:00
# ls
dev root

As you see, there is the hidden directory .zfs accessbile. Now we can copy
old files from the snapshot.

makeing regular snapshots of a ZFS filesystem

I've used a valuable tool found on Tim Fosters Blog.

It is named zfs-autosnapshot. After downloading the package you
compile it with make and after this install the generated package.

After this there are some entrie in the crontab table for executing the
snapshots.

But to allow this you have to set a property on the filesystem from which you
like to take a snapshot.
The services in the SMF have also some options to finetune.

In this way I have set some filesystem to do a daily snapshot and preserving
7 Snapshots.

Have a look at the blog.

Jul 9, 2008

Found a directory-Sync tool for Windows as replacment of rsync used on the UNIX platforms

After a long search I stumbled over a Java-tool on Sourceforge which
can sync directories

directorysync

This tool allows to parametrize a profile of directries which should be
synchronized.

It is possible to do a dry run and after this to a real synchronisation
depending on some parameters to set.

Very useful for me.

using apache as a proxy


During the phase of installing a new mantis on a Solaris V20Z in solaris 10 I had
to deploy some applications on a different server in different solaris 10 zones.

mod_proxy modules was used to redirect the request to the different zones.

«Location /test »
ProxyPass http://new.location.com/location
ProxyPassReverse http://new.location.com/location
«/Location»

This allows the access directly from the new server, but get’s the data
from a different host.

The server was installed with Solaris 10 U4 and the coolstack from Sun, which provides Apache, MySQL and PHP5 as an optimized package for Solaris 10 x86 and SPARC.

PuTTY for UNIX Platforms -secpanel

Found in the actual Linux-Magazin a hint to secpanel, which is a GUI based on

Tcl/Tk and provides a profile colleciton for hosts to connect to with a lot of
options for ssh. It directly supports scp over the gui with a display like
norten commander.

Upgrade OpenSolaris SCXE Installation to new Nevada Build


After copy /b image1 + image2 + image3 image.iso on the
windows platform I created a full ISO image of the DVD on my new
external 500 GB USB2 Drive.
After booting the laptop to my last installed Build and connecting the USB-Drive, I mounted the iso image for direkt access.

lofiadm -a /absolute/path/to/iso-image
mount -F hsfs /dev/lofi/1 /mnt

After mounting I started the upgrade via the valueable live upgrade.
Installaing the live-upgrade packages in the actual running instance, the
live upgrade was started:

luupgrade -n SNV_NEW -s /mnt

after some time of running an

luactive SNV_NEW

switched to the new boot-environment.

umount /mnt
lofiadm -d /dev/lofi/1

cleanup of the iso-mount and successful boot the new
environment was the result.

Cakes baked and designed by us

skull-cake for a birthday
a banana cake
a sponge bob birthday cake
A cake for confirmation

simple Clone a Solaris 10 zone

A simple way to create a new virtual server on a solaris 10 update4 installation.

zonecfg -z originalZone export -f /tmp/zone.cfg


now edit the zone.cfg to suit your needs and create the zone

zonecfg -z newZone -f /tmp/zone.cfg


now clone the zone and boot it afterwards:
zoneadm -z newZone clone originalZone
zoneadm -z newZone boot


now the zone ( new virtual server ) is ready you have to login into
the console to set the parametrization ( sys-config )

zlogin -C newZone


After this you have a new server available with the software already installed
in the original zone. Took less than half an hour!

Introduction

I'm using Solaris since 1993. During this time it was named SunOS.
At this time I was an employee of Siemens Austria where a Power System
Control System was developed and used worldwide on the SPARC Hardware running on one or a maxium of 128 Servers. The functionality could be distributed as need.

Now here in our company I'm a "Middleware" Developer for our own products and I'm also administrating our Solaris and Linux boxes. In my area is also the
SunRay installation with a failover group.
Firewall's, e-mail server, VPN, ...
We have currently Solaris 8/9/10 SPARC and Solaris 10 x86 in use.
My Laptop runs currently SCXE Build 91.