Gempak

Before you begin

Many of you will have had some experience with Gempak. Some of you may already know that when a Gempak process crashes, the process may not die completely, even after you log off. When the computer accumulates enough zombie Gempak processes, Gempak grinds to a halt for all users. So please clean up after yourself: If you enter: ps -C gplt u and see something like

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
yourname   7570  0.0  0.0  30324   628 ?        S    18:16   0:00 gplt

and your name is yourname then you probably have a zombie gplt process. You could simply enter kill -9 7570 (and hope that you don't mistype the number). If you have many zombie processes, then you could simply enter the command gpkill to kill them all. If your office mate is named yourname then please tell your office mate to enter the command gpkill!

Likewise, if you enter ipcs and see

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status

------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x470a0007 19922952   yourname   666        1

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages
0x470a0007 12517376   yourname    666        0            0
0x440a0007 12550145   yourname    666        0            0

then you should enter:

ipcrm -q 12517376
ipcrm -q 12550145
ipcrm -s 19922952

Or you should get a life, and simpy enter the command gpcleanup.

BTW, gpkill and gpcleanup are available on Gentry, but perhaps nowhere else.

About GEMPAK

Task options

Option #1: an interactive website

{*} If you have not done so yet, visit snprof.cgi for an example of a simple gempak-powered web site. You can grab it as gpcgi.tar. Before you set it up, you may want to visit the CGIwithForms .

But notice that the examples here were csh scripts, but the snprof.cgi is a Python script. I have not yet successfully executed a gempak command from Python, so a kluge is used within Python to execute a csh script with the desired gempak commands. You are free to design your gempak-powered, interactive website. It does not need to be too original, perhaps just a "webified" version of gempak script examples, with a simple user interface that allows some choice.

Option #2: crontab (and no python)

{*} Modify the examples as seen in gempak from cron to make a few original products (plots) for your website.

Grab gpscripts.tar. Put the directory gpscripts within your home directory. Within gpscripts, there is a directory gpcronout which should be moved to your public_html directory. Read the Readme within gpscripts. After the examples are working, creatively modify them.