An introduction to HP-UX

For a couple of months now, I work daily on HP’s homegrown Unix : HP-UX. Since I had no idea what this OS was about when I was a student, I think some people can be interested in discovering it with this short introduction.

HP-UX is one of the few remainig commercial Unices out there. Today, only 3 play a significant role on the enterprise OS market : IBM AIX, running on Power processors, SUN Solaris, running on SPARC and x86 processors and HP-UX, running today on Intel Itanium-based servers. The latter used to run on HP’s own processors PA-RISC (for Precision Architecture) but after HP consolidated its portfolio on the only Itanium processors, it can only be purchased on IA64 processors.
HP-UX’s last version is HP-UX 11i v3, and this version has been enhanced and extended by three following updates.

File Hierarchy Standard (FHS)

HP-UX is a System V Unix. Let’s take a look at the root directory structure:

- /dev
This directory contains all device files, representing all devices attached to the system. Raw devices can be found under /dev/rdisk, block devices are in /dev/dsk and logical volumes are also placed in /dev

- /etc
As usual on Unix systems, all configuration files are stored in this directory.
All files controlling system startup and shutdown and daemons are located in /etc/rc.config.d. For instance, to configure your network interfaces for each boot and setup routes, you will edit the file /etc/rc.config.d/netconf and insert

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=xx.xx.xx.xx
SUBNET_MASK[0]=xx.xx.xx.xx
BROADCAST_ADDRESS[0]=”"
INTERFACE_STATE[0]=”"
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=”"

- /home
The usual home directory

- /sbin
The files located here are needed at boot time. The rc script that controls the the system startup is located in this directory as well as all runlevel dependent links to scripts respectively in /sbin/rc0.d/ , /sbin/rc1.d/ , etc. All available startup scripts are located in /sbin/init.d/

- /stand
The HP-UX kernel is kept in this directory. The kernel file is /stand/vmunix and the configuration file is /stand/system.

- /net
Reserved for remote file system mount points

- /opt
This directory is used to install applications on HP-UX. Each application has its own directory hierarchy. For the Apache Webserver, this will look like the following : /opt/hpws/ (for HP web services, the root directory, where Apache, Tomcat, and others are located) : /opt/hpws/apache/bin for executable binaries, /opt/hpws/apache/etc for the config files, and so on…

- /tmp
The temporary directory where anybody can create or delete files. Unlike Solaris, this directory is not flushed after reboot.

- /usr
Most HP-UX files are located here, especially user-relates commands, libraries, doc & manual pages and contributed software.
/usr/bin : user commands, applications and utilities.
/usr/include : include and header files for programming
/usr/lib : libraries for programming
/usr/sbin : many administration commands are located here
/usr/share/man : man pages

- /var
/var contains log files distributed across different directories:
/var/adm : system administration related programs (for instance /var/adm/sw for software installation/removal, /var/cron for cron log files, etc.)
/var/opt : application-related logs
/var/spool : print services related files

Virtualization

On the virtualization side, there are one feature shipped with any HP-UX instance : the Secure Resource Partitions (SRP) which are somehow similar to the Solaris zones.
You can assign particular resources to these partitions such as CPU shares, entire CPU’s (psets), memory as well as disk bandwith. Moreover, the security features of the SRP allow you to assign disk and network access to a particular partition. On the top of that, the SRP will make sur that your files (sockets, links, whatever…) cannot be accessed from outside the partition, unless a rule has been expressly defined in the config file. The SRP’s also use the capabilities of the role-based access control (RBAC) that allow a user to gain privileges to execute a single operation (e.g. a user can get privileges to mount a disk without having to be root). This allows the admin to define precise roles and increases the accountability of each user.

Beside the Base Operating Environment (BOE), which is shipped with any HP-UX, the user can also choose between the High Availibility OE and the Virtual Server Environment OE (or the Datacenter OE that contains everything).

With the VSE-OE, you have the choice between different virtualization types :
- nPars
nPars (for Node Partitions) are only available on mid-range and high-end cell-based servers. These cells consist of a kind of a plate on which CPUs and memory reside. Npars are just grouped cells that act as a single server.
- vPars
vPars (for Virtual Partitions) are more fine-grained: you can assign here resources on a per CPU basis. They run on HP-UX 11i v1, v2 and v3 only.
- Integrity Virtual Machines
The Integrity Virtual Machines are some kind of VMware-like virtual machines. They run on the top of a HP-UX guest that emulates the hardware and can paravirtualize the I/O drivers to accelerate the I/O throughput. Sysadmins create then virtual switches that can be internal or related to a physical interface to let the IVM communicate with the outside world. For network intensive workloads, you can assign an interface to a dedicated VM over a virtual switch to enhance performance. The last feature brought by the third update of HP-UX 11i v3 is the capability for IVM to migrate from one physical host to another (just like VMotion or Citrix XenMotion do).

Software and patch management

HP-UX’s software and patch management is based on Software Depot (SD-UX). Software packages are divided in different structures:

- Filesets: a collection of files
- Subproducts: group of filesets
- Products: examples are X11, Oracle, etc.
- Bundles: group of products
- Software depot: repository where software packages are made available for download and install on clients

Software depot can be used with an X or text-only interface, or for some tasks with the command line.

You can list the currently installed software on your system by entering the “swlist” command.
To install a new package, find out first on which server server has software depots. Then enter
# swlist -l depot @ hostname
to list all available depots on this server. Since you want to install a single package, enter
# swlist -d @ hostname:/path/to/the/depot
in order to list all applications and their description.
# swinstall -s hostname:/path/to/the/depot packagename
will then install the required software, resolving automatically the software dependencies.

Patches are managed in the same way and are also installed with the swinstall command.

Applications

HP-UX and the Integrity servers are designed for mission critical applications. Running an Apache server is possible, but it is not the kind of applications you will expect to see on such machines. Databases and Java application servers are rather the sweet spots of this OS.

A lot of commercial applications are available (to name a few : Oracle, Websphere, Weblogic,…) but MySQL, Tomcat, Apache and other Free Software are also ported and maintained on HP-UX.

The default shell is the Bourne shell, set in vi mode. Coming from a Linux/Bash world, it took me a little adaptation time.

Network

The network is managed with the tools lanscan (which will give information about the interfaces) and ifconfig (that will help configuring them). As we have seen it, the interfaces can be configured automatically at boot time in the file /etc/rc.config.d/netconf.

The domain names are resolved with the following files: /etc/hosts,  /etc/nsswitch.conf

Managing disks / SAN / Filesystems

The disks files are placed in the /dev/disks/ directory, the raw devices in /dev/rdisks/ . Note that you will only have one file to manage for a presented SAN LUN. The multipathing and failover are handled at the kernel level.

The most commonly used file system is onlineJFS, which is in fact a rebranded Veritas VxFS, and offers such features as online shrinking and extending of the filesystem and online refragmenting, which are much more reliable than, for instance, for ext3.

Resources : http://www.amazon.com/HP-Certified-HP-UX-System-Administration/dp/0130183741

How to flash the BIOS of your Shuttle Barebone with Linux

As a Linux user and open-source evangelist, it is for me a pain that a hardware maker like Shuttle (which products I love by the way) is not providing any tool to upgrade the BIOS of my motherboard. Being the happy owner of a SN68PTG5, I have been terribly disappointed to see that Shuttle was only providing the BIOS upgrade for Windows users through a freeware called WinFlash.

That’s fine for users running proprietary software, but I have found a simple solution to flash your BIOS without even have to run WinFlash with Wine (which did not work for me anyway).

1) Download the BIN file provided on the Shuttle website for your version of the Shuttle

2) To install the flashrom package on Ubuntu (from the universe repository) enter

$ sudo apt-get install flashrom

3) Determine what is your BIOS by entering

$ sudo flashrom
[sudo] password for user1:
Calibrating delay loop… OK.
No coreboot table found.
Found chipset “NVIDIA MCP67″, enabling flash write… OK.
Found chip “PMC Pm49FL004″ (512 KB) at physical address 0xfff80000.
No operations were specified.

I obviously own a PC with the chipset Nvidia MCP67 and I check if this chipset is supported
I perform a backup of my existing BIOS and then I flash it

$ sudo flashrom -r backup.bin
$ sudo flashrom -wv SN68SP0P.BIN

SN68SP0P.BIN being the file downloaded in 1)

Reboot to check if you really have the latest version of the BIOS (press Del if you just see the hiding screen instead of the real BIOS screen) and you should see “SN68SP0P” on the top-left corner of your screen.

ATTENTION : to flash a BIOS can have severe consequences for your PC so be careful when doing it and do not make me responsible for having screwed your box :)

IBM to buy SUN ?

According to the Wall Street journal, IBM is in talks to buy SUN Microsystems for US $6.5 billion. This would be IBM’s biggest acquisition since Big Blue has bought the Canadian software company Cognos back in January 2008.

SUN’s stock has increased of 78% yesterday, meaning that Wall Street is taking the rumors pretty seriously.

This move would create an industry giant and would reinforce IBM on the server as well as on the software and services market. Synergy effects resulting from this acquisition would especially help IBM compete against HP on the server and storage market. SUN’s latest financial results were poor and even put in question the viability of the company itself. SUN’s customers can now be sure that one strong company will support them. On the hardware side, IBM’s and SUN’s blade market shares account respectively for 25% and 5% of the total. A consolidation of these portfolios could help IBM compete against HP’s unrivaled leadership on this fast-growing market. IBM and SUN already work together (Lotus Symphony, IBM’s collaboration suite, already integrates SUN’s open-source OpenOffice.org tools suite) and these two companies are known to be strong open-source advocates. However, this acquisition still raises lots of questions.

SUN develops (with Fujitsu) its own SPARC processor line for high-end, business-critical servers and IBM’s POWER processors are their direct competitors. Processor development is an extremely expensive process and I cannot imagine IBM maintaining two different processor lines within the same company and I assume IBM would eventually drop SPARC. So what about customers, especially in the financial and communication industries which have a big SPARC install base ?

AIX, IBM’s Unix, competes directly versus SUN’s operating system Solaris on SPARC, moreover, Solaris is a direct competitor to Linux on the mass market x86. SUN’s strategy toward Linux has always been from hesitant to hostile whereas IBM has always been a great Linux supporter. Big Blue will have to deal with a portfolio problem, as well as with internal cultural problems. Solaris’ users and admins are very loyal to it and SUN has put Solaris at the heart of its datacenter strategy. If IBM was to drop Solaris for AIX, this would mean a lot of frustration for the Solaris community.

Finally, on the database level, IBM’s DB2 and Informix compete versus MySQL and PostgreSQL (the latter not directly owned but pushed by SUN) and SUN’s open source application server Glassfish is a direct threat to IBM’s middleware technology Websphere.

A merger between SUN and Dell would have made more sense from a pure portfolio perspective :
- Dell has a strong blade and x86 portfolio
- it owns no business-critical line of servers
- it could have pushed Solaris on x86
- Dell has no footprint neither on the application, nor on the middleware, nor on the application layer.
Perhaps has IBM moved before Dell did, fearing an emerging third strong player on the datacenter market.

Even though SUN’s acquisition by IBM is not official yet, I think the two companies will have really a hard time until they are completely integrated. The two companies have different technology and business cultures and SUN’s products mostly directly compete with IBM’s. Furthermore, today’s economic climate will make things even harder, since Big Blue could loose a lot of energy for the integration instead of focusing on customers. Of course, both companies together can leverage their huge portfolio to create synergy effects, however, I doubt this would happen soon.

A comparison between PostgreSQL and MySQL

For those of you who are interested in a comparison between PostgreSQL and MySQL, HP provided an internal webinar and invited Josh Berkus, a Sun employee and PostgreSQL developer to emphasize the differences, strengths, and weaknesses of both databases. Since this talk is licensed under a Creative common license, you can download the replay and the slides.

How to become a better coach

I have found this presentation made by Marshall Goldsmith, which is entitled “How to become a better coach” very useful and intersting. It had been given for HP employees but I have found a replay put on Youtube by Google. Enjoy !

Would you trust them ?

A few months ago, the then SPD president Kurt Beck promised the voters of the Land of Hesse (the region around Frankfurt am Main in the western part of Germany) that his party would never ever agree to a coalition with die Linke and the Grünen (Greens) to get rid of the current CDU (Christian-democrats) minister-president Roland Koch. The strategy of the SPD had been clear since Germany’s reunification : co-operation with die Linke was only possible in the eastern part of Germany, where die Linke is very strong.

Mr Koch is known as a leader of the conservative wing of the CDU. He was elected in 1999 with the support of the FDP (liberals) and centered his last campaign on the “young criminal foreigner” but eventually failed to win this election.

The results of the election were the following :
- die Linke 6 seats
- SPD 42 seats
- Greens 9 seats
- FDP 11 seats
- CDU 42 seats

That is to say : the CDU/FDP coalition does not have enough seats to remain a majority. Since Mrs. Ypsilanti, the leftish SPD-chief in Hesse literally hates Mr. Koch, a grand coalition like at federal level seems impossible. If the SPD wanted to rule the Land, they would have to make a coalition with the Grünen and die Linke, breaking their pre-electoral promise. Mr. Koch finally remained minister-president of the Land, with a minority government in the parliament.

The Hesse-SPD shyd away from forming such a government at the beginning, probably afraid of the consequences for their party for the federal election next year. Such a complete U-turn in their relationship with die Linke in west Germany would have resulted in very bad poll ratings. However, after months of hesitations, Andrea Ypsilanti, the SPD-chief in Hesse, finally decided to push her candidature as minister-president as part of a government tolerated by die Linke, which would have put the far left-wing party in a very strong position. The vote would have happened- surprise surprise- on November 4th, during the American presidential election. I guess Mrs. Ypsilanti could never have done that without the support of the SPD-board.

Unfortunately for Mrs Ypsilanti but happily for the democracy, 4 SPD-deputies of the Landtag (parliament) officially refused to give her their support, putting an end to her dreams of a SPD-ruled Hesse.

This courageous decision now raises two questions :
- what is going to happen in Hesse in the next months? It is likely that a new election will take place and the the SPD will pay for having broken their pre-electoral promise. This leads me to the second point:
- how could the German people now trust the SPD, if one of their most important regional leaders, presumably supported by the national board, does not respect the voters and what she stood for before the elections? One can object that betrayal is part of the political game. I am not convinced that people who commit such acts of betrayal to their own voters deserve to be elected to rule the whole country.

Enable Intel VT on a HP laptop

Intel VT technology is especially useful if you want to use virtualization technology such as Xen or KVM.
I personnally had the following problem after trying to insert the kvm-intel module on my Ubuntu 8.04 :

sudo modprobe kvm-intel
FATAL: Error inserting kvm_intel (/lib/modules/2.6.20-6-generic/kernel/drivers/kvm/kvm-intel.ko): Operation not permitted

In order to fully use your Intel processor on a HP laptop, follow the following steps :

- boot your computer
- when the BIOS window shows up, enter the BIOS manager
- enable the Virtualization technology in the BIOS menu
- save the changes and exit
- shut down your computer
- remove the battery and put it back in your PC
- boot your computer

and Intel VT should work without problem.

The cynical Mr. Gysi

Gregor Gysi is the co-head of the German far-left party “Die Linke” founded in 2007 by two separate parties:
- the PDS, formerly known as SED (Sozialistische Einheitspartei Deutschlands), in the Eastern part of Germany. This was actually the communist party that ruled the German Democratic Republic during 40 years and put many people in jail for trying to cross the German-German border, or  for wanting a real democratic state.
- the WASG (Wahlalternative Soziale Gerechtigkeit) which is a party founded by West-German social-democrats who quit the SPD, because they felt deceived after it introduced its “Agenda 2010″. This introduced, for example, harsher conditions for unemployed people und helped  make the German employment market much more flexible.

This party is now competing for the first time against the conservative party CSU (Christlich- Soziale Union) for the Bavarian regional elections. The CSU has governed Bavaria for more than 40 years with an absolute majority in the parliament and faces not only internal problems within the party structures, but also a increasing loss of voter sympathy.

Recently, in an interview during the campaign, Mr Gysi said “these structures [of the CSU], I tell you, I know them enough from the German Democratic Republic, even if it was under another form. Absolute power leads to political power misuse”.
The co-head of “Die Linke” was a member of the SED since 1967 and knows exactly how the GDR system worked: the elections were completely unfair (the SED and its allies always won 99,99% of the votes); moreover, a secret police, the infamous Stasi (Staatssicherheit), spied on the complete population, based primarily on information provided by IM (inoffizielle Mitarbeiter) : normal people who sent reports about their neighbors to the Stasi. Last but not least, nobody could get out of the country without special authorization.

I have been shocked by this comparison. The previous CSU governments were freely elected. For years they brought prosperity to Bavaria. Bavarian people have the right to go outside the borders of their Land. Of course, not everything is perfect there, however, I guess that a lot of Eastern German people would have rather supported the “political power misuse” of the CSU rather than the SED’s. And if Gysi was at that point aware of those power misuses, why did he not call for change within a SED he belonged to during 22 long years? Where was he when some courageous citizens dared to face this dictatorship ? His voice was only heard at the very end of the GDR, when West-Germany was about to reunite both countries, to be clear: when everything he fought for was over.

Mr. Gysi’s courage to attack the CSU is much more impressive than his fight for civil liberties in the former Eastern Germany. I hope that German electorate will not forget that Mr. Gysi is shamelessly better at attacking democratic elected parties than at criticizing the apparal of state that helped him and his fellow communists to rule over a part of Germany for 41 years.

Open-source software and Linux at HP

As an open-source supporter, I am glad to have the possibility, at my workplace, to work with software such as GNU/Linux, Firefox and many others…

The usage of Linux is fostered within the company : each employee has access to LinuxCOE (which is a HP product and licensed under the General Public License) and can install his favorite distribution pretty easily on his personal computer. Ubuntu, openSUSE, Gentoo and others are at disposal and HP even provides licenses for SUSE and Red Hat.
Since MS Office is the most widespread office suite and most of my colleagues have Windows XP, it is unfortunately hard to work without it. With Crossover, which is a product based on Wine, allows me to use the MS Office suite as well as Internet Explorer 6 in some cases (*sigh*…).
The officially supported instant messaging protocol was Jabber, which is ideal to use in a GNU/Linux environment (for instance with Pidgin) but has been changed for Microsoft Communicator that I use via its web-based interface.
Due to the massive demand of employees, Firefox is officially supported by the internal IT service, in addition to IE.
On the customer side, HP is committed to Linux : the ProLiant servers are the most sold servers running GNU/Linux on the world and the Integrity servers shipped with the Itanium processors also run RHEL 5 and SLES 10 SP1. Moreover, there are lots of people at the company working as developers for open-source projects or kernel developers.

Nevertheless, the situation is not perfect for GNU/Linux or alternative software desktop users.
Linux is not officially supported by HP’s IT and there is an evident lack of communication around LinuxCOE. I even personally made senior technical consultants aware of it.
Not all internal web-based applications run correctly with Firefox and some multimedia streamed videos are encoded with codecs Linux cannot play.
I cannot share my calendar with my colleagues because Evolution does not work perfectly with Exchange 2007 (even if my e-mails and meetings invitations work fine) and there is no native application to take part to Netmeeting conferences (did someone try this solution ?). The move to Vista and MS Office 2007 is also planned but, so far, Crossover does not support this version so I hope there will be a workaround until here.

So far, using GNU/Linux as a primarily desktop operating system as an HP employee was not hard and I have been pleasantly surprised by the LinuxCOE offering, among other things. Even though I experience a little loss of productivity, I prefer to stay a little longer at work than use an other OS than GNU/Linux. If things need to do something which is really urgent and only doable under Windows, I have a VMware virtual machine ready to boot, however, this happens really rarely. So if you are hesitating to apply for a job or an internship at HP, thinking that you will not have the right/possibility/authorization tu run GNU/Linux, I hope this article will help to change your mind.

Of course, HP is a huge company and from an IT perspective, support multiple operating systems is a big effort. One the other hand, this is the best example of the advantages of respecting standards (real ones…) in order every user to have access to the information, independently of his OS.

Citrix certified administrator XenServer Enterprise Edition 4

After I wrote my degree dissertation about Xen, I took a Citrix Xenserver 4.1 training and I successfully passed the Xenserver certification.

Even if I disagree on the evolution of the project (Red Hat resigned from it, Linux distributions are optionally supported if you install the Linux pack from another DVD and, as we expected from Citrix, virtual servers running Windows are the priority of this platform), I already have a good knowledge of this technology and since it will be soon part of HP’s Insight dynamics, a management software managing virtual machines, I thought it was a good opportunity to go on with Xen. Moreover, it is still an open-source project and that is the reason why a VMware training would not have interested me that much.

Finally, I hope that HP will continue to support other virualization projects such as KVM, which is already part of the Linux kernel, and is really being pushed forward by IBM and Red Hat, for example.

←Older