This file is indexed.

/usr/lib/xpbsmon/node.tk is in torque-client-x11 2.4.16+dfsg-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
#         OpenPBS (Portable Batch System) v2.3 Software License
# 
# Copyright (c) 1999-2000 Veridian Information Solutions, Inc.
# All rights reserved.
# 
# ---------------------------------------------------------------------------
# For a license to use or redistribute the OpenPBS software under conditions
# other than those described below, or to purchase support for this software,
# please contact Veridian Systems, PBS Products Department ("Licensor") at:
# 
#    www.OpenPBS.org  +1 650 967-4675                  sales@OpenPBS.org
#                        877 902-4PBS (US toll-free)
# ---------------------------------------------------------------------------
# 
# This license covers use of the OpenPBS v2.3 software (the "Software") at
# your site or location, and, for certain users, redistribution of the
# Software to other sites and locations.  Use and redistribution of
# OpenPBS v2.3 in source and binary forms, with or without modification,
# are permitted provided that all of the following conditions are met.
# After December 31, 2001, only conditions 3-6 must be met:
# 
# 1. Commercial and/or non-commercial use of the Software is permitted
#    provided a current software registration is on file at www.OpenPBS.org.
#    If use of this software contributes to a publication, product, or
#    service, proper attribution must be given; see www.OpenPBS.org/credit.html
# 
# 2. Redistribution in any form is only permitted for non-commercial,
#    non-profit purposes.  There can be no charge for the Software or any
#    software incorporating the Software.  Further, there can be no
#    expectation of revenue generated as a consequence of redistributing
#    the Software.
# 
# 3. Any Redistribution of source code must retain the above copyright notice
#    and the acknowledgment contained in paragraph 6, this list of conditions
#    and the disclaimer contained in paragraph 7.
# 
# 4. Any Redistribution in binary form must reproduce the above copyright
#    notice and the acknowledgment contained in paragraph 6, this list of
#    conditions and the disclaimer contained in paragraph 7 in the
#    documentation and/or other materials provided with the distribution.
# 
# 5. Redistributions in any form must be accompanied by information on how to
#    obtain complete source code for the OpenPBS software and any
#    modifications and/or additions to the OpenPBS software.  The source code
#    must either be included in the distribution or be available for no more
#    than the cost of distribution plus a nominal fee, and all modifications
#    and additions to the Software must be freely redistributable by any party
#    (including Licensor) without restriction.
# 
# 6. All advertising materials mentioning features or use of the Software must
#    display the following acknowledgment:
# 
#     "This product includes software developed by NASA Ames Research Center,
#     Lawrence Livermore National Laboratory, and Veridian Information
#     Solutions, Inc.
#     Visit www.OpenPBS.org for OpenPBS software support,
#     products, and information."
# 
# 7. DISCLAIMER OF WARRANTY
# 
# THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT
# ARE EXPRESSLY DISCLAIMED.
# 
# IN NO EVENT SHALL VERIDIAN CORPORATION, ITS AFFILIATED COMPANIES, OR THE
# U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 
# This license will be governed by the laws of the Commonwealth of Virginia,
# without reference to its choice of law rules.

proc nodeCreate { nodeframe nodename nodelabel clusterframe {nodeType NOMOM_SNODE} {viewType "FULL"} } {

        global canvas sysinfo

	if {[string compare $nodeframe ""] == 0 || \
	    		[string compare $nodename ""] == 0} {
		return
	}

        set sysframe ""
        if {[string compare $clusterframe ""] != 0} {
                set sysframe [clusterSystemFrameGet $clusterframe]
                systemNodeFramePut $sysframe $nodename $nodeframe $viewType
        }
        nodeNamePut $nodeframe $nodename
        nodeViewTypePut $nodeframe $viewType
        nodeTypePut $nodeframe $nodeType
        nodeClusterFramePut $nodeframe $clusterframe

        switch -exact -- $viewType {
          MIRROR {
                set label_font $canvas(bigLabelFont)
                set label_font_width $canvas(bigLabelFontWidth)
                set label_font_height $canvas(bigLabelFontHeight)
                set text_width $canvas(bigTextFontWidth)
                set text_height $canvas(bigTextFontHeight)
                set maxWidth $canvas(mirrorMaxWidth)
                set maxHeight $canvas(mirrorMaxHeight)
          }
          FULL   {
                set label_font $canvas(smallLabelFont)
                set label_font_width $canvas(smallLabelFontWidth)
                set label_font_height $canvas(smallLabelFontHeight)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
                set maxWidth $canvas(nodeMaxWidth)
                set maxHeight $canvas(nodeMaxHeight)
          }
          ICON   {
                set label_font $canvas(smallLabelFont)
                set label_font_width $canvas(smallLabelFontWidth)
                set label_font_height $canvas(smallLabelFontHeight)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
                set maxWidth $canvas(iconMaxWidth)
                set maxHeight $canvas(iconMaxHeight)
          }
          default {
		return
          }
        }
        set basicWidth $maxWidth
        set basicHeight $maxHeight

        frame $nodeframe -class Small

        frame $nodeframe.cf -borderwidth 0
        frame $nodeframe.cf.c -class SmallCanvas
        frame $nodeframe.cf.y -borderwidth 0
        frame $nodeframe.cf.x -borderwidth 0

        frame $nodeframe.lf -class SmallLabel -borderwidth 0 -relief flat

        set nodelabel2 $nodelabel
        if { [string compare $viewType "ICON"] == 0 } {
                set nodelabel2 [lindex [split $nodelabel .] 0]
                label $nodeframe.lf.label -text $nodelabel2 -justify left \
                                                -font $label_font -anchor nw
        } else {
                label $nodeframe.lf.label -text $nodelabel2 -justify center \
                                                -font $label_font -anchor c
        }


        set labelWidth [expr 2*$canvas(smallBd) + 2*$canvas(smallLabelBd) + \
                    $label_font_width*[string length $nodelabel2]]
        set labelHeight [expr $canvas(smallBd) + 2*$canvas(smallLabelBd) + \
                             + $label_font_height]

        canvas $nodeframe.cf.c.canvas -width $basicWidth -height $basicHeight \
                -xscrollcommand [list $nodeframe.cf.x.xscroll set] \
                -yscrollcommand [list $nodeframe.cf.y.yscroll set] \
                -confine 1
        nodeCanvasPut $nodeframe $nodeframe.cf.c.canvas

        set sysinfo(nodeframe,$nodeframe.cf.c.canvas) $nodeframe
        bind_canvas $nodeframe.cf.c.canvas

        set nodestat [systemNodeStatusGet $sysframe $nodename]
        if { [string compare $nodeType MOM] == 0 || \
	     			[string compare $nodeType MOM_SNODE] == 0} {
                if {[string compare $viewType MIRROR] != 0 } {
                  nodeUpdateStat $sysframe $nodename $nodestat NOINFO
                } else {
                  nodeNoInfo $nodeframe
                }
        } else {
                if {[string compare $viewType MIRROR] != 0} {
                  nodeUpdateStat $sysframe $nodename $nodestat FREE
                } else {
                  nodeUp $nodeframe
                }
        }

        set canvasFrameWidth [expr $canvas(smallBd) + \
                                   2*$canvas(smallCanvasBd)]
        set canvasFrameHeight [expr 2*$canvas(smallCanvasBd)]
        scrollbar $nodeframe.cf.x.xscroll -orient horizontal \
                -relief $canvas(smallScrollRelief) \
                -borderwidth $canvas(smallScrollBd) \
                -background $canvas(smallScrollBg) \
                -width $text_height \
                -command [list $nodeframe.cf.c.canvas xview]

        set scrollHeight [expr $canvas(smallBd) + \
              2*[lindex [$nodeframe.cf.x.xscroll configure -borderwidth] end] \
                + [lindex [$nodeframe.cf.x.xscroll configure -width] end]]
        $nodeframe.cf.x configure -height $scrollHeight

        scrollbar $nodeframe.cf.y.yscroll -orient vertical \
                        -relief $canvas(smallScrollRelief) \
                        -borderwidth $canvas(smallScrollBd) \
                        -background $canvas(smallScrollBg) \
                        -width $text_height \
                        -command [list $nodeframe.cf.c.canvas yview]

        set scrollWidth [expr $canvas(smallBd) + \
               2*[lindex [$nodeframe.cf.y.yscroll configure -borderwidth] end] \
               + [lindex [$nodeframe.cf.y.yscroll configure -width] end]]
        $nodeframe.cf.y configure -width $scrollWidth
        nodeLabelPut    $nodeframe $nodeframe.lf.label
        nodeLabelFramePut $nodeframe $nodeframe.lf
        nodeCanvasFramePut $nodeframe $nodeframe.cf.c
        nodeMainFramePut $nodeframe $nodeframe.cf
        nodeXscrollPut  $nodeframe $nodeframe.cf.x.xscroll
        nodeXscrollFramePut $nodeframe $nodeframe.cf.x
        nodeYscrollPut  $nodeframe $nodeframe.cf.y.yscroll
        nodeYscrollFramePut $nodeframe $nodeframe.cf.y
        nodeXposPut     $nodeframe 0
        nodeYposPut     $nodeframe 0
        nodeScrollRegionWidthPut $nodeframe 0
        nodeScrollRegionHeightPut $nodeframe 0
        nodeOffsetWidthPut $nodeframe 0
        nodeNextPut $nodeframe ""
        nodeRefreshPut $nodeframe 0

        pack $nodeframe.lf.label -fill both -expand true -padx 0 -pady 0 -ipadx 0 -ipady 0 -anchor nw
        pack $nodeframe.cf.c.canvas -fill both -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $nodeframe.cf.y -side right -fill  y -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $nodeframe.cf.x -side bottom -fill x -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $nodeframe.cf.c -expand true -fill both -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $nodeframe.lf $nodeframe.cf -side top -fill both -expand true -padx 0 -pady 0 -ipadx 0 -ipady 0

        pack $nodeframe -expand true -fill both -padx 0 -pady 0 -ipadx 0 -ipady 0

        set width [expr $canvasFrameWidth + $basicWidth + $scrollWidth]

        if {$labelWidth > $width} {
                set width $labelWidth
        }
        nodeCanvasWidthPut $nodeframe $basicWidth
        nodeDisplayWidthPut $nodeframe $width
        if {$width > $maxWidth} {
                set canvWidth [expr $maxWidth - \
                                    $canvasFrameWidth - $scrollWidth]
                if {$canvWidth > 0} {
                        nodeCanvasWidthPut $nodeframe $canvWidth
                        nodeDisplayWidthPut $nodeframe $maxWidth
                        $nodeframe.cf.c.canvas configure -width $canvWidth
                        set width $maxWidth
                }
        }

        set  height [expr $labelHeight + $canvasFrameHeight + $basicHeight + \
                                                                  $scrollHeight]

        nodeCanvasHeightPut $nodeframe $basicHeight
        nodeDisplayHeightPut $nodeframe $height
        if {$height > $maxHeight} {
                set canvHeight [expr $maxHeight - \
                             $labelHeight - $canvasFrameHeight - $scrollHeight]
                if {$canvHeight > 0} {
                        nodeCanvasHeightPut $nodeframe $canvHeight
                        nodeDisplayHeightPut $nodeframe $maxHeight
                        $nodeframe.cf.c.canvas configure -height $canvHeight
                        set height $maxHeight
                }
        }

        if {[string compare $viewType ICON] == 0} {
                nodeCoverCanvas $nodeframe
        } else {
                nodeUnCoverCanvas $nodeframe
        }

        return [list $width $height]
}

proc nodeAddWidth {nodeframe incr} {
        global canvas

        if {[string compare $nodeframe ""] == 0 || \
	    				![regexp {[0-9]+} $incr]} {
                return
        }
        set vtype [nodeViewTypeGet $nodeframe]

        switch -exact -- $vtype {
          MIRROR {
                set maxWidth $canvas(mirrorMaxWidth)
          }
          FULL   {
                set maxWidth $canvas(nodeMaxWidth)
          }
          ICON   {
                set maxWidth $canvas(iconMaxWidth)
          }
	  default {
		return
	  }
        }
        set newDispWidth [expr [nodeDisplayWidthGet $nodeframe] + $incr]

        if {$newDispWidth < $maxWidth } {
                nodeCanvasWidthPut $nodeframe \
                        [expr [nodeCanvasWidthGet $nodeframe] + $incr]
                nodeDisplayWidthPut $nodeframe $newDispWidth
                clusterAddWidth [nodeClusterFrameGet $nodeframe] $incr
        }
}

proc nodeRepack {nodeframe} {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set vtype [nodeViewTypeGet $nodeframe]
        switch -exact -- $vtype {
          MIRROR {
                set maxWidth $canvas(mirrorMaxWidth)
          }
          FULL   {
                set maxWidth $canvas(nodeMaxWidth)
          }
          ICON   {
                set maxWidth $canvas(iconMaxWidth)
          }
	  default {
		return
	  }
        }
        set label [nodeLabelGet $nodeframe]
        set labelFrame [nodeLabelFrameGet $nodeframe]
        set c [nodeCanvasGet $nodeframe]
        set canvasFrame [nodeCanvasFrameGet $nodeframe]
        set mainFrame [nodeMainFrameGet $nodeframe]
        set xscroll [nodeXscrollGet $nodeframe]
        set xscrollf [nodeXscrollFrameGet $nodeframe]
        set yscroll [nodeYscrollGet $nodeframe]
        set yscrollf [nodeYscrollFrameGet $nodeframe]
        set clusterf [nodeClusterFrameGet $nodeframe]
        set clusterc [clusterCanvasGet $clusterf]

        if {[string compare $clusterc ""] != 0} {
                catch {pack forget $labelFrame $mainFrame $canvasFrame $xscrollf}
                $clusterc delete $nodeframe
        }

        set canvWidth [nodeCanvasWidthGet $nodeframe]

        set scrollRegionWidth [nodeScrollRegionWidthGet $nodeframe]
        set scrollRegionHeight [nodeScrollRegionHeightGet $nodeframe]
        set canvWidth [nodeCanvasWidthGet $nodeframe]
        set canvHeight [nodeCanvasHeightGet $nodeframe]

        if {$scrollRegionWidth > $canvWidth} {
                catch {pack $xscroll -side bottom -fill x -padx 0 -pady 0 -ipadx 0 -ipady 0}
        } else {
                catch {pack forget $xscroll}
        }

        if {$scrollRegionHeight > $canvHeight} {
                catch {pack $yscroll -side right -fill y -padx 0 -pady 0 -ipadx 0 -ipady 0 -anchor nw}
        } else {
                catch {pack forget $yscroll}
        }
        if {[string compare $clusterc ""] == 0} {
                return
        }

        pack $label -fill both -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $c -fill both -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $yscrollf -side right -fill y -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $xscrollf -side bottom -fill x -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $canvasFrame -fill both -expand true -padx 0 -pady 0 -ipadx 0 -ipady 0
        pack $labelFrame $mainFrame -side top -fill both -expand true -padx 0 -pady 0 -ipadx 0 -ipady 0

        $c configure -width $canvWidth -height $canvHeight \
                -scrollregion [list 0 0 $scrollRegionWidth $scrollRegionHeight]

        $clusterc create window \
                        [nodeXposGet $nodeframe] \
                        [nodeYposGet $nodeframe] \
                        -window $nodeframe -anchor nw \
                        -tags $nodeframe \
                        -width  [nodeDisplayWidthGet $nodeframe] \
                        -height [nodeDisplayHeightGet $nodeframe]

}

proc nodeReCreate { nodeframe } {

        global canvas sysview

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set nodename [nodeNameGet $nodeframe]

        set cframe [nodeClusterFrameGet $nodeframe]
        set viewType [nodeViewTypeGet $nodeframe]
        if {[string compare $cframe ""] != 0} {
                set sysframe [clusterSystemFrameGet $cframe]
                set sitename [systemNameGet $sysframe]
                nodeViewTypePut $nodeframe $sysview($sitename)
                systemNodeFramePut $sysframe $nodename $nodeframe $viewType
        }

        switch -exact -- $viewType {
          MIRROR {
                set label_font $canvas(bigLabelFont)
                set label_font_width $canvas(bigLabelFontWidth)
                set label_font_height $canvas(bigLabelFontHeight)
                set maxWidth $canvas(mirrorMaxWidth)
                set maxHeight $canvas(mirrorMaxHeight)
                set text_width $canvas(bigTextFontWidth)
                set text_height $canvas(bigTextFontHeight)
          }
          FULL   {
                set label_font $canvas(smallLabelFont)
                set label_font_width $canvas(smallLabelFontWidth)
                set label_font_height $canvas(smallLabelFontHeight)
                set maxWidth $canvas(nodeMaxWidth)
                set maxHeight $canvas(nodeMaxHeight)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
          }
          ICON   {
                set label_font $canvas(smallLabelFont)
                set label_font_width $canvas(smallLabelFontWidth)
                set label_font_height $canvas(smallLabelFontHeight)
                set maxWidth $canvas(iconMaxWidth)
                set maxHeight $canvas(iconMaxHeight)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
          }
         default {
                set label_font $canvas(smallLabelFont)
                set label_font_width $canvas(smallLabelFontWidth)
                set label_font_height $canvas(smallLabelFontHeight)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
                set maxWidth 0
                set maxHeight 0
          }
        }
        set basicWidth $maxWidth
        set basicHeight $maxHeight

        set nodelabel [nodeLabelGet $nodeframe]
        if { [string compare $viewType "ICON"] == 0 } {
                set nodelabel [lindex [split $nodelabel .] 0]
                $nodeframe.lf.label configure -text $nodelabel -justify left \
                             -font $label_font -anchor nw
        } else {
                set nodelabel [lindex [split $nodelabel .] 0]
                $nodeframe.lf.label configure -text $nodelabel -justify center \
                             -font $label_font -anchor c
        }
        set clusterframe [nodeClusterFrameGet $nodeframe]
        bind_canvas $nodeframe.cf.c.canvas

        set labelWidth \
                    [expr 2*$canvas(smallBd) + 2*$canvas(smallLabelBd) + \
                          $label_font_width*[string length $nodelabel]]
        set labelHeight [expr $canvas(smallBd) + 2*$canvas(smallLabelBd) + \
                                + $label_font_height]

        $nodeframe.cf.c.canvas configure -width $basicWidth \
                -height $basicHeight \
                -xscrollcommand [list $nodeframe.cf.x.xscroll set] \
                -yscrollcommand [list $nodeframe.cf.y.yscroll set] \
                -confine 1


        set nodestat [systemNodeStatusGet $sysframe $nodename]
        set nodetype [nodeTypeGet $nodeframe]
        if { [string compare $nodetype MOM] == 0 || \
				[string compare $nodetype MOM_SNODE] == 0 } {
                if {[string compare $viewType MIRROR] != 0 } {
                  nodeUpdateStat $sysframe $nodename $nodestat NOINFO
                } else {
                  nodeNoInfo $nodeframe
                }
        } else {
                if {[string compare $viewType MIRROR] != 0} {
                  nodeUpdateStat $sysframe $nodename $nodestat FREE
                } else {
                  nodeUp $nodeframe
                }
        }

        set canvasFrameWidth [expr $canvas(smallBd) + \
                                   2*$canvas(smallCanvasBd)]
        set canvasFrameHeight [expr 2*$canvas(smallCanvasBd)]
        $nodeframe.cf.x.xscroll configure \
                -width $text_height \
                -command [list $nodeframe.cf.c.canvas xview]
        set xscroll $nodeframe.cf.x.xscroll

        set scrollHeight [expr $canvas(smallBd) + \
              2*[lindex [$nodeframe.cf.x.xscroll configure -borderwidth] end] \
                + [lindex [$nodeframe.cf.x.xscroll configure -width] end]]
        $nodeframe.cf.x configure -height $scrollHeight

        $nodeframe.cf.y.yscroll configure \
                        -width $text_height \
                        -command [list $nodeframe.cf.c.canvas yview]
        set yscroll $nodeframe.cf.y.yscroll

        set scrollWidth [expr $canvas(smallBd) + \
               2*[lindex [$nodeframe.cf.y.yscroll configure -borderwidth] end] \
               + [lindex [$nodeframe.cf.y.yscroll configure -width] end]]
        $nodeframe.cf.y configure -width $scrollWidth

        set width [expr $canvasFrameWidth + $basicWidth + $scrollWidth]
        if {$labelWidth > $width} {
                set width $labelWidth
        }
        nodeCanvasWidthPut $nodeframe $basicWidth
        nodeDisplayWidthPut $nodeframe $width

        if {$width > $maxWidth} {
                set canvWidth [expr $maxWidth - \
                                    $canvasFrameWidth - $scrollWidth]
                if {$canvWidth > 0} {
                        nodeCanvasWidthPut $nodeframe $canvWidth
                        nodeDisplayWidthPut $nodeframe $maxWidth
                        $nodeframe.cf.c.canvas configure -width $canvWidth
                        set width $maxWidth
                }
        }

        set  height [expr $labelHeight + $canvasFrameHeight + $basicHeight + \
                                                                  $scrollHeight]
        nodeCanvasHeightPut $nodeframe $basicHeight
        nodeDisplayHeightPut $nodeframe $height
        if {$height > $maxHeight} {
                set canvHeight [expr $maxHeight - \
                             $labelHeight - $canvasFrameHeight - $scrollHeight]
                if {$canvHeight > 0} {
                        nodeCanvasHeightPut $nodeframe $canvHeight
                        nodeDisplayHeightPut $nodeframe $maxHeight
                        $nodeframe.cf.c.canvas configure -height $canvHeight
                        set height $maxHeight
                }
        }
        set scrollRegionWidth [nodeScrollRegionWidthGet $nodeframe]
        set scrollRegionHeight [nodeScrollRegionHeightGet $nodeframe]

        set canvWidth [nodeCanvasWidthGet $nodeframe]
        catch {pack forget $xscroll}
        if {[string compare $viewType ICON] != 0 && \
                                        $scrollRegionWidth > $canvWidth} {
                catch {pack $xscroll -side bottom -fill x -padx 0 -pady 0 \
                                                        -ipadx 0 -ipady 0}
        }

        set canvHeight [nodeCanvasHeightGet $nodeframe]
        catch {pack forget $yscroll}
        if {[string compare $viewType ICON] != 0 && \
                                        $scrollRegionHeight > $canvHeight} {
                catch {pack $yscroll -side right -fill y -padx 0 -pady 0 -ipadx 0 -ipady 0 -anchor nw}
        }

        if {[string compare $viewType ICON] == 0} {
                nodeCoverCanvas $nodeframe
        } else {
                nodeUnCoverCanvas $nodeframe
        }

        return [list $width $height]
}

proc nodeCoverCanvas {nodeframe} {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set canv [nodeCanvasGet $nodeframe]
        set width [nodeScrollRegionWidthGet $nodeframe]
        set height [nodeScrollRegionHeightGet $nodeframe]

	if {[string compare $canv ""] == 0  || \
	    [string compare $width ""] == 0 || \
	    [string compare $height ""] == 0} {
		return
	}

        catch {$canv delete $nodeframe.cover}

        $canv create rect -1 -1 $width $height \
                     -fill  [lindex [$canv configure -bg] end] \
                     -tag $nodeframe.cover
}

proc nodeUnCoverCanvas {nodeframe} {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set canv [nodeCanvasGet $nodeframe]
	if {[string compare $canv ""] == 0} {
		return
	} 

        catch {$canv delete $nodeframe.cover}
}

proc nodeReCoverCanvas {nodeframe} {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set canv [nodeCanvasGet $nodeframe]
	if {[string compare $canv ""] == 0} {
		return
	} 

        catch {$canv delete $nodeframe.cover}

        $canv itemconfigure $nodeframe.cover \
                        -fill  [lindex [$canv configure -bg] end] \
                        -tag $nodeframe.cover
}

proc nodeRefreshGet nodeframe {

        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(refresh)]} {
                return 0
        }
        return [set ${array}(refresh)]
}

proc nodeRefreshPut {nodeframe flag} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(refresh) $flag
}

proc nodeNameGet nodeframe {

        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(name)]} {
                return ""
        }
        return [set ${array}(name)]
}
proc nodeNamePut {nodeframe name} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(name) $name
}

proc nodeLabelFramePut {nodeframe frame} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(labelFrame) $frame
}

proc nodeLabelFrameGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(labelFrame)]} {
                return ""
        }
        return [set ${array}(labelFrame)]
}

proc nodeLabelGet nodeframe {

        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(label)]} {
                return ""
        }
        return [set ${array}(label)]
}

proc nodeLabelPut {nodeframe label} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(label) $label
}


proc nodeTypeGet nodeframe {

        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(type)]} {
                return ""
        }
        return [set ${array}(type)]
}

proc nodeTypePut {nodeframe type} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(type) $type
}

proc nodeViewTypeGet nodeframe {

        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(viewType)]} {
                return ""
        }
        return [set ${array}(viewType)]
}

proc nodeViewTypePut {nodeframe type} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(viewType) $type
}

proc nodeCanvasFrameGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(canvasFrame)]} {
                return ""
        }
        return [set ${array}(canvasFrame)]
}


proc nodeCanvasFramePut {nodeframe frame} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(canvasFrame) $frame
}

proc nodeCanvasGet nodeframe {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(canvas)]} {
                return ""
        }
        return [set ${array}(canvas)]
}

proc nodeCanvasPut {nodeframe canvas} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(canvas) $canvas
}

proc nodeXscrollFrameGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(XscrollFrame)]} {
                return ""
        }
        return [set ${array}(XscrollFrame)]
}

proc nodeXscrollFramePut {nodeframe frame} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(XscrollFrame) $frame
}

proc nodeYscrollFrameGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(YscrollFrame)]} {
                return ""
        }
        return [set ${array}(YscrollFrame)]
}

proc nodeYscrollFramePut {nodeframe frame} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(YscrollFrame) $frame
}

proc nodeXscrollGet nodeframe {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(xscroll)]} {
                return ""
        }
        return [set ${array}(xscroll)]
}

proc nodeXscrollPut {nodeframe xscroll} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(xscroll) $xscroll
}

proc nodeYscrollGet nodeframe {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(yscroll)]} {
                return ""
        }
        return [set ${array}(yscroll)]
}

proc nodeYscrollPut {nodeframe yscroll} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(yscroll) $yscroll
}
proc nodeScrollRegionWidthGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(scrollRegionWidth)]} {
                return ""
        }
        return [set ${array}(scrollRegionWidth)]
}

proc nodeScrollRegionWidthPut {nodeframe width} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(scrollRegionWidth) $width
}

proc nodeScrollRegionHeightGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(scrollRegionHeight)]} {
                return ""
        }
        return [set ${array}(scrollRegionHeight)]
}

proc nodeScrollRegionHeightPut {nodeframe height} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(scrollRegionHeight) $height
}

proc nodeDisplayWidthGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(displayWidth)]} {
                return ""
        }
        return [set ${array}(displayWidth)]
}

proc nodeDisplayWidthPut {nodeframe width} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(displayWidth) $width
}

proc nodeDisplayHeightGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(displayHeight)]} {
                return ""
        }
        return [set ${array}(displayHeight)]
}

proc nodeDisplayHeightPut {nodeframe height} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(displayHeight) $height
}

proc nodeCanvasWidthGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(canvasWidth)]} {
                return ""
        }
        return [set ${array}(canvasWidth)]
}


proc nodeCanvasWidthPut {nodeframe width} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(canvasWidth) $width
}

proc nodeCanvasHeightGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(canvasHeight)]} {
                return ""
        }
        return [set ${array}(canvasHeight)]
}

proc nodeCanvasHeightPut {nodeframe height} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(canvasHeight) $height
}

proc nodeClusterFrameGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(clusterFrame)]} {
                return ""
        }
        return [set ${array}(clusterFrame)]
}

proc nodeClusterFramePut {nodeframe frame} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(clusterFrame) $frame
}

proc nodeXposGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(Xpos)]} {
                return ""
        }
        return [set ${array}(Xpos)]
}

proc nodeXposPut {nodeframe pt} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(Xpos) $pt
}

proc nodeYposGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(Ypos)]} {
                return ""
        }
        return [set ${array}(Ypos)]
}


proc nodeYposPut {nodeframe pt} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(Ypos) $pt
}

proc nodeOffsetWidthGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(offsetWidth)]} {
                return ""
        }
        return [set ${array}(offsetWidth)]
}

proc nodeOffsetWidthPut {nodeframe width} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(offsetWidth) $width
}

proc nodeNextGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(next)]} {
                return ""
        }
        return [set ${array}(next)]
}

proc nodeNextPut {nodeframe frame} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(next) $frame
}

proc nodeMainFrameGet {nodeframe} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(mainFrame)]} {
                return ""
        }
        return [set ${array}(mainFrame)]
}

proc nodeMainFramePut {nodeframe frame} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(mainFrame) $frame
}

proc nodeGroupXCGet {nodeframe group} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(groupXC,$group)]} {
                return ""
        }
        return [set ${array}(groupXC,$group)]
}

proc nodeGroupXCPut {nodeframe group xc} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(groupXC,$group) $xc
}

proc nodePrint {nodeframe} {

	if {[string compare $nodeframe ""] == 0} {
		return
	}
        puts "Node: $nodeframe=======================================>"
	puts "Refresh Flag: [nodeRefreshGet $nodeframe]"
	puts "Name: [nodeNameGet $nodeframe]"
        puts "LabelFrame: [nodeLabelFrameGet $nodeframe]"
        puts "Label: [nodeLabelGet $nodeframe]"
        puts "Type: [nodeTypeGet $nodeframe]"
        puts "ViewType: [nodeViewTypeGet $nodeframe]"
        puts "CanvasFrame: [nodeCanvasFrameGet $nodeframe]"
        puts "Canvas: [nodeCanvasGet $nodeframe]"
        puts "XscrollFrame: [nodeXscrollFrameGet $nodeframe]"
        puts "Xscroll: [nodeXscrollGet $nodeframe]"
        puts "YscrollFrame: [nodeYscrollFrameGet $nodeframe]"
        puts "Yscroll: [nodeYscrollGet $nodeframe]"
        puts "ScrollRegion's Width: [nodeScrollRegionWidthGet $nodeframe]"
        puts "ScrollRegion's Height: [nodeScrollRegionHeightGet $nodeframe]"
        puts "Display Width: [nodeDisplayWidthGet $nodeframe]"
        puts "Display Height: [nodeDisplayHeightGet $nodeframe]"
        puts "Canvas Width: [nodeCanvasWidthGet $nodeframe]"
        puts "Canvas Height: [nodeCanvasHeightGet $nodeframe]"
	puts "Cluster Frame: [nodeClusterFrameGet $nodeframe]"
        puts "Xpos: [nodeXposGet $nodeframe]"
        puts "Ypos: [nodeYposGet $nodeframe]"
        puts "OffsetWidth: [nodeOffsetWidthGet $nodeframe]"
        puts "NodeNext: [nodeNextGet $nodeframe]"
	puts "Main Frame: [nodeMainFrameGet $nodeframe]"
}

proc nodeDelete nodeframe {
        set array [string trimleft $nodeframe .]
        global $array

        catch {pack forget $nodeframe}

        set nname [nodeNameGet $nodeframe]
        set vtype [nodeViewTypeGet $nodeframe]
        set cframe [nodeClusterFrameGet $nodeframe]
        if {[string compare $cframe ""] != 0} {
                set sysframe [clusterSystemFrameGet $cframe]
                systemNodeFrameUnset $sysframe $nname $vtype
        }
        unset $array
}

proc nodeLineGet {nodeframe lineno group} {
        set array [string trimleft $nodeframe .]
        global $array

        if {![info exists ${array}(line,$lineno,$group)]} {
                return ""
        }
        return [set ${array}(line,$lineno,$group)]
}

proc nodeLinePut {nodeframe lineno group tagOrId} {
        set array [string trimleft $nodeframe .]
        global $array

        set ${array}(line,$lineno,$group) $tagOrId
}

proc nodeAddText { nodeframe lineno groupno text} {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}
        set vtype [nodeViewTypeGet $nodeframe]

        switch -exact -- $vtype {
          MIRROR {
                set text_font $canvas(bigTextFont)
                set text_width $canvas(bigTextFontWidth)
                set text_height $canvas(bigTextFontHeight)
          }
          default {
                set text_font $canvas(smallTextFont)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
          }
        }

        set ncanv [nodeCanvasGet $nodeframe]
        if {$groupno == 0} {
                set xpos $text_width
                set ypos $text_height
                if {$lineno > 0} {
                        set previd [nodeLineGet $nodeframe \
                                                        [expr $lineno - 1] 0]
                        set pos [$ncanv bbox $previd]
                        set xpos [lindex $pos 0]
                        set ypos [lindex $pos 3]
                }
        } else {
                set previd [nodeLineGet $nodeframe $lineno [expr $groupno - 1]]
                set pos [$ncanv bbox $previd]

                set xpos [lindex $pos 2]
                set ypos [lindex $pos 1]
        }
        set textid [$ncanv create text $xpos $ypos -anchor nw \
                        -text $text -tags "text $nodeframe" \
                        -font $text_font \
                        -fill $canvas(bigFg) -justify left]

        nodeLinePut $nodeframe $lineno $groupno $textid
}

proc nodeAddLineText { nodeframe lineno listOfText } {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]
        set g 0
        foreach text $listOfText {
                nodeAddText $nodeframe $lineno $g $text
                incr g
        }
}

proc nodeMatchItemTag {nodeframe itemid tag} {
        if {[string compare $nodeframe ""] == 0 || \
			[string compare $itemid ""] == 0} {
                return 0
        }
        set canv [nodeCanvasGet $nodeframe]

        set tags [lindex [$canv itemconfigure $itemid -tags] end]
        if {[lsearch -exact $tags $tag] != -1} {
                return 1
        }
        return 0
}

proc nodeModText { nodeframe lineno groupno text } {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]

        set textid [nodeLineGet $nodeframe $lineno $groupno]

        if [nodeMatchItemTag $nodeframe $textid text] {
                set oldtext [lindex [$ncanv itemconfigure $textid -text] end]

                if {[string compare $text $oldtext] != 0} {
                        $ncanv itemconfigure $textid -text $text
                        return 1
                }

        } else {
                catch {$ncanv delete $textid}
                nodeAddText $nodeframe $lineno $groupno $text
                return 1
        }
        return 0
}

proc nodeRemLineEntry { nodeframe lineno groupno } {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]
        set array [string trimleft $nodeframe .]
        global $array

        set j $groupno
        set item [nodeLineGet $nodeframe $lineno $j]
        while {[string compare $item ""] != 0} {
                $ncanv delete $item
                catch {unset ${array}(line,$lineno,$j)}
                incr j
                set item [nodeLineGet $nodeframe $lineno $j]
        }
}

proc nodeModLineText { nodeframe lineno listOfText } {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]

        set g 0
        foreach text $listOfText {
                nodeModText $nodeframe $lineno $g $text

                incr g
        }
        nodeRemLineEntry $nodeframe $lineno $g
}

proc nodeRemLines { nodeframe lineno } {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]
        set array [string trimleft $nodeframe .]
        global $array


        set i $lineno

        set item [nodeLineGet $nodeframe $i 0]
        while {[string compare $item ""] != 0} {
                nodeRemLineEntry $nodeframe $i 0
                incr i
                set item [nodeLineGet $nodeframe $i 0]
        }
}

proc nodeScaleCreate {nodeframe lineno groupno value} {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]

        set vtype [nodeViewTypeGet $nodeframe]
        switch -exact -- $vtype {
          MIRROR {
                set scale_factor $canvas(mirrorScaleFactor)
                set text_font $canvas(bigTextFont)
                set text_width $canvas(bigTextFontWidth)
                set text_height $canvas(bigTextFontHeight)
          }
          default {
                set scale_factor $canvas(nodeScaleFactor)
                set text_font $canvas(smallTextFont)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
          }
        }

        if {$groupno == 0} {
                set xpos $text_width
                set ypos $text_height
                if {$lineno > 0} {
                        set previd [nodeLineGet $nodeframe \
                                                        [expr $lineno - 1] 0]
                        set pos [$ncanv bbox $previd]
                        set xpos [lindex $pos 0]
                        set ypos [lindex $pos 3]
                }
        } else {
                set previd [nodeLineGet $nodeframe $lineno [expr $groupno - 1]]
                set pos [$ncanv bbox $previd]

                set xpos [lindex $pos 2]
                set ypos [lindex $pos 1]
        }

        set valabel "$value%"
        set vlen [string length $valabel]
        for {set i [string length $valabel]} {$i < 10} {incr i} {
                set valabel "$valabel "
        }

        if [catch {expr $value * $scale_factor} val] {
                InfoBox_sendmsg "nodeScaleCreate: Received val: $val" 2
                return ""
        }

        set textid [$ncanv create text $xpos $ypos -anchor nw \
                        -text "$valabel" -tags [list scale \
                                    $lineno$groupno$nodeframe \
                                    text.$lineno$groupno$nodeframe] \
                        -fill $canvas(smallFg) -justify left \
                        -font $text_font -justify right]


        if [catch {expr 101 * $scale_factor} width] {
                InfoBox_sendmsg "nodeScaleCreate: Received width: $width" 2
                return ""
        }

        set pos [$ncanv bbox $textid]
        set x1pos [lindex $pos 2]
        set y1pos [lindex $pos 1]

        set y2pos [expr ($y1pos + $text_height) - 3]
        set x2pos [expr $x1pos + $width]


        set trid [$ncanv create rect $x1pos $y1pos $x2pos $y2pos \
                        -tags [list scale \
                                    $lineno$groupno$nodeframe \
                                    scale.$lineno$groupno$nodeframe] \
                        -fill $canvas(nodeColorTrough)]

        if {$val > $width} {
                set diff [expr ($val - $width) + 1]
                set slid [$ncanv create rect $x1pos $y1pos $x2pos $y2pos \
                            -tags [list scale \
                                        $lineno$groupno$nodeframe \
                                        scale.$lineno$groupno$nodeframe] \
                            -fill $canvas(nodeColorSlider)]

                set textd [$ncanv create rect $x2pos $y1pos \
                                              [expr $x2pos + $diff] $y2pos \
                            -tags [list scale \
                                        $lineno$groupno$nodeframe \
                                        scale.$lineno$groupno$nodeframe] \
                            -fill $canvas(nodeColorExtendedTrough)]
        } else {

                set slid [$ncanv create rect $x1pos $y1pos \
                            [expr $x1pos + $val] $y2pos \
                            -tags [list scale \
                                        $lineno$groupno$nodeframe \
                                        scale.$lineno$groupno$nodeframe] \
                            -fill $canvas(nodeColorSlider)]
        }
        nodeLinePut $nodeframe $lineno $groupno $lineno$groupno$nodeframe
}

proc nodeScaleReCreate {nodeframe lineno groupno newvalue} {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]

        set vtype [nodeViewTypeGet $nodeframe]
        switch -exact -- $vtype {
          MIRROR {
                set scale_factor $canvas(mirrorScaleFactor)
                set text_font $canvas(bigTextFont)
                set text_width $canvas(bigTextFontWidth)
                set text_height $canvas(bigTextFontHeight)
          }
          default {
                set scale_factor $canvas(nodeScaleFactor)
                set text_font $canvas(smallTextFont)
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
          }
        }

        set valabel "$newvalue%"
        set vlen [string length $valabel]
        for {set i [string length $valabel]} {$i < 10} {incr i} {
                set valabel "$valabel "
        }
        set oldlabel \
        [lindex [$ncanv itemconfigure text.$lineno$groupno$nodeframe -text] end]
        if {[string compare $valabel $oldlabel] != 0} {

                if [catch {expr $newvalue * $scale_factor} val] {
                        InfoBox_sendmsg "nodeScaleReCreate: Received val: $val" 2
                        return ""
                }
                catch {$ncanv delete scale.$lineno$groupno$nodeframe}
                if [catch {expr 101 * $scale_factor} width] {
                        InfoBox_sendmsg "nodeScaleReCreate: Received width: $width" 2
                        return ""
                }

                $ncanv itemconfigure text.$lineno$groupno$nodeframe \
                        -text $valabel


                set pos [$ncanv bbox text.$lineno$groupno$nodeframe]
                set x1pos [lindex $pos 2]
                set y1pos [lindex $pos 1]

                set y2pos [expr ($y1pos + $text_height) - 3]
                set x2pos [expr $x1pos + $width]


                set trid [$ncanv create rect $x1pos $y1pos $x2pos $y2pos \
                        -tags [list scale \
                                    $lineno$groupno$nodeframe \
                                    scale.$lineno$groupno$nodeframe] \
                        -fill $canvas(nodeColorTrough)]

                if {$val > $width} {
                        set diff [expr ($val - $width) + 1]
                        set slid [$ncanv create rect $x1pos $y1pos \
                                                        $x2pos $y2pos \
                            -tags [list scale \
                                        $lineno$groupno$nodeframe \
                                        scale.$lineno$groupno$nodeframe] \
                                    -fill $canvas(nodeColorSlider)]

                        set textd [$ncanv create rect $x2pos $y1pos \
                                              [expr $x2pos + $diff] $y2pos \
                            -tags [list scale \
                                        $lineno$groupno$nodeframe \
                                        scale.$lineno$groupno$nodeframe] \
                            -fill $canvas(nodeColorExtendedTrough)]
               } else {

                        set slid [$ncanv create rect $x1pos $y1pos \
                            [expr $x1pos + $val] $y2pos \
                            -tags [list scale \
                                        $lineno$groupno$nodeframe \
                                        scale.$lineno$groupno$nodeframe] \
                            -fill $canvas(nodeColorSlider)]
                }
        }
}


proc nodeAddLineScale { nodeframe lineno param } {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]
        set label [lindex $param 0]
        set valabel [lindex $param 1]

        nodeAddText $nodeframe $lineno 0 $label
        if {[string compare $valabel ""] != 0} {
                nodeScaleCreate $nodeframe $lineno 1 $valabel
        }
}

proc nodeModLineScale { nodeframe lineno newContent } {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set ncanv [nodeCanvasGet $nodeframe]
        set label [lindex $newContent 0]
        set valabel [lindex $newContent 1]

        nodeModText $nodeframe $lineno 0 $label

        if {[string compare $valabel ""] != 0} {
		if { [string compare [nodeLineGet $nodeframe $lineno 1] \
				     		${lineno}1${nodeframe}] == 0 } {
                	nodeScaleReCreate $nodeframe $lineno 1 $valabel
        		nodeRemLineEntry $nodeframe $lineno 2
		} else {
        		nodeRemLineEntry $nodeframe $lineno 1
                	nodeScaleCreate $nodeframe $lineno 1 $valabel
		}
        } else {
        	nodeRemLineEntry $nodeframe $lineno 1
	}
}

proc nodeFindXCs {nodeframe startl endl} {

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set canv [nodeCanvasGet $nodeframe]
        set i $startl
        set j 0
        set item [nodeLineGet $nodeframe $i $j]
        while {[string compare $item ""] != 0} {
                while {[string compare $item ""] != 0} {
                        set coords [$canv bbox $item]
                        set x1 [lindex $coords 0]
                        set x2 [lindex $coords 2]
                        set w [expr $x2 - $x1]
                        set aScale [nodeMatchItemTag $nodeframe $item scale]

                        if {![info exists max($j)]} {
				set max($j) 0
			} else {
				if {!$aScale && $x1 > $max($j)} {
					set max($j) $x1
				}
                        }

                        if { ![info exists maxw($j)] || $w > $maxw($j) } {
                                set maxw($j) $w
                        }

                        incr j
                        set item [nodeLineGet $nodeframe $i $j]
                }

                incr i
		if { [string compare $endl "end"] != 0 && $i > $endl} {
			break
		}
                set j 0
                set item [nodeLineGet $nodeframe $i $j]
        }
        set glen [array size max]
        for {set g 0} {$g < $glen} {incr g} {
                set newval [expr $max($g) + $maxw($g)]
                set k [expr $g + 1]
                if {[info exists max($k)] && $newval > $max($k)} {
                        set max($k) $newval
                }
                nodeGroupXCPut $nodeframe $g $max($g)
        }
}

proc nodeAdjustDisplay {nodeframe splitl} {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set viewtype [nodeViewTypeGet $nodeframe]

        switch -exact -- $viewtype {
          MIRROR {
                set text_width $canvas(bigTextFontWidth)
                set text_height $canvas(bigTextFontHeight)
          }
          default {
                set text_width $canvas(smallTextFontWidth)
                set text_height $canvas(smallTextFontHeight)
          }
        }

	if {$splitl < 0} {
        	nodeFindXCs $nodeframe 0 end
	} else {
        	nodeFindXCs $nodeframe 0 [expr $splitl - 1]
	}
        set canv [nodeCanvasGet $nodeframe]
        set maxw 0
        set maxs 0
        set totheight $text_height
        set i 0
        set j 0
	set xgsave 0
        set item [nodeLineGet $nodeframe $i $j]
        while {[string compare $item ""] != 0} {
               set maxh 0
                set hasScale 0
                while {[string compare $item ""] != 0} {
                        set xg [nodeGroupXCGet $nodeframe $j]
			if {$j == 0} {
				set xgsave $xg
			}
                        set x1 [lindex [$canv bbox $item] 0]
                        set xoffset [expr $xg - $x1]

                        $canv move $item $xoffset 0

                        set coords [$canv bbox $item]
                        set x1 [lindex $coords 0]
                        set x2 [lindex $coords 2]
                        set y1 [lindex $coords 1]
                        set y2 [lindex $coords 3]
                        set h [expr ($y2 - $y1) + 1]
                        if {$h > $maxh} {
                                set maxh $h
                        }

                        incr j
                        set item [nodeLineGet $nodeframe $i $j]
                }
                if {$x2 > $maxw} {
                        set maxw $x2
                }

                if {$hasScale && $x2 > $maxs} {
                        set maxs $x2
                }
                incr totheight $maxh

                incr i
		if {$i == $splitl} {
        		nodeFindXCs $nodeframe $splitl end
			nodeGroupXCPut $nodeframe 0 $xgsave
		}
                set j 0
                set item [nodeLineGet $nodeframe $i $j]
        }

        incr maxw
        if {$maxw != [nodeScrollRegionWidthGet $nodeframe]} {
                nodeScrollRegionWidthPut $nodeframe $maxw
                set xscroll [nodeXscrollGet $nodeframe]
                if {[string compare $viewtype ICON] != 0} {
                    if {$maxw > [nodeCanvasWidthGet $nodeframe]} {
                        catch {pack $xscroll -side bottom -fill x -padx 0 \
                                                      -pady 0 -ipadx 0 -ipady 0}
		    }
                } else {
                        catch {pack forget $xscroll}
                }
        }

	set  scrollheight [nodeScrollRegionHeightGet $nodeframe]
        if {$totheight != [nodeScrollRegionHeightGet $nodeframe]} {
                nodeScrollRegionHeightPut $nodeframe $totheight

                set yscroll [nodeYscrollGet $nodeframe]
                if {[string compare $viewtype ICON] != 0} {
                    if {$totheight > [nodeCanvasHeightGet $nodeframe]} {
                        catch {pack $yscroll -side right -fill y -padx 0 \
                                           -pady 0 -ipadx 0 -ipady 0 -anchor nw}
		    }
                } else {
                        catch {pack forget $yscroll}
                }
        }
        set scrollRegionWidth [nodeScrollRegionWidthGet $nodeframe]
        set scrollRegionHeight [nodeScrollRegionHeightGet $nodeframe]
        $canv configure \
                -scrollregion [list 0 0 $scrollRegionWidth $scrollRegionHeight]
}

proc nodeDown nodeframe {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        [nodeCanvasGet $nodeframe] configure -background $canvas(nodeColorDOWN)
}

proc nodeUp nodeframe {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        [nodeCanvasGet $nodeframe] configure -background $canvas(nodeColorFREE)

}

proc nodeOffline nodeframe {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        [nodeCanvasGet $nodeframe] configure -background $canvas(nodeColorOFFL)
}

proc nodeReserved nodeframe {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}
        [nodeCanvasGet $nodeframe] configure -background $canvas(nodeColorRSVD)
}

proc nodeNoInfo nodeframe {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        [nodeCanvasGet $nodeframe] configure -background $canvas(nodeColorNOINFO)
}

proc nodeInUse nodeframe {
        global canvas

	if {[string compare $nodeframe ""] == 0} {
		return
	}

        set nodename [nodeNameGet $nodeframe]
        set sysframe [clusterSystemFrameGet [nodeClusterFrameGet $nodeframe]]

        set color ""
	set nodestat [systemNodeStatusGet $sysframe $nodename]
	set nodeinfo [systemNodeInfoGet $sysframe $nodename]
	set  k [expr [llength $nodeinfo] - 1]
	while {$k >= 0} {
		set info [lindex $nodeinfo $k]
                set type [lindex $info end]
                if {[string compare $type NODEJOB] == 0} {
                        set userinfo [lindex $info 0]
                        set jobs ""
                        foreach u $userinfo {
                                set uname [lindex $u 0]
                                set jids [lindex $u 1]
                                foreach j [split $jids ","] {
                                        set jstr [lindex [split $j "."] 0]
                                        lappend jobs "$jstr.$uname"
                                }
                        }
			set jobslen [llength $jobs]
                        if { [string compare $nodestat INUSE-EXCLUSIVE] == 0 \
							     && $jobslen <= 1} {
                                set color [assignNodeColorInUse $jobs]
                        } else {
                                set color [assignNodeColorInUse TIMESHARED \
                                                $canvas(nodeColorINUSEshared)]
                        }
			break
                }
		incr k -1
        }
	if {[string compare $color ""] != 0} {
        	[nodeCanvasGet $nodeframe] configure -background $color
	}

}

proc nodeUpdateStat {sysframe nodeid status2 {defstat NOINFO}} {

        if {[string compare $sysframe ""] == 0} {
                return
        }
	set status [statNodesStateMap $status2]

        set nodeframe [systemNodeFrameGet $sysframe $nodeid FULL]

        set nodestat [systemNodeStatusGet $sysframe $nodeid]
        set oldstatus $nodestat

        if {[string compare $status ""] == 0} {
                set status [statNodesStateMap $defstat]
        }

        systemNodeStatusPut $sysframe $nodeid $status

        set clusterf [nodeClusterFrameGet $nodeframe]

        if {[string compare $clusterf ""] != 0} {
	  clusterStatsUpdate $clusterf $status +
	  clusterStatsUpdate $clusterf $oldstatus -
        }
}

proc nodeColorIt {nodeframe nodeid} {

        if {[string compare $nodeframe ""] == 0} {
                return
        }

        set cframe [nodeClusterFrameGet $nodeframe]
        set sysframe [clusterSystemFrameGet $cframe]

        set status [systemNodeStatusGet $sysframe $nodeid]

	switch -exact -- $status {
          OFFLINE {
                nodeOffline $nodeframe
          }
	  DOWN {
                nodeDown $nodeframe
          }
	  FREE {
                nodeUp $nodeframe
          }
	  INUSE-SHARED		-
	  INUSE-EXCLUSIVE	{
                nodeInUse $nodeframe
          }
          RESERVED {
                nodeReserved $nodeframe
          }
	  default {
                nodeNoInfo $nodeframe
          }
  	}

        set viewtype [nodeViewTypeGet $nodeframe]
        if {[string compare $viewtype ICON] == 0} {
                nodeReCoverCanvas $nodeframe
        }
}

proc nodeDisplayInfo {nodeframe queryInfo {create 0}} {

        if {[string compare $nodeframe ""] == 0} {
                return
        }

        set nodename [nodeNameGet $nodeframe]

        nodeColorIt $nodeframe $nodename

        set llen [llength $queryInfo]
	set jobline -1 
        for {set i 0} {$i < $llen} {incr i} {
                set queryinfo [lindex $queryInfo $i]
                set expr [lindex $queryinfo 0]
                set hdr  [lindex $queryinfo 1]
                set typ  [lindex $queryinfo 2]
                set res  [evaluateExpr $expr]

                if {[string compare $typ TEXT] == 0} {
                        if {$create} {
                                nodeAddLineText $nodeframe $i [list $hdr $res]
                        } else {
                                nodeModLineText $nodeframe $i [list $hdr $res]
                        }
                } elseif {[string compare $typ SCALE] == 0} {
                        if {$create} {
                                nodeAddLineScale $nodeframe $i [list $hdr $res]
                        } else {
                                nodeModLineScale $nodeframe $i [list $hdr $res]
                        }
                } elseif {[string compare $typ NODEJOB] == 0} {
			set jobline $i

                        if {[string compare \
                                     [nodeLineGet $nodeframe $i 0] ""] == 0} {
                                nodeAddLineText $nodeframe $i $hdr
                        } else {
                                nodeModLineText $nodeframe $i $hdr
                        }
                        set k [expr $i+1]
                        foreach e $expr {
                                set user [lindex $e 0]
                                set ljobs [lrange $e 1 end]
                                set arglist [list " " " " $user " " $ljobs]
                                if {[string compare \
                                     [nodeLineGet $nodeframe $k 0] ""] == 0} {
                                        nodeAddLineText $nodeframe $k $arglist
                                } else {
                                        nodeModLineText $nodeframe $k $arglist
                                }
                                incr k
                        }
                }
        }


        if {![info exists k]} {
                set k $i
        }
# Remove extra lines that are not found in queryInfo
        nodeRemLines $nodeframe $k

        nodeAdjustDisplay $nodeframe $jobline

        set viewtype [nodeViewTypeGet $nodeframe]
        if {[string compare $viewtype ICON] == 0} {
                nodeCoverCanvas $nodeframe
        } else {
                nodeUnCoverCanvas $nodeframe
        }
        update idletasks

}