Thursday, November 1, 2012

How to make dosas

Get up early in the morning.

Wash 3 cups rice, 2 cups boiled rice, 1 cup pesarapappu (urad dal) and a handful of menthi seeds.
Mix them all and soak them in water in a vessel.

Come home from work in the evening, and go straight to the kitchen.

Put the seeds in a mixie along with some water. Take all the batter and put it in a vessel. Keep it next to the stove and leave it overnight for fermenting.

Next morning, add some salt, and mix.

And you are ready to start making your dosas.

Take a non stick tawa, and keep a cup of oil and a wooden ladle ready. Put the tawa on a stove on a small flame, put some oil on it and spread the oil.

Take a big ladle with a flattish base and use it to pour one cupful of batter onto the tawa. Spread it going in a circle from the center to the outside until it is reasonably thin. Don't make it too thin, or the dosa will get stuck to the tawa. Raise the flame on the stove, and wait till it starts becoming brown. Reduce the flame on the stove. Use the ladle to raise the dosa from the tawa, and turn it around. Fry it a little bit.

The first dosa is ready.

Before making the next one, take an onion, and cut off the base. Rub the onion on the tawa. This helps prevent the next dosa from sticking to it.

Enjoy your dosa! You deserve it after working so hard!

Wednesday, October 31, 2012

TWS - How to add a new workstation

Below are the steps to add a new FTA to your Tivoli Workload Scheduler environment.

Create a file, ws.txt, with the workstation definition,like this

CPUNAME MACHINE_NAME
  OS UNIX
  NODE MACHINE_NAME TCPADDR 31111
  DOMAIN MASTERDM
  FOR MAESTRO
    TYPE FTA
    AUTOLINK ON
    BEHINDFIREWALL OFF
    FULLSTATUS OFF
    SERVER D
END



Run this command to add the workstation

composer add ws.txt

To start the netman process on the workstation, login to the workstation as the tws_user, and run this command
StartUp
or
/opt/IBM/TWS/TWS/StartUp 


To create the Symphony file on the workstation, run this command on the master
JnextPlan -for 0000


To link the  new workstation to the master, run this from the master
conman 'link MACHINE_NAME'

To raise the limit of the number of jobs that can be run on the machine at one time,
conman 'lc MACHINE_NAME;40'

Once this is done, you can start scheduling new jobs on this workstation.
 

Starting with vim

To open a file in vim, at the prompt, type
$ vim test.txt

This opens test.txt if it already exists. Otherwise, it creates a new empty file named test.txt and opens it.

You can not type anything as soon as you open the file, because there are two modes in vim. And when you first open the file, vim is in command mode.

In the command mode almost every key on the keyboard is a command. For example, i is the command to start inserting text.

In the commands which follow, I will say esc before the command every time(eg: esc i), because we are usually using these commands after we finish typing something. But if you are already in command mode, you can just hit the key and there is not need to hit the escape key every time.

esc i    Insert text
Now, you can start typing in any text.

Once you have finished, press escape again, to go back to command mode.


esc :w Save File
esc :wq Save and Quit
esc :q! Quit without saving   
esc u Undo changes
esc control R     Redo changes

esc dd Delete a line
esc dw Delete a word
esc x Delete one character
esc yy Copy a line
esc yw Copy a word
esc p Paste last copy or cut contents

When you want to learn more, you can try this vim tutorial.

Tuesday, October 30, 2012

Happiness

The more I want someone to suffer, the more I suffer myself.

The more I want someone to be happy, the happier I find myself.

How to check your TWS workstation

ps -u twsuser
Displays a list of processes owned by twsuser which are currently running.

ps -aef | grep tws
Displays a list of processes which contain the string 'tws'

Any of these commands should show that these processes are running:
netman, monman, writer, mailman, batchman

$ ps -u twsadm
  PID TTY          TIME CMD
 5312 ?        00:00:22 netman
 5403 ?        00:01:30 monman
12041 ?        00:00:00 writer
12042 ?        00:00:00 mailman
12044 ?        00:00:00 batchman
$

conman start
If netman is not running, use this command to start it. If that doesn't work, try using the full path.

/opt/IBM/TWS/TWS/bin/conman start


conman 'link  MACHINE_NAME'
If netman is running, but the other commands are not running, you will have to link this workstation from the master. Login to the master domain manager as the tws_user, and run the command. Or, you can run this command to link to all machines.

conman 'link @!@'

Perforce Environment Variables

To use Perforce commands from the command line, we need to set up these environment variables.

P4USER=myusername
P4PORT=path.to.p4.com:1666
P4PASSWD=mypass

You can find a list of commands for developers here.
Admin commands are here.

TWS composer commands

Here is a list of Tivoli Workload Schedule composer commands that I have used.


composer display ws=@
Display details of all workstations.

composer display ws=MACHINE_NAME
Display details about the workstation MACHINE_NAME

composer modify ws=MACHINE_NAME
This displays a temporary file with the details of the workstation in the default editor, usually vi. You can edit the file as necessary and save it. Sample file is below.

CPUNAME MACHINE_NAME
  OS UNIX
  NODE MACHINE_NAME TCPADDR 31111
  DOMAIN MASTERDM
  FOR MAESTRO
    TYPE FTA
    IGNORE
    AUTOLINK ON
    BEHINDFIREWALL OFF
    FULLSTATUS OFF
    SERVER D
END

This file shows the definition of an FTA which is ignored by the master domain manager.
If you don't want your FTA to be ignored, remove the line with 'IGNORE' in it.

For more information, please go here.