Integrating Xgrid into Cocoa Applications, Part 2
Subject:   Node List
Date:   2004-05-25 11:32:55
From:   drewmccormack
Response to: Node List

You can get the information you need for the drawer using various xgrid options. Here is a bit of output to various commands I issued on my iBook:

drew ibook: xgrid -h localhost -node list
nodeIdentifierArray = ("Drew McCormack\U2019s Computer", DrewMcCormacksiBook);
nodeListIdentifier = Rendezvous;
drew ibook: xgrid -h localhost -node status -id DrewMcCormacksiBook
currentCPUPower = 0;
currentTaskCount = 0;
nodeName = DrewMcCormacksiBook;
nodeState = Available;
drew ibook: xgrid -h localhost -node info -id DrewMcCormacksiBook
{maximumCPUPower = 600; maximumTaskCount = 1; nodeName = DrewMcCormacksiBook; }

As you can see, you can list the nodes that a controller has access to. You can also get info about each node in the list, with -node info, and you can see whether a node is available with -node status.

You can use this info from Cocoa using NSTask. Note that output of these commands is in the form of property lists, so you can easily read the information into Cocoa using methods like dictionaryWithContentsOfFile:.

Hope this helps.