Table of Contents

Setup whatIf? Servers

✅ CONTENT MIGRATED TO GURU ON FEBRUARY 22, 2024

Services to install

/etc/init.d/smb start 

Directories

Under the mount point(s) make directories whatif, users, models (owned by root:root with permissions 755). They can be kept on different mount points.

Make symbolic links from the file system root (ie /) to each of these directories

Make sure /tmp has a significant amount of disk space. Start with 10G but if the objects in your model are large and you run out of memory while running this may need to be increased.

Server Accounts

As root make server accounts: whatif, samm, tool with the following features:

Install severs

csh installtool.csh

Configure the inet daemon (linux)

This process is for linux

service whatif
{
        socket_type     = stream
        wait            = no
        user            = root
        server          = /whatif/whatif/progs/whatif
        log_on_failure  += USERID
        disable         = no
        cps             = 1000 30
}
 whatif          8000/tcp                        # whatif services 
/etc/init.d/xinetd restart

NOTE on older versions of linux like the VM ware images which are fedora 4 you may need to hang up the inet deamon process instead

ps -ea | grep xinet
-- get the pid and run
kill -SIGHUP <pid>

Configure the inet daemon (solaris2)

This process is for solaris2 which is similar to linux:

Change the services file here: /etc/inet/services adding a line like:

whatif          8000/tcp                        # whatif services

Change this file: /etc/inet/services/inetd.conf adding a line like:

whatif  stream  tcp     nowait  root    /whatif/whatif/progs/whatif       whatif

and restart inetd:

/usr/bin/pkill -HUP inetd

Setup error reporting and nightly cleanup

backups

It's important that the server get backed up regularly. All the model, and user accounts as well as the samm, whatif and tool account must be backed up.

checkMB

This runs the whatIf? model base checker which cleans the model base and makes sure it is in a consistent state. We recommend setting up a cron job to run nightly which emails the report to your admin.

Make a text file on your windows machine called crontab.txt that looks like the following but adjusted for your site:

0 3 * * * /whatif/samm/progs/checkMB -force <your MB name> | /usr/bin/Mail -s "checkMB report for `hostname`" <email address of admin>

Use winSCP to put move crontab.txt into the home directory for the samm account

Login with putty to the server as samm and run:

crontab crontab.txt

Check for mailing capabilities Ask your IT department to enable the server to send mail so that you will get the emails from the above command

cleanWhatifAll

This process kills all left over processes that might have gotten hung during the day. It is also a cronjob but it is run by root. You may need your IT department to set this up for you since you may not have the ability to login as root.

Make a text file on your windows machine called crontabRoot.txt that looks like the following but adjusted for your site:

0 4 * * *  /whatif/whatif/progs/cleanWhatifAll

Use winSCP to put move crontabRoot.txt into the home directory for the root account

Login with putty to the server as root and run:

crontab crontabRoot.txt

Trouble shooting whatif deamon and running SAMM

If you can login with samm as user say modelExample then do the followig

check the whatif deamon:

use a ssh connection like:

 ssh -p 8000 whatif@iseee 

then with a putty session on the server iseee do

 ps -ea | grep whatif 

If there is a process then it's fine if not then the whatif service is likely not properly configured.

check the permissions on /tmp:

The whatif deamon and samm will try to write to /tmp

Check the permissions on /tmp they should be:

 drwxrwxrwt.  12 root root 20480 May 13 22:31 tmp 

if they aren't use this command to make them so

 chmod 1777 tmp