IBM Support

Nigel's wiggly worms program

How To


Summary

I use nworms to demo Live Partition Mobility to show the speed up on the newer servers.

Objective

Nigels Banner

Steps

Nigel's wiggly worms program

By popular demand, here is the worms program that I use to demonstrate

  • Live Partition Mobility (LPM)
  • Live Application Mobility - also called WPAR Relocation

It is a simple application to setup (single binary, just run it) and makes the point in a demonstration.

The original worms and rain programs were used decades ago to test newly compiled and developed UNIX kernels. These programs were left running over night and if still running in the morning you were confident the interrupt handling, tty drivers, curses and basic kernel functions were OK. It version completely different code but with a few additions by adding a few stats at the top left over the top of the worms:

  • The worm movement speed in updates per second - a crude performance illustration
  • Machine Serial Number
  • Logical Partition (LPAR) number
  • Logical Partition (LPAR) name (as provided by the uname API = part of the uname -m output)

If the serial number or LPAR name changes the worms change colour to highlight that Mobility or Relocation has happened and recognised by the application. This change can happen a couple of seconds after the event.

Each worm uses a different letter so we are limited to 50 worms and the program uses curses for efficiency. The worms are controlled using random numbers but with a tenancy to favour one direction for a while - otherwise they tend to just hover over one area (boring).

Help

For help just type: nworms -?

  # nworms -?  
nworms version 18.1 
Summary  		 Watch those worms wriggle :-)  		 
Displays the worm speed, Serial number, LPAR number & name  		 
The worms change colour, if the serial-number or LPAR-name change    

nworms: [-?] [[worms] speed]  		 
-?		 This help information  		 
worms		 The number of worms between 1 & 50 (default 2)  		 
speed		 Worm movement speed between 1 & millions (default 1024)  		 		 
    - use this to slow the worms to a realistic speed  		 		   
      so you can see them wriggling  

Examples:  		 
nworms          (defaults to 2 worms & normal speed)  		 
nworms 15       (15 worms & normal speed)  		 
nworms 20 10000 (20 worms & ten times slower)    
Stop with Control C
      Developer Nigel Griffiths

Download:

Notes:

  • Don't forget ftp in binary mode and make the file executable with:
  • chmod ugo+x nworms
  • Do NOT leave nworms running by accident as it will hammer one whole CPU.

Performance:

  • If you do not slow the worms down, you are really testing your tty driver and network speed (assuming ssh/telnet) rather than the CPU performance.
  • I think 5 to 10 updates per second make a nice demo.
  • For processor and GHz details use: lsconf

Screen shot:

worms in action

Additional Information


Other places to find content from Nigel Griffiths IBM (retired)

Document Location

Worldwide

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"","label":""}],"Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions"}]

Document Information

Modified date:
01 January 2024

UID

ibm11116345