File: issue23.html

package info (click to toggle)
lg-issue23 6-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,368 kB
  • ctags: 430
  • sloc: makefile: 34; sh: 34
file content (10623 lines) | stat: -rw-r--r-- 447,900 bytes parent folder | download
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
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> Linux Gazette Index Page </TITLE>
<META NAME="robots" CONTENT="noindex, nofollow">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0020F0"
ALINK="#FF0000" >
<center><H2><IMG SRC="../gx/newlogo.jpg" 
ALT="Linux Gazette... making Linux just a little more fun!">
</H2>

<H5>Copyright &copy; 1996-97 Specialized Systems Consultants, Inc.</H5>
</center>

<P> <HR> <P> 
<!--==================================================================-->
<center>
<H1>Welcome to Linux Gazette!<img src="../gx/tm.gif" alt="(tm)"></H1>
</center>
<P> <HR> <P> 
<!--==================================================================-->
<H1>Published by:</H1>
<center>
<H1><A HREF="http://www.ssc.com/lj/">
        <img src="../gx/ljlogo.gif" alt="Linux Journal"></A></H1>
</center>
<P><HR> <P>
<H1>Sponsored by:</H1>
<table>
<tr>
<td><H1><A HREF="http://www.infomagic.com/"><img ALIGN="bottom" HSPACE="70"
src=../gx/infologo.gif alt="InfoMagic"></A></H1></td>
<td>
<H1><A HREF="http://www.suse.com/"><img ALIGN="bottom" src=../gx/suse.gif alt="S.u.S.E."></A></H1></td>
<td>
<H1><A HREF="http://www.redhat.com/"><img HSPACE="70" src=../gx/redhat.gif alt="Red Hat"></A></H1></td>
</tr>
</table>

<P> 
Our sponsors make financial contributions toward the costs of
publishing <I>Linux Gazette</I>. If you would like to become a sponsor
of <I>LG</I>, e-mail us at <A
HREF="mailto:sponsor@ssc.com">sponsor@ssc.com</A>.


<P> <HR> <P> 
<!--=================================================================-->
<H1 align="center">Table of Contents <BR>December 1997 Issue #23</H1>

<P> <HR> <P>
<table><tr>
<td rowspan=4>
<UL>
<LI><A HREF="../index.html">The Front Page</A> 
<LI><A HREF="./lg_mail23.html">The MailBag</A> 
<ul>
<li><a HREF="./lg_mail23.html#ideas">Article Ideas</a>
<li><a HREF="./lg_mail23.html#help">Help Wanted</a>
<li><a HREF="./lg_mail23.html#gen">General Mail</a>
</ul>
<LI><A HREF="./lg_tips23.html">More 2 Cent Tips</A>
<ul>
<li><a HREF="./lg_tips23.html#spin">Spinning Down Unused HDs</a>
<li><a HREF="./lg_tips23.html#find">Finding What You Want with find</a>
<li><a HREF="./lg_tips23.html#cutpaste">Cutting and Pasting Without a Mouse</a>
<li><a HREF="./lg_tips23.html#slow">Slow Modem</a>
<li><a HREF="./lg_tips23.html#string">Finding Strings with find</a>
<li><a HREF="./lg_tips23.html#calc">Another Calculator Tip</a>
<li><a HREF="./lg_tips23.html#laptop">Upgrading a Laptop Hard Disk</a>
<li><a HREF="./lg_tips23.html#wall">Wallpaper</a>
<li><a HREF="./lg_tips23.html#post">PostScript</a>
<li><a HREF="./lg_tips23.html#virtual">Linux Virtual Console Key Sequences</a>
<li><a HREF="./lg_tips23.html#hidden">Netscape Hidden "Easter Eggs"</a>
</ul>
<LI><A HREF="./lg_bytes23.html">News Bytes</A>  
<ul>
<li><a HREF="./lg_bytes23.html#general">News in General</a>
<li><a HREF="./lg_bytes23.html#software">Software Announcements</a>
</ul>
<LI><A HREF="./lg_answer23.html">The Answer Guy</A>, by James T. Dennis
<ul>
<li><a HREF="./lg_answer23.html#monitor">Running Multiple Instances of X</a>
<li><a HREF="./lg_answer23.html#madness">VC Madness</a>
<li><a HREF="./lg_answer23.html#ospf">Linux and OSPF</a>
<li><a HREF="./lg_answer23.html#pop">Security Problems with pop3</a>
<li><a HREF="./lg_answer23.html#crypt">Cryptographic System</a>
<li><a HREF="./lg_answer23.html#ref">An Interesting De-Referencing Problem</a>
<li><a HREF="./lg_answer23.html#remind">Reminder!</a>
<li><a HREF="./lg_answer23.html#pcmcia">pcmcia ide Drives</a>
<li><a HREF="./lg_answer23.html#kde">KDE BETA 1</a>
<li><a HREF="./lg_answer23.html#program">Compression Program</a>
<li><a HREF="./lg_answer23.html#loadlin2">loadlin</a>
<li><a HREF="./lg_answer23.html#wipe">WipeOut</a>
</ul>
<LI><A HREF="./boulder.html">Boulder Linux Users Group</a>, by Wayde Allen
<LI><A HREF="./clue.html">Clueless At The Prompt</a>, by Mike List
<LI><A HREF="./comdex.html">COMDEX/Fall '97</a>, by Carlie Fairchild
<li><A HREF="./procmail.html">Configuring procmail with The Dotfile
Generator</A>, by Jesper Pedersen
<LI><A HREF="./gm.html">Graphics Muse</A>, by Michael J. Hammel
<LI><A HREF="./bench2.html">Linux Benchmarking: Part 2 -- Practical Concepts</a>,
by Andr&eacute; D. Balsa 
<LI><A HREF="./cftp.html">New Release Reviews</A>, by Larry Ayers
<ul>
<li><A HREF="./cftp.html">Comfortable Ftp</a>
<li><A HREF="./tkman.html">TkMan</A> 
</ul>
<li><A HREF="./flower/page1.html">Processes on Linux and Windows NT</A>, by Glen Flower
<li><A HREF="./shoham/drafth.html">Roll your own DBMS?!?</A>, by Idan Shoham
<li><A HREF="./successtory.html">Unioncamere Emilia-Romagna: an Italian
Public Administration Using Linux</A>, by Giamaolo Montaletti
<LI><A HREF="./wkndmech_dec97/wkndmech.html">Weekend Mechanic</A>, by John Fisk
<LI><A HREF="./x3270.html">x3270 and Linux</A>, by Chris Mason
<LI><A HREF="./lg_backpage23.html">The Back Page</A> 
<ul>
<li><a HREF="./lg_backpage23.html#authors">About This Month's Authors</a>
<li><a HREF="./lg_backpage23.html#notlinux">Not Linux</a>
</UL>
</UL>
</td>
</tr><tr>
<td align=center>
<A HREF="lg_answer23.html"> 
<img src="../gx/wizard2.gif" border=0 alt="">
</a>
<A HREF="lg_answer23.html"><i>The Answer Guy</i></a>  
</td>
</tr><tr>
<td align=center>
<A HREF="gm.html">
<IMG SRC="../gx/hammel/banner-3.gif" border=0 alt="">
</a>
</td>
</tr><tr>
<td align=center>
<img src="../gx/fisk/mechanic.gif" border=0 alt=""><BR> 
<A HREF="./wkndmech_dec97/wkndmech.html"><I>The Weekend Mechanic</I></a>
</td>
</tr><tr>
</table> 

<P> <HR><P> 
<!--=============================================================-->
<A HREF="./issue23.txt">TWDT 1 (text)</A><BR>
<A HREF="./issue23.html">TWDT 2 (HTML)</A><BR>
are files containing the entire issue: one in text format, one in HTML. 
They are provided 
strictly as a way to save the contents as one file for later printing in
the format of your choice; 
there is no guarantee of working links in the HTML version.
 
<!--=============================================================-->
<P> <HR><P> 
Got any <I>great</I> ideas for improvements!  Send your
<A HREF="mailto:gazette@ssc.com">comments, criticisms, suggestions
and ideas.</A>

<P><hr><p>
This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>

<P><hr><p>
<H4>"Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>  
<HR> 
<center>
<table width="100%" cellpadding=7><tr><td>
<H2><a NAME="mail"><IMG SRC="../gx/mailbox.gif" ALIGN=MIDDLE ALT=" ">
The Mailbag!</a> </H2>
Write the Gazette at <A HREF="mailto:gazette@ssc.com"> gazette@ssc.com</A>
</td><td>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_mail23.html#ideas">Article Ideas</a>
<li><a HREF="./lg_mail23.html#help">Help Wanted</a>
<li><a HREF="./lg_mail23.html#gen">General Mail</a>
</ul>
</td></tr></table>
</center>

<a name="ideas"></a>
<p><hr><p>
<!-- ===================================================================-->
<center><H3> Article Ideas </H3></center>
<P> <HR> <P> 
<!--====================================================================-->
<center><IMG ALT=" " SRC="./gx/iwantyou.gif"></center>
<P> 
We're back in business after a one month gap--no November issue--and we
need articles from you.
<P> 
So, all you budding authors and Linux users out there,
send me your material. Don't depend on our regular authors to fill the gap. We
want to hear about all the neat tips and tricks you've found, as well as
all the neat applications you are writing or working with. We also like to
hear how you are using Linux as a workplace solution. --Editor
<P> <P> <P> <P>

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Mon, 06 Oct 1997 01:40:46 +0100 <br>
From: Emmet Caulfield <a href="mailto:emmet@indigo.ie">emmet@indigo.ie </a><br>
Subject: Newbie Stuff
<p>
Hi,
<p>
I've noticed recently that there's an increasing volume of
questions on fairly elementary topics to your help page.
<p>
There's probably a fairly large volume of readers, like myself,
who correspond with the querants offering help, pointers, and
suggestions in the hope that they may be useful. I'm NOT an expert,
by any stretch of the imagination, being a recent "convert" of
only 10 months vintage.
<p>
I think that there is an argument for the Gazette running a
series of articles outlining a step-by-step setup procedure
specifically targetted at people setting up Linux on home
machines connected over the POTS in spite of the fact that
this would be duplicating efforts elsewhere (in HOWTOs and
such).
<p>
Just a suggestion.
<p>
I love the Gazette, you have struck a fine balance well - there
is something for everyone. I read 22 "cover to cover".
<p>
Keep up the good work,
<p>
Emmet

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Wed, 15 Oct 1997 18:28:05 -0700 <br>
From: Todd Martin <a href="mailto:zombie@ted.org">zombie@ted.org </a><br>
Subject: System Back up
<p>
I would love to see an article on backing up a Red Hat 4.2 system onto a
SCSI Tape drive.
<p>
I'm having trouble with it, and am finding information on it rare if not
impossible to find.
<p>
If anyone could point me in the right direction I would appreciate it.
<p>
Or contact me direct if its easy enough to explain.
<p>
Thanx

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Mon, 13 Oct 1997 21:13:24 -0500 <br>
From: "Cochran" <a href="mailto:scochran@shoalsnet.com">scochran@shoalsnet.com </a><br>
Subject: Article Idea
<p>
Hello,
     I'm a Linux newbie so please forgive any inaccuracies. :)  I think
someone should report on the Linux game scene.  Different projects that are
dealing with game projects like GGI and the Linux GDK.  Keep the good work
up everyone.  
<p>
Micah

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Tue, 14 Oct 1997 18:54:41 -0500 <br>
From: Glenn Meuth <a href="mailto:manderflawaxe@Dynasty.Net">manderflawaxe@Dynasty.Net
</a><br>
Subject: LJ Howto get TECH Info for NEWBIES
<p>
	I have been reading LJ recently, and I would like to request that an
article be written.  I have recently had (2) problems which I
researched, and only seemed to find dead ends for.  I purchased a new
computer recently :-) and,  as is probably common with such, had some
unsupported hardware.  This did not surprise me, having worked with
computers for some time.  So I proceeded to search hardware listings,
currently active projects, etc in order to find an answer, and found
nothing.  (My problem was with my UDMA harddrive controller card from
Promise.)  I began to email news groups and  Promise trying to get the
information I needed to write the code for the controller card myself. 
I could not seem to dig up any help on the subject of support for new
hardware.  My question: Could you please address an article on how to go
about attaining the information necessary to code this?
	Q(2) Could you also address how to get involved in the linux project?
<p>
	I have tried to get involved with projects (I am a relatively new C++
programmer (2 years)), in college, and there is little for me to do in
my area of the USA in order to exercise my C & C++ skills.  If you could
help me out here I would appreciate it!
<p>
Glenn Meuth

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Wed, 5 Nov 1997 04:11:55 -0800 (PST) <br>
From: Ron Culver <a href="mailto:ronc@earthlink.net">ronc@earthlink.net </a><br>
Subject: COMMENTS/SUGGESTION
<p>
Hi Folks,
<p>
First want to say I'm really glad the Gazette is on line... what
a great source for finding out new things!  Keep up the great
work - it's a real winner.  Next, want to suggest some needs on
this end you might find useful as an idea for a feature.  I run
a real tiny ISP biz in NM (my hometown, but live in CA) - and have
LOTS of questions related to running the system (do sysadmin via
telnet) - primarily system security issues, keeping the email
system running right, HTTPD (actually run Apache) questions,
and DNS issues.  What has most plagued me is the lack of a fresh
source of info to keep the system on the 'cutting edge' of new
developements in software.  One example is Java, something that
came along shortly after the server was first installed, which
I can not seem to get to run properly - and to date no one can
tell me why.  What I would like to see you try is a column that
addresses the questions/concerns of small POP's or ISP's - actually
anyone who is running Linux as a server on line would have similar
questions/concerns.
<p>
  Have a nice....
<p>
Ron Culver

<a name="help"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3> Help Wanted </H3></center>

<P> <HR> <P> 
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Sun, 12 Oct 1997 02:34:26 +0200 <br>
From: Guillermo S. Romero <a href="mailto:famrom@ran.es">famrom@ran.es </a><br>
Subject: Clipboard Ideas <br>
<p>
Hello:
<p>
I am a bit new to Linux and my programming skills are poor (time solves
everything), but I have brain (well, 2 overclocked neurons) and I think that
Linux (and Unix) have a problem with "cut & paste", aka clipboard. GPM is
fine, xclipboard too, some other systems also work, but its hard to move
from one system to another, and not all data can be copied.
<p>
I want to start a team to implement a clipboard in Unix, maybe using files
stored under something like /tmp/clip/ (or another /dev/foo?). :]
<p>
The main thing is that it should be able to work with text, graphics and
binary (archives, ie), like other OS do. I think that if we use a system
based in /dev/ , the system will support old apps (you only have to save to
the correct place emulating an app behaviour, and a demon will convert non
standard files to the ones supported by the clipboard). We can even made the
new clipboard a multiuser one. Or one with multiple buffers per user (like
Emacs, doesn't it?).
<p>
If someone is interested, just write. I have a draft so we can start the
discussion now. I must admit that my idea maybe look mad or too simple, but
that only demonstrates that I believe that usefullnes is directionaly
proportional to simplicity. :]
<p>
GSR

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Tue, 18 Nov 1997 11:10:08 -0500 <br>
From: Dan E. Collis <a
href="mailto:dcollis@marine.usf.edu">dcollis@marine.usf.edu </a><br>
Subject: Adaptec 2940 UW adapter
<p>
I am drowning!  Have called Adaptec to no avail.  They say they're not
supporting Linux.  Have tried all the loc's on redhat.com that I can
find and have had no luck.
<p>
Is there a driver available for an Adaptec 2940UW that's good for RedHat
4.2?  I'd sure appreciate some help on this one.
<p>
Many thanks,
<p>
dcollis@marine.usf.edu

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Mon, 10 Nov 1997 12:23:45 -0700 <br>
From: Chad Peyton <a
href="mailto:chadly@cs.WNMU.EDU">chadly@cs.WNMU.EDU</a><br>
Subject: PPP
<p>
    I'm trying to configure a ppp connection. So far the program mgetty
has got most things working. I don't know much about Linux, but this is
what I think I need to do: get the shell to run the following command.
<p>
    Puser - - /usr/sbin/pppd auth -chap +pap login kdebug 7 debug
<p>
But notice the message I get below when I call in:
<p>
Red Hat Linux release 4.2 (Biltmore)
Kernel 2.0.27 on an i486
<p>
login: chad <br>
Password: <br>
Last login: Fri Nov  7 15:36:54 on ttyS0 <br>
Warning: no access to tty (Not a typewriter).
<p>
Thus no job control in this shell.
It says that the shell isn't working or something. Do I need to get tty
working or what? How do I do that?
<p>
Also, after I logout the program quits on me. Is there a way to make
mgetty keep working after someone hangs up? Also is there a way to make
mgetty load at boot time?
<p>
Can you help me PLEASE,
<p>
Chad

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Sun, 09 Nov 1997 00:46:33 -0200 (br>
From: Javier Salem <a
href="mailto:bbscom@totalnet.com.ar">bbscom@totalnet.com.ar </a><br>
Subject: I need some help
<p>
I'm new using Linux but I learn so quicky.
I just downloaded Communicator for Linux tar version and did all the
installation steps,
but I don't understand how to set the environment variable
setenv.
I think that it's my problem because I can't see Netscape when I open
xwin,
so I can't use it yet
<p>
My name is Javier from Argentina.
I 'll be pleased if somebody could give me a hand.
Really thanks.

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Sat, 08 Nov 1997 09:37:44 -0800 <br>
From: Ted Rolle <a
href="mailto:ted.rolle@usa.net">ted.rolle@usa.net</a><br>
Subject: Accessing Win95 vfat drive
<p>
I've compiled vfat support into my 2.0.31 kernel.  How do I mount the
drives so Linux can "see" the Win95 partition?

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Wed, 08 Oct 1997 13:47:17 PDT <br>
From: "HoonChul Shin" <a
href="mailto:hoonchul@hotmail.com">hoonchul@hotmail.com</a><br>
Subject: Video woes
<p>
Greetings to every Linux lover!
<p>
When I run XFree86 ver. 3.2 with resolutions more than 640x340, and open 
menus and move windows around, I see white lines or streaks in my 
screen. It's very annoying. And when I exit Xwindows, and return to 
text mode, screen becomes impossible to read. Fonts just become nasty.
Is there anyone out there with same problems that I am having now? 
Video Card= Trident TGUI 9682 with 2 mb. 
<p>
Thanks! 
<p>
Hoon Chul

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Tue, 11 Nov 1997 12:51:25 +0200 <br>
From: Ihab Khoury <a
href="mailto:ikhoury@jrol.com">ikhoury@jrol.com</a><br>
Subject: NetFlex driver..
<p>
Greetings,
<p>
I am trying to install RH4.2 on a compaq Proliant 2500.
I have a NetFlex card built in and unable to read it..I saw that few
poeple have posted this before ..I was not able to find the driver.
Please e-mail me at ikhoury@jrol.com if you have any solutions.
Thank you in advance.

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Tue, 11 Nov 1997 11:52:48 +0100 <br>
From: Sven Goersmann <a
href="mailto:goersman@student.uni-kassel.de">goersman@student.uni-kassel.de</a><br>
Subject: scanner driver or scanner codes for RELISYS Infinty/Scorpio VM3550
<p>
Hi everybody there!
<p>
I just want to ask you if you know there's a Linux scanner driver for
the RELISYS Scanner Scorpio VM3550 from the Infinity series, and if so
where can I get it.
<p>
Thanks in advance, Sven.

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Tue, 11 Nov 1997 13:32:34 -0000 <br>
From: Roger Farrell <a href="mailto:rogerf@icon.co.za">rogerf@icon.co.za</a><br>
Subject: Emulators
<p>
Hi,
<p>
I am looking for emulators that support the 8088 and 80188 chips.
<p>
lf you can help please reply.
<p>
Regards 
Roger Farrell

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Fri, 10 Oct 1997 02:08:44 PDT <br>
From: Gilberto Persico <a
href="mailto:g_persico@hotmail.com">g_persico@hotmail.com</a><br>
Subject: Transaction Processing
<p>
Have you ever heard of Transaction Processing systems (such as CICS or
Encina or Tuxedo) available (free or commercial) for Linux ???

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Mon, 03 Nov 1997 19:06:53 +0100 <br>
From: Fabrizio <a
href="mailto:fabrizio@euro2001.com">fabrizio@euro2001.com</a><br>
Subject: chat 
<p>
HI!
<p>
I am looking for a chat program for Unix.
Can you send to me some tips about this?
<p>
Thank you and best regards.
<p>
Fabrizio Piccini

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Sun, 2 Nov 1997 02:04:28 +1100 (EST) <br>
From: Shao Ying Zhang <a
href="mailto:s2193893@cse.unsw.edu.au">s2193893@cse.unsw.edu.au</a><br>
Subject: Sorry! - RE: SB16 and MIDI
<p>
I am sorry for this second mail; I forgot to tell you what the problem
is. OK, the problem is that it plays without returning any errors, but simply
no sound comes out.
<p>
Thanks very much!
<p>
        I am using Sound Blaster 16 for my system. My Linux version is
Redhat 4.2 with the kernel 2.0.30.
<p>
        I recompiled the kernel properly (I think) to make my SB16 work. It
now can play wave, mod, CD but NOT MIDI. 
<p>
        I can only use timidity to convert them into wave and then play.
This means that /dev/sequencer does not work properly.
<p>
        I have also noticed that a couple of other friends have the same
problem.
<p>
        Could you help me PLEASE???
<p>
        Thanks in advance!
<p>
Shao Zhang <br>
2/896 Anzac PDE <br>
Maroubra 2035 <br>
Australia

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Wed, 29 Oct 1997 19:51:44 +0900 <br>
From: "Chun, Sung Jin" <a
href="mailto:ninja@aerohel.snu.ac.kr">ninja@aerohel.snu.ac.kr</a><br>
Subject: [Q] PCMCIA IBM CD-400 Help me.
<p>
 I want to access cd-rom using my IBM cd-400 PCMCIA
CDROM. But I don't know how can I do this.
Please help me.

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Mon, 27 Oct 1997 14:07:47 -0800 <br>
From: "Possanza, Christopher" <a
href="mailto:norvien@halcyon.com">norvien@halcyon.com</a><br>
Subject: HELP!  Possible to use parallel port tape drives with linux?
<p>
Does anyone know if it's possible to use parallel port tape drives to
backup a Linux system?
I've got the HP Colorado T1000e drive, and I'd love to be able to use
it...  Any suggestions?
<p>
Christopher Possanza

<a name="gen"></a>
<P> <hr> <P> 
<!-- =================================================================== -->
<center><H3> General Mail </H3></center>

<P> <HR> <P> 
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Mon, 06 Oct 1997 18:24:12 GMT <br>
From: Harry Baecker <a
href="mailto:hbaecker@island.net">hbaecker@island.net</a><br>
Subject: Word Processing & Text Processing
<p>
In his article in Issue 22, subject as above, Larry Ayers indulges in
the requisite Unixworld denigration of word processor software and
its users, as contrasted with the virtues of software "which allows
the writer to focus on content rather than appearance". I suggest that
there are some errors in this ritual obeisance to received wisdom.
<p>
The first is that all who yearn for the services of a word processor lust
to inflict another Gibbon, "The History of the Decline and Fall of the
Roman Empire", or Russell & Whitehead "Principia Mathematica" upon the
world. Were that so then the world would be more than hip deep in
rejected typescripts already. Rather, I, and I am sure most others,
wish to prepare snailmail with some attention to personalised format
and typography, which is exactly what a reasonable word processor
provides. I certainly do not look for the archetypal offense in Ayers'
universe of discourse, Microsoft Word for Windows. I have borrowed,
used, and rejected that, and I have owned, and given away AmiPro
(WordPro) and abhorred Word Perfect since its inception. What I would
like to use in Linux is some clone of Wordpad, of MS-Write, or of the
word processors included with MS-Works or ClarisWorks, wherein I can
govern not only the content but also the appearance of my message.
<p>
It is true that Lyx seems to be a reasonable compromise, unless you
find, as I do, that the assumptions built into its templates are
displeasing to the eye.
<p>
The second error is to assume as gospel the correctness of Unix
conventions for ASCII text. The ASCII encoding was officially adopted
by ISO in 1964. That included provision for the CR/LF pair, and a
functional backspace (not left-erase). Anyone familiar with hardcopy
terminals of the time, such as Flexowriters, will also remember the
joys of "line reconstruction" procedures, to encode, say, lines of
Algol 60 program text, in a useful internal representation. Tortuous,
but that's what we expect computers to do for us.
<p>
The text representation conventions of Unix were born together with
the limited representational capabilities of video terminals,
character generators with limited repertoires, no "backspace and
overtstrike" abilities, hence no way of effecting backspace or CR.
By the time proper graphic facilities, and hence font choices, became
available the Unix conventions for ASCII text had ossified, and the
flexibility actually made available by the original ASCII conventions
were treated with disdain. Had Unix embraced the full flexibility
offered by the ASCII encoding then things might have been otherwise.
<p>
Harry Baecker
 
<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Tue, 14 Oct 1997 14:26:20 -0400 (EDT) <br>
From: Paul Lussier <a
href="mailto:plussier@baynetworks.com">plussier@baynetworks.com</a><br>
Subject: Thanks!
<p>
Hi,
<p>
I've been reading the LG since issue 1 when I first stumbled upon John
Fisk's web page from an Alta Vista search for Linux info.  All of you at
SSC have done an unbelievably outstanding job with both LJ and LG, and I
just wanted to say thanks.  I look forward to the first week of every
month when there is a new LG to grab off the net, and a new LJ waiting in
my mailbox.  I read them both cover to cover each and every month.
<p>
I do Unix sysadmin for a living and still benefit from so much of what is
originally written with Linux in mind and am able to reuse it on other
"Unices" as well.
<p>
Also, I just checked out CANLUG On-line magazine.  It's not bad.  Maybe
you people (and the rest of us too) who have done such a terrific job with
LG, can give them a hand getting their's off the ground.  After all,
the whole spirit of the Linux community is helping one another :)  And we
can all benefit from another on-line, enjoyable source of Linux news and
info :)
<p>
Thanks again!
<p>
Happy Linuxing,
<p>
Seeya,<br>
Paul

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Fri, 07 Nov 1997 21:05:22 -0800 <br>
From: Andrew T. Young <a
href="mailto:aty@mintaka.sdsu.edu">aty@mintaka.sdsu.edu</a><br>
Subject: word vs. text processing
<p>
While reading Larry Ayres's comments (mostly quite sound) about TeX,
LOUT, groff, etc., I noticed he was sort of behind the curve on *roff.
<p>
First, there are several *good* books on this family of text processors.
I have <I>troff Typesetting for UNIX Systems</I> by Sandra L. Emerson and
Karen Paulsell (Prentice-Hall, 1987), as well as <I>UNIX Text
Processing</I>
by Dale Dougherty and Tim O'Reilly (Hayden Books, 1987).  In addition
there is a rather specialized book on the tbl pre-processor called
something like "setting tables with tbl" -- I don't seem to be able to
lay hands on it right now.  (I might add that I consider tbl to be
considerably superior to LaTeX's clumsy handling of tabular material.)
<p>
After you read these books, it's easy to make up a set of formatting
macros that do for the *roff family exactly what LaTeX does for TeX.
You can then invoke these very much the way the LaTeX macros are
invoked; indeed translation from the *roff to the *TeX markup is pretty
easy at that point (though there are a few subtleties that cause
problems).  LaTeX has a very few advantages for very esoteric
mathematical equations; apart from that, the systems are very similar.
<p>
Yes, the underlying engine is opaque as hell to figure out;
nevertheless, it's powerful and effective.  I still prefer *roff to
LaTeX, but have been forced to live with *TeX because the journals I use
all employ it.
<p>
One more historical item: Larry called nroff "newer" than troff, but
it's the other way around.  Originally, there was some formatter called
roff (short for runoff); then came nroff for "new runoff" and then
*later* came troff for typesetting.
-- 
Andrew T. Young

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Mon, 3 Nov 1997 09:17:40 -0500 <br>
From: Jack Chaney <a href="mailto:jac14@chrysler.com">jac14@chrysler.com</a><br>
Subject: new_user_setup
<p>
Hi,
<p>
I too am a relative newbie (again) to Linux but am sold on a lot of the
conceptual aspects of the system (shareware, GNU, free downloads, world
wide support, etc.)  I am also quite comfortable with the stability and
security of the OS.  I'm not, however, satisfied with the quality of
support for new users or "non-experts."
<p>
My argument is this, if you are trying to compete in the world market
with the IBM's and Microsoft's you need to study what it is that made
them so popular in the first place.  Availability of applications,
which Linux is doing a much better job addressing, is one of the
pieces that make them so prominent, but it's only one of the pieces.
The popularity of WIN95 in particular is due to the ease of installation of
the wanted systems and applications, and the focus on the end user.
<p>
In the world of computer users the highest percentage of computers are set
up as single user systems linked to a network, or some central server
and/or ISP.  The majority of documentation material for Linux has done
an excellent job of describing how to create and maintain the system as
a central server, but very little copy is devoted to running Linux as a
client station.  Red Hat and others have made great strides toward
making the install process as painless as possible (my first install
attempt was back in the 0.98 days).  I am able to get most of the
systems up and running but any time I have questions about a particular
package, the files it accesses, and where the files reside, is always
viewed as a fishing expedition.
<p>
Also a great deal of software gets installed by the standard install
process with descriptive text about what the application is during the
install (I can't read that fast), with a memo at the end of
installation that a list of what was installed can be found in the log
directory.  When I went to look at the log what I found was a listing
of the package titles that were installed (little more than the
filename of the RPM file) and no description about what the package
does.  I found the HOWTO information, but I tend to work better when I
can read the instructions from hard copy while I work with the
application on the screen.  I could (and do) print out the docs I am
working with but the expense of this one-of printing is tedious since I
spent extra money to get the documentation.  It is also particularly
annoying because the documentation has highly detailed chapters on
how to recompile the kernel (which isn't broken and works just fine)
and little more than a paragraph making reference to creating a dial-up
client connection to an ISP (which is what most people want).
<p>
I am a computer professional who is quite familiar with OS systems and
embedded coding and would like to convince management that a Linux-based
development environment would be a good new direction for our
teams, but it is a hard sell when the response to on-line queries tends
to come off as the respondents turning up their nose saying "that
information is in the docs" and no clue as to which docs or where.  If
the respondents know the answer but are tired of answering this
question "again" either reprint the old answer, point out where the old
answer can be looked up, or answer the question "again," not blow the
person off because the question isn't interesting enough.  Microsoft
and IBM got where they are by taking special interest in always
answering the "elementary" questions.  I realise the nature of Linux
precludes focusing any resources since it doesn't really have any.  But
if the general Linux public would take a better attitude toward people
wanting to join up, and lend a helping hand when possible, Linux could
become a major force in the computer industry.
<p>
Jack Chaney

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Fri, 24 Oct 1997 17:16:04 -0700 <br>
From: Felix Liebau <a
href="mailto:fliebau@metronet.de">fliebau@metronet.de</a><br>
Subject: e mail subscribe?
<p>
Hi, 
<p>
Thanks for that great journal, <I>Linux Gazette</I>, which I really like to
read.
Can I subscribe to have new issues mailed to me?
<p>
Felix Liebau
<p>
<blockquote><I>(No, it is impractical to use e-mail to send such large
files as those that make up LG--1 to 2 MB total for each issue. However, check out the
Front Page for information about our new notification mail
list. --Editor)</I></blockquote>

<P> <HR> <P>
<!--====================================================================-->
<IMG ALT=" " SRC="../gx/envelope.gif">

Date: Wed, 12 Nov 1997 23:36:43 +0000 <br>
From: I.P. Robson <a href="mailto:p.wyrd@netcomuk.co.uk">
p.wyrd@netcomuk.co.uk</a><br>
Subject: More Praise
<p>
You probably get enough of it. But here's more praise.
I've just come accross this magazine and its the most useful
and interesting thing I've come across since Linux itself.
<p>
Sorry to hear about the November issue but this magazine must
be so fundamental to everything that isn't Gatesian that you
have to keep on going.
<p>
I wish I had a huge bundle of cash to send you, but you'll have
to make do with this E-mail instead.
<p>
You should have a logo ready to go on every Linux web page 
everywhere.
<p>
I don't often gush with praise and I'd be embarassed if any
of my gum chewing friends read this. But you deserve it.
<p>
I.P. Robson <br>
-- <br>
The goal of Computer Science is to build something that will last at
least until we've finished building it.

<P> <hr> <P> 
<!--================================================================-->
<center>Published in Linux Gazette Issue 23, December 1997</center>
<!--====================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF 
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT 
PAGE ]"></A> 
<A HREF="./lg_tips23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P>
<h5>This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR> 
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5> 
<P> 
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>
&quot;</H4>
<P> <hr> <P> 

<!-- QUICK TIPS SECTION ==================================================  -->
<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.gif">
More 2&#162; Tips!</A></H1> <BR>
Send Linux Tips and Tricks to <A HREF="mailto:gazette@ssc.com">
gazette@ssc.com
</A></center>

<p><hr><p>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_tips23.html#spin">Spinning Down Unused HDs</a>
<li><a HREF="./lg_tips23.html#find">Finding What You Want with find</a>
<li><a HREF="./lg_tips23.html#cutpaste">Cutting and Pasting Without a Mouse</a>
<li><a HREF="./lg_tips23.html#slow">Slow Modem</a>
<li><a HREF="./lg_tips23.html#string">Finding Strings with find</a>
<li><a HREF="./lg_tips23.html#calc">Another Calculator Tip</a>
<li><a HREF="./lg_tips23.html#laptop">Upgrading a Laptop Hard Disk</a>
<li><a HREF="./lg_tips23.html#wall">Wallpaper</a>
<li><a HREF="./lg_tips23.html#post">PostScript</a>
<li><a HREF="./lg_tips23.html#virtual">Linux Virtual Console Key Sequences</a>
<li><a HREF="./lg_tips23.html#hidden">Netscape Hidden "Easter Eggs"</a>
</ul>

<P> <hr> <P> 
<!--================================================================-->

<a name="spin"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Spinning Down Unused HDs
</H3><P> 
Date: Sat, 8 Nov 1997 18:34:07 +0100 (MET)<br>
From: Philipp Braunbeck <a
href="mailto:100.182763@germany.net">100.182763@germany.net</a><br>

<P>I guess there's no more  need to emphasize how  much we all like
LG. Here's just my humble-newbie-one-and-a-half. 

<P>If You're like me and You've been upgrading for a couple of years
now  You're likely to  have several  HD's on  Your  IDE- or
SCSI-Interfaces. Now there's probably some GNU-Linux-partition and one
or more other partitions with M$-stuff on a separate disk. I've got a
120MB Conner (with actually  nothing on it, I  use it  as  a
backup-device; it used to be win3.1, but I don't need it anymore :-)
which is horribly loud. In the old days of DOS one friend of mine
wrote a little Pascal-program which would stop the disk after a period
of time, and it would only restart on some (hardware?)-interrupt.
Some modern BIOSes can do that job for You, but people told me, that
either it doesn't work on Linux (because the BIOS is only used on
bootup in order to get some basic  configuration) or it is not
recommended to do so anyway. 

<P>When I was on some adventure-trip through /usr/sbin, I discovered
some new species called "hdparm", which should be included on any
major distribution. The manual page says that you can use it to spin
down any drive on Your system!  All You need to do now is putting a
line like "hdparm -S1 /dev/hdb" in some boot-startup-script (I guess
the filenames differ in different distributions) and You're done. What
a silence! 

<P>However, You shouldn't do it with Your working /-partition, as it
syncs the disk every now and then and the disk will keep starting and
stopping, and this is definitely not good for any HD. 

<P>If You like my 2-cent just go ahead and publish it. If not, there
will certainly be a good reason for this. As I am a newbie, i.e. I've
been using GNU/Linux for about one year now, I'm humble enough to
admit that this  hint seems more than obvious  to any experienced
user. But if You decide to publish it,  I'd prefer that I can stay
anonymous, not because I got anything to hide, but because I don't
want to pretend to be someone I'm not, like a sysadmin or I dunno.
I've got too much respect for them guys who are lots more intelligent
than I am, but would they ever consider to mail something as primitive
as I suggest to  LG? It really is a  matter of getting started for
unexperienced users, finding that GNU/Linux gets even more powerful
while sorting it all out. So just put it in "Clueless at the prompt"
or where You like. Sign with Your name, You knew the trick anyway,
didn't You? 


<P> <hr> <P> 
<!--================================================================-->

<a name="find"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Finding What You Want with find
</H3>
<P> 
Date: Wed, 12 Nov 1997 16:14:43 +0000 (GMT)<br>
From: Jon Rabone <a href="mailto:jkr@camcon.co.uk">jkr@camcon.co.uk</a><br>

<P>In the October 97 issue, Dave Nelson suggests using

<pre>find . -type f -exec grep "string" /dev/null {} \;</pre>

to persuade grep to print the filenames that it finds the search
expression in. This starts up a grep for each file, however. A shorter and
more efficient way of doing it uses backticks: 

<pre>grep "string" `find . -type f`</pre>

<P>Note however, that if the find matches a large number of files you may
exceed a command line buffer in the shell and cause it to complain. 


<P> <hr> <P> 
<!--================================================================-->

<a name="cutpaste"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Cutting and Pasting without a Mouse 
</H3>
<P> 
From: <a
href="mailto:fk5a005@rrz.uni-hamburg.de">fk5a005@rrz.uni-hamburg.de</a><br>
Date: Wed, 5 Nov 1997 18:58:41 +0100<br>

<P>It is possible, I did think there was no way but there is a way to cut 
and paste without any mouse.
Just use screen-3.6x to achieve what you may have wanted for a long time.
you use screen already but did you know how to use this cut-and-paste tool?

<ul>
<li>Use control-a and ESC to switch on Copy-mode.
<li>"Drive" thru your screen with j,k and all the other well known vi-movements.
<li>Mark the area to copy with the space-key.
<li>Mark the end of the area with a space-key.
<li>Go to another window with e.g. control-a n .
<li>Press control-] where you want the pasting to happen.
 ready!
</ul>
<P>This was pasting without leaving your keyboard for a while!

<P>Control-a can be any key to achieve a screen-3.6 command.
There are many more very useful features with screen but i guess
that like me there are people out there who may not know this very
useful feature. 
Another hint: It is really worth printing the Manual.
If like me you are going by train you can read the Manual x.
I found out there are so many important features in so many programs I
did not know and that did help me a lot after discovering.

<P>About vim and completion:
there is a feature that lets you complete words which you did write
before which is very, very useful.
press control-n in Insert-mode and vim will complete your word if you
typed it before.
It is even better:
You can get vim to complete words that are in a different file.
Just tell vim what the name of the file is with
:set dictionary=file
Then complete the word with control-x-control-k.
Now imagine how much easier it may be to get a list of words with
a grep command than to write down all kinds of abbreviations and put
them into a file. 
This is a Killer-feature IMO!

<P>About emacs and completion:

<P>Emacs was first with completion or at least this kind of completion
mentioned for vim goes back to 1992.
What you need is hippie-exp.el which can perform all kinds of
completion.


<P>About atchange

<P>There is a very nice script out there written in perl.
I like it very much because it lets you perform an action whenever
you change the date of a file. The action can be almost anything
like calling another program and executing things or whatever you want.
The idea came from Tom Schneider who has a page about atchange out there:
<a
href="http://www-lmmb.ncifcrf.gov/~toms/atchange.html">http://www-lmmb.ncifcrf.gov/~toms/atchange.html</a>

<P>I strongly encourage you to read it, this is an idea, that can really
save your time. The perl-script itself is only 68 lines of code.
almost one half is explanation, the most important thing is the idea
itself but Tom has a good page. So I don't tell you more right now :)

<P> <hr> <P> 
<!--================================================================-->

<a name="slow"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Slow Modem
</H3>
<P> 
Date: Mon, 3 Nov 1997 17:45:13 -0600 (CST)<br>
From:Michael J. Hammel<a
href="mailto:mjhammel@long.emass.com">mjhammel@long.emass.com</a><br>
To: Larry E Scheib <a
href="mailto:scheib@tenet.edu">scheib@tenet.edu</a><br>

<P>In a previous message, Larry E Scheib says:
<P><I>When I access a remote site with Linux my screens paint painfully slowly;
a problem I don't experience with Windows95. When my modem connects under
Linux it replys "Connected at 38,400", the actual speed of my modem.
The modem runs off of cua1, IRQ 3.</I>

<P>I'm not very good at debugging modem connections. I've never really had
any problems with my dial-ups except when the network itself is bogged
down. To be honest, I have no idea how fast my modem connections are
actually running. I just know they're tolerable (they actually seem to run
quite fast - I have a 33.6 modem).

<P>Things that might affect this would be:
<ol>
<li>some other process sitting on cua0 - perhaps a getty?
<li>You didn't run setserial, a command to setup your serial ports for use
  with modems. I've never run this myself, but I know others have had to do
  so in order to get better throughput. Perhaps its because I don't use MS
  so my ports are not switched back and forth between MS and Linux settings.
</ol>


<P> <hr> <P> 
<!--================================================================-->

<a name="string"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Finding Strings with find
</H3>
<P> 
Date: Tue, 28 Oct 1997 16:31:47 +0100<br>
From: Gordon Walker <a
href="mailto:hellcat@easynet.fr">hellcat@easynet.fr</a><br>

<P>Being new to Linux I find the Tips section very useful in general and
the tip about searching for a string with find inspired me to write my
first conditional Bash script. It finds a string in the current or given
directory

<pre>#!/bin/sh
## Recursively finds all strings in given or current directory
## Usage string_search &lt;dir&gt; &lt;string&gt; (dir is optional)
## For example:		 "string_search fish " finds string "fish" in current
directory
##	and 		"string_search /water fish " finds string "fish" in directory
/water
if [ "$2" = "" ]; then
	find . -type f -exec grep "$1" /dev/null {} \;
else
	find $1 -type f -exec grep "$2" /dev/null {} \;
fi
</pre>



<P> <hr> <P> 
<!--================================================================-->

<a name="calc"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Another Calculator Tip
</H3>
<P> 
From: Frank Damgaard <a href="mailto:frank@diku.dk">frank@diku.dk</a><br>
Date: Thu, 23 Oct 1997 22:05:14 +0200 (METDST)


<P>In issue 21 there was a smart perl based command line calculator,
here is another one. 

<P>I have for some years used a simple alias for the calculator command. 
The alias only requires awk, and that tcsh (or csh) is the running shell.
This alias will not work with bash/sh/ksh since these shells do not allow 
arguments in aliases. 

<P>Just place the following line in your ~/.tcshrc or type at the prompt:

<pre>alias calc 'awk "BEGIN{ print \!* }" '
# When calling calc do not escape "*":
# Example:  calc (3+5)*4/5</pre>


<P> <hr> <P> 
<!--================================================================-->

<a name="laptop"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Upgrading a Laptop Hard Disk
</H3>
<P> 
Date: Fri, 24 Oct 1997 14:38:58 -0400<br>
From: Peter Teuben <a
href="mailto:teuben@astro.umd.edu">teuben@astro.umd.edu</a><br>

<P>I wanted to upgrade the harddisk of my laptop, which had gotten
a bit tight with 800Mb and maintaining both linux and W95 (don't
ask).

<P>I got a new 2Gb drive, and of course wanted to install W95 as well as
linux. I decided, despite my die-hard Slackware, to try RedHat4.2 for
linux and basically "copying" W95. Since the laptop is on a local
ethernet at home, I could make a backup of W95 on the desktop, and after
linux was braught up, restore W95 back over the network. Indeed this
worked quite nice, but you have to remember a few tricks. Here were my
basic steps:

<ol>
<li>backup, using tar, the old /DOS partition accross the network
<li>replace drive, partitioned as dos on /dev/hda1, swap on hda2,
ext2 on hda3 and hda4.
Don't forget to toggle the bootable flags of hda1.
<li>installed linux on hda3, and did 'mkdosfs /dev/hda1' to format
the dos partition from within linux (using DOS bootfloppy
and FORMAT should work just as well, see my FAT32 caveat below)
LILO was installed at this stage to boot linux as well as W95.
<li>by default RedHat mounts hda1 as 'dos', but you need to
re-mount this still empty partition as 'vfat':
 <pre>umount /DOS
		insmod vfat
        mount -t vfat /dev/hda1 /DOS</pre>
<li>untar the previously saved dos.tar back to /DOS, via the network
from the desktop machine. Since /DOS is vfat, it will properly
keep the long names.
<li>reboot the machine with a previously made 'emergency W95
bootfloppy' and run "SYS C:" to restore the bootimage
<li>reboot and select W95 from the LILO prompt, and it should all
work nicely now (it did for me).
</ol>
<P>Caveat: For FAT32 versions of W95 (from OSR2 or W98) you may need to
patch the 2.1.x kernels to include this. 



<P> <hr> <P> 
<!--================================================================-->

<a name="wall"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Wallpaper
</H3>
<P> 
Date: Mon, 27 Oct 1997 14:38:35 +0100<br>
From: Roger Irwin <a href="mailto:irwin@mail.com">irwin@mail.com</a><br>

<P>Use netscape, got xv?

<P>Try running this script in your home directory:

<pre>rm -f XVbaa
for foo in .netscape/cache/*
do
for baa in $foo/*.gif
do
echo $baa >>XVbaa
done
done
xv -root -quit -random -flist XVbaa</pre>

<P>This will make you a custom wallpaper on the fly by fishing in netscapes
cache.

<P>I mapped this to my fvwm2 button bar by using the following lines in
.fvwm2rc95:

<pre>*FvwmButtons(Title Mood, Icon exit.xpm, \
       Action 'Exec XVchange ')</pre> 

<P>This goes in the FVWM buttons section in the middle of the other lines
that define the other buttons....
When I hit the Mood button, the wallpaper changes.
I suppose a lazier person might use crontab....

<P> <hr> <P> 
<!--================================================================-->

<a name="post"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
PostScript
</H3>
<P> 
Date: Sun, 9 Nov 1997 22:00:31 +0000 (GMT)<br>
From: Ivan Griffin <a
href="mailto:ivan.griffin@ul.ie">ivan.griffin@ul.ie</a><br>

<P>Counting the Number of Pages in a file

<P>To count the number of pages in a PostScript file, you are relying on the
creator of the file to have been a sociable application and to have followed
the Adobe Document Structuring Conventions (ADSC).
These conventions entail the automatic placement of comments (%%) in the
PostScript source so that additional applications will find it easier
(and indeed, possible!) to post-process the PostScript without having
to interpret it. They are generally ignored by PostScript interpreters
and printers.
The comment '%%Page:' delimits each new page. So to count the number of pages
in a DSC compliant PostScript file, all you have to do is grep for the
number of '%%Page:' markers:

<pre>grep -c '%%Page:' filename.ps</pre>

I generally tend to alias this to pspage in my .cshrc

<pre>alias pspage 'grep -c %%Page:'</pre>

<P>Printing 2up

<P>The utility pstops, part of the psutils package, allows you to process
a PostScript file to enable 2up printing. I find the following works
for A4 (European) paper -- the measurements will need to be tweaked
for US Letter:

<pre>alias psdouble 'pstops "2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)"'</pre>

<P>To use it, it is as simple as:

<pre>psdouble &lt; 1up.ps &gt; 2up.ps</pre>


<P>Microsoft Ugly PostScript

<P>Quite often in PostScript generated by the Microsoft Windows driver, it
requires the interpreter to have 30MB of memory, and refuses to print
otherwise!! This is quite incredible, and I have found that it always
seems to print perfectly well if this artifical limit is removed. The
PostScript in question is:

<P>/VM? {vmstatus exch sub exch pop gt { [
(This job requires more memory than is available in this printer.) 100 500
(Try one or more of the following, and then print again:) 100 485
(In the PostScript dialog box, click Optimize For Portability.) 115 470
(In the Device Options dialog box, make sure the Available Printer Memory is accurate.) 115 455
(Reduce the number of fonts in the document.) 115 440
(Print the document in parts.) 115 425
12 /Times-Roman showpage
(%%[ PrinterError: Low Printer VM ]%%) =
true FatalErrorIf}if} bind def
30000 VM?

<P>The line "30000 VM?" checks that (roughly) 30MB of memory is available
in the printer. Deleting this line is sufficient to ensure that the
check is not performed, and that the job will now print (or be interpreted
successfully in ghostview for example).


<P> <hr> <P> 
<!--================================================================-->

<a name="virtual"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Linux Virtual Console Key Sequences
</H3>
<P> 
Date: Sun, 9 Nov 1997 22:00:31 +0000 (GMT)<br>
From: Ivan Griffin <a
href="mailto:ivan.griffin@ul.ie">ivan.griffin@ul.ie</a><br>

<P>Pressing these key sequences on a VC will dump information to the screen.

<P>Displaying task information:

<P>Ctrl-Scroll Lock gives:
<pre>             free            sibling
 task       PC  stack  pid father child younger older
swapper  0 R current  4096   0   0   1
init    1 S FFFFFFFF 2676   1   0  706
kflushd  2 S 00000000 3984   2   1       3
kswapd   3 S 00000000 3976   3   1       4   2
nfsiod   4 S 00000000 3520   4   1       5   3
nfsiod   5 S 00000000 3520   5   1       6   4
nfsiod   6 S 00000000 3520   6   1       7   5
nfsiod   7 S 00000000 3520   7   1      21   6
bash    8 S 00000000 3012  172  164  711
login   9 S 00000000 2820  164   1  172   166  135
kerneld  10 S 00000000 3224  21   1      76   7
login   11 S 00000000 3012  706   1  712      571
syslogd  12 S FFFFFFFF 3192  76   1      85  21
klogd   13 R 00000000 3404  85   1      96  76
crond   14 S 00000000 3480  96   1      108  85
inetd   15 S FFFFFFFF 3464  108   1      119  96
lpd    16 S FFFFFFFF 3376  119   1      135  108
gpm    17 S 000B206C 3368  135   1      164  119
vi    18 S FFFFFFFF 3012  711  172
mingetty 19 S FFFFFFFF 3012  166   1      167  164
bash   20 S 00000000 3012  712  706  724
httpd   21 S 00000000 3460  573  571      574
httpd   22 S 00000000 3600  574  571      575  573
httpd   23 S 00000000 3308  571   1  579   706  171
httpd   24 S 00000000 3600  575  571      576  574
mingetty 25 S FFFFFFFF 3012  167   1      168  166
mingetty 26 S FFFFFFFF 3012  168   1      169  167
mingetty 27 S FFFFFFFF 3012  169   1      171  168
httpd   28 S 00000000 3600  576  571      577  575
update  29 S 00000000 3460  171   1      571  169
httpd   30 S 00000000 3600  577  571      579  576
vi    31 S FFFFFFFF 3012  724  712
httpd   32 S 00000000 3600  579  571         577
</pre>

<P>Displaying Memory Information

<P>Shift-Scroll Lock gives:

<pre>Mem-info:
Free pages:    3136kB
 ( 4*4kB 0*8kB 1*16kB 1*32kB 0*64kB 24*128kB = 3136kB)
Swap cache: add 0/0, delete 231912/0, find 0/0
Free swap:    16596kB
5120 pages of RAM
789 free pages
449 reserved pages
2572 pages shared
Buffer memory:   2324kB
Buffer heads:   2340
Buffer blocks:   2324
Buffer[0] mem: 1953 buffers, 10 used (last=1953), 0 locked, 0 protected, 0 dirty 0 shrd
Buffer[2] mem: 337 buffers, 25 used (last=337), 0 locked, 0 protected, 0 dirty 0 shrd
Buffer[4] mem: 3 buffers, 3 used (last=3), 0 locked, 0 protected, 3 dirty 0 shrdSize  [LAV]   Free Clean Unshar   Lck  Lck1  Dirty Shared
 512 [  0]:    0    0    0    0    0    0    0
 1024 [ 186]:   31  1953    0   337    0    3    0
 2048 [  0]:    0    0    0    0    0    0    0
 4096 [  0]:    0    0    0    0    0    0    0
 8192 [  0]:    0    0    0    0    0    0
0</pre>

<P> <hr> <P> 
<!--================================================================-->

<a name="hidden"></a>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
Netscape Hidden "Easter Eggs"
</H3>
<P> 
Date: Sun, 9 Nov 1997 22:00:31 +0000 (GMT)<br>
From: Ivan Griffin <a
href="mailto:ivan.griffin@ul.ie">ivan.griffin@ul.ie</a><br>

<P>These special URLs do interesting things in Netscape Navigator and
Communicator.

<pre>about:cache gives details on your cache
about:global gives details about global history
about:memory-cache
about:image-cache
about:document
about:hype
about:plugins
about:editfilenew

view-source:URL opens source window of the URL</pre>

<P>Ctrl-Alt-F take you to an interesting site :-)


<P> <hr> <P> 
<!--================================================================-->
<center>Published in Linux Gazette Issue 23, December 1997</center>
<P> <hr> <P> 
<!--================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF 
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif" 
ALT="[ FRONT PAGE ]"></A> <A HREF="./lg_mail23.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./lg_bytes23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>

<P> <hr> <P>
<h5>This page maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR> 
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5> 
<P> 
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;</H4>
<HR>
<center>
<table cellpadding=7><tr><td>
<IMG SRC="../gx/bytes.gif" border=1  ALT="News Bytes">
</td><td>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_bytes23.html#general">News in General</a>
<li><a HREF="./lg_bytes23.html#software">Software Announcements</a>
</ul>
</td></tr></table>
</center>

<a name="general"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3> News in General </H3></center>

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
New URL for LG
</H3> 
<P> 

<i>Linux Gazette</i> now has its own domain name! Check out <a
href="http://www.linuxgazette.com/">http://www.linuxgazette.com/</a> as
another way to get to <i>LG</i>.
<P> 
<B>Other <I>LG</I> News</B> 
While we do not mail issues of <I>LG</I> to our readers--it's just too
big--we do have an announcement service. Write <A 
HREF="mailto:lg-announce-request@ssc.com">lg-announce-request@ssc.com</A> with the
wordsubscribe in the body, and each month you will receive an e-mail notice
when we post <I>Linux Gazette</I>.
<P> 
Our <A HREF="ftp://ftp.ssc.com/pub/lg/">ftp site</A>
will now contain each issue after Issue 9 in its own gzipped
tar file. Issues 1 through 8 will be together in one gzipped tar file.

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Cool Linux Sites of December!
</H3> 
<P> 


<P>Check out the two cool Linux sites of the month! 

<P><a href="http://128.229.72.241/">The Rat Pack Underground
Network</a> is a must-see. This URL has some practical stories about using 
Linux to solve "real-life" problems and much more.

<P><a href="http://www.hooked.net/~tvs/eyes/">The Eyes on the Skies Robotic
Solar Obsevatory and BBS page</a> contains an internet-accessable robotic
solar telescope and BBS system built by Mike Rushford. You can actually
control your view of the sun by controlling a telescope from your browser!
The telescope control pages are served by a Linux system that is called
<I>Eyes on the Skies</I>.
<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Stand Up and Be Counted
</H3> 
<P> 


<P>The Linux Counter is a serious attempt
to count users in the Linux universe. 
At the moment, more than 53.000 people are registered with the
counter, coming from more than 130 different countries.
The counter has been recently updated and given a new Web interface
and forms design, and is now able to give you the ultimate Linux
counter gimmick: The Linux REGISTRATION CERTIFICATE!
This little GIF image, with your personal registration number on it,
ready for insertion in your Web page, is available for you at the price
of filling out the registration form.
Older, registered users can go to <a
href="http://counter.li.org/update.html">http://counter.li.org/update.html</a>,
enter their registration key, and get it there.

<P>Come on folks--STAND UP AND BE COUNTED!!!!


<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Virtual Services HOWTO
</H3> 
<P> 

Check out the new HOWTO on virtual services which includes a section on
virtual mail services as a whole. Go to <a
href="http://sunsite.unc.edu/mdw/HOWTO/Virtual-Services-HOWTO.html">http://sunsite.unc.edu/mdw/HOWTO/Virtual-Services-HOWTO.html</a>
The author would like your comments on the HOWTO in order to keep it on
track, you can reach him at <a
href="mailto:brian@nycrc.net">brian@nycrc.net</a>


<a name="software"></a>
<P> <hr> <P> 
<!-- =================================================================== -->
<center><H3> Software Announcements </H3></center>

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Eiffel Special
</H3> 
<P> 

<P>In celebration of the 200,000th Eiffel Professional license, ISE is
making available special limited time offers for new purchases of 
the Eiffel Professional Licence and upgrades from Personal Eiffel.

<P>FREE Upgrade to Eiffel Professional license with NEW Java Interface
(see offer for full details)

<P>Eiffel Professional Suite		$495
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
</ul>

<P>Eiffel Client-Server Suite	$795
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
<li>EiffelWeb
<li>EiffelNet
</ul>

<P>Eiffel Cross-Platform Suite	$895
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
<li>EiffelWeb
<li>MEL
</ul>


<P>Eiffel Enterprise Suite	$1195
<ul>
<li>EiffelBench
<li>EiffelBase
<li>EiffelLex
<li>EiffelParse
<li>EiffelVision
<li>EiffelWeb
<li>EiffelNet
<li>MEL
<li>EiffelCase
</ul>

<P>A special bonus runs with each of the above which includes a free upgrade
to the next release, a free O-O book and 15% off any ISE training session
up to June 1998. The Enterprise Suite also includes a free year of
maintenance and support from the date of purchase.

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
O'Reilly "Animal Book" Contest
</H3> 
<P> 

Readers of the "Animal Books" by O'Reilly now have a
chance to see some wild animals close up, courtesy of computer book
publisher O'Reilly & Associates. O'Reilly has launched the In a
Nutshell contest, with the prize being a trip for two to the San Diego
Zoo and Wild Animal Park. Readers of O'Reilly's bestselling In a
Nutshell quick-reference books can find entry forms at their favorite
bookstores. Completed entry forms must be received by December 31,
1997, and the winner will be chosen on January 30, 1998.

<P>Official In a Nutshell Contest Rules:

<ul>
<li>Completed entry forms must be received by December 31, 1997, in order
to qualify.
<li>No purchase necessary to enter. (However, please include original
cash register receipt or a legible copy if purchase is made.)
<li>Offer good in USA and Canada.
<li>Not responsible for lost, late, misdirected, or illegible entry forms.
<li>Void where prohibited, taxed, or restricted by law.
</ul>

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Help with JWP
</H3> 
<P> 

<P>There is a Windows application, called JWP -- a Japanese Word Processor.  
This package was written by Stephen Chung, and as a GNU product it is freely
distributable.  
JWP comes with its own fonts and its own Front End Processor (FEP)  which
means it is useful on English-only computing systems.  It is also
integrated with Jim Breen's EDICT Japanese-English dictionary.
Unfortunately, JWP is only available for Windows right now, which is
locking out a lot of people under other platforms who might benefit from
it.  As Stephen is quite busy with full-time work and maintaining the
Windows versions (he's developing version 2.00 now), there is an attempt
being made to go ahead and port to X-Windows.

<P>This project will never get off the ground without volunteers.
any interested X-Windows developer who wants to make
a contribution both to the GNU and Japanese-speaking communities is invited 
lend a hand with this exciting project.  

<P>The JWP-Port Project home page contains more information on the JWP
package as well as the JWP-Port project itself.  If you are interested,
please visit the page at <a
href="http://qlink.queensu.ca/~3srf/jwp-port">http://qlink.queensu.ca/~3srf/jwp-port</a>.


<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Perfect Backup+ Personal Edition
</H3> 
<P> 

<P>Unisource Systems, Inc. announced today the release of the famous
PerfectBACKUP+ Personal Edition, a fully functional version of their
best-selling PerfectBACKUP+ V5.5.  Having received continued and
tremendous support from the LINUX community, and in recognition of LINUX
becoming our #1 best-selling platform we are giving something back.  The
PerfectBACKUP+ Personal Edition is unrestricted and free to anyone.  Its
freely redistributable and can be use for either private or commercial
use.
<P>Information about, and the program itself can be obtained from
<a href="http://www.unisrc.com">http://www.unisrc.com</a>.



<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
86Open Project
</H3> 
<P> 


<P>A group which includes some of the key developers of Unix operating
systems on Intel architecture computers have agreed to work on a
common programming and binary interface.
At a meeting held mid-August at the head office of SCO, participants
achieved consensus on a way to create software applications which would
run, without modification or emulation, on the Intel-based versions of:
<ul>
<li>BSDI
<li>FreeBSD
<li>Linux
<li>NetBSD
<li>SCO OpenServer
<li>Sunsoft SolarisX86
<li>SCO UnixWare
</ul>
<P>The goal of this effort is to encourage software developers to port
to the Unix-Intel platform by reducing the effort needed to support
the diverse mix of operating systems of this kind currently available.
The specification, called "86open", will be published and freely
available to any environment wishing compliance. It involves the use of a
standardized 'libc' shared library of basic functions to be provided on
all systems. This library will provide a consistent interface to
programmers, hiding the differences between the various operating systems
and allowing the resulting binary programs to run unaltered on any
compliant system. Whenever possible, it will be consistent with The
Open Group's Single Unix Specification.

<P>Each participating operating system will be free to implement the 86open
library specification on its own. However, the reference implementation
will be based upon GNU's 'glibc' version 2, ensuring that it will remain
open and freely available. The actual list and behavior of the 86open
functions is presently being determined.

<P>Participants in the meeting, who will be involved with the ongoing
evolution of the 86open specification, include people deeply involved
with the operating systems mentioned in this project. The 86open
steering committee, a core of this group which will assemble
the work and produce the final specification, comprises:
Marc Ewing, Dion Johnson, Evan Leibovitch, Bruce Perens,
Andrew Roach, Bryan Sparks and Linus Torvalds

<P>For more information, contact <a href="mailto:86open@telly.org">
86open@telly.org</a> or check <a
href="http://www.telly.org/86open">http://www.telly.org/86open</a>.  

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Clobberd 3.2
</H3>
<P> 

Clobberd 3.2 (Clobberd-3.2-RELEASED.tgz) has been
released on to the following sites:
<UL>
<LI><a
href="ftp://ftp.funet.fi/pub/linux/incoming">ftp://ftp.funet.fi/pub/linux/incoming</a>
<LI><a
href="ftp://sunsite.unc.edu/incoming/Linux">ftp://sunsite.unc.edu/incoming/Linux</a>
<LI><a
href="http://dayworld.net.au/~jsno/rel/1997">http://dayworld.net.au/~jsno/rel/1997</a>
</UL>

<P>Clobberd is a user/resource regulator that allows Operators to monitor and
track users Total Time, Daily Time, Expiration time, Total network usage
and Daily network usage (to name a few) in an effort to limit or cost
resources that the user uses. Clobberd effectively "meters"  resources,
and compares them to any limits/conditions you impose.
The third version now has the ability to monitor users on a network rather
than a single host. 

<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
Corel Video Network Computer News
</H3>
<P> 

When Corel Computer Corp. formally unveils its Video Network
Computer later this month, the machine will be running Linux, an
operating system that is becoming an increasingly prominent force in
workstations linked to corporate intranets.
<p>
Linux is a compact, efficient, easier-to-use and free version of
Unix. A growing number of corporate MIS groups, as well as software
developers and systems integrators, are choosing Linux over 32-bit
Windows platforms, especially for Internet applications. At some
sites, Linux actually is displacing Windows.
<p>
That is what happened at Unique Systems, Inc., a software developer in
Sylvania, Ohio. The company, which puts together accounting systems
for small and midsize companies, was using Microsoft Corp.'s Office 95
internally but was plagued by software crashes and other problems. "It
really irked me," Unique President Glenn Jackson said.
<p>
The company tested Applix, Inc.'s ApplixWare office suite on Intel
Corp. computers running Linux. Users got nearly all the functionality
of Microsoft Office and were able to import all Office files easily
into ApplixWare - at much lower cost and with far greater reliability
than with Office, Jackson said.
<p>
"Linux is the true competitor to Windows NT in the long term," said
Dave Madden, senior product manager at Corel Computer, a subsidiary of
Corel Corp., based here.
<p>
Linux has a number of key features NT lacks. For example, Linux is a
multiuser system and runs on a wide range of processors _ from Intel
386 to 64-bit Reduced Instruction Set Computing chips _ and on
multiprocessor computers. The Linux kernel is less than 2M bytes.
<p>
Linux has other key attractions, according to Jon Hall, executive
director of Linux International, a trade group that promotes the
software. Linux is free, and users have access to all the Linux source
code, which means they can make whatever changes they need.
Commercial Linux versions from companies such as Caldera, Inc., of
Provo, Utah, and Red Hat Software, Inc., of Research Triangle Park,
N.C., range from $49.95 to $399 and usually come with additional
software and technical support.
<p>
The free version of Linux is crammed with utilities and connectivity
software. "One of the things that makes Linux so attractive is how
much software you get with it," said Dave Parker, a senior software
engineer at Frontier Information Technologies, a division of Frontier
Corp., a Rochester, N.Y., telecommunications company. "Linux will
connect to anything."
<p>
Much of the free software is available under the "GNU public license,"
which is administered by the Free Software Foundation.
<p>
For example, TCP/IP and a Web server are built in, and Linux can run
DOS applications. It includes X.11 support, so it can host or access
Unix applications.
<p>
Linux supports the Microsoft Server Message Block protocol, so it can
serve Windows files.
<p>
It also supports AppleTalk for Macintoshes. Using optional software,
it can even run Windows applications. Cal-dera's commercial OpenLinux
adds Novell, Inc. NetWare connectivity.
<p>
Frontier Information Technologies' Green Bay, Wis., site is using
several Caldera Open- Linux servers as specialized gateways, directory
or naming servers and firewalls.
<p>
This seems to be an increasingly common practice at big corporate
sites, said Dan Kusnetzky, director of operating system research at
International Data Corp. in Framingham, Mass.
<p>
Unknown to senior MIS executives, operations staff are deploying Linux
servers in a range of intranet applications, he said.



<P> <hr> <P> 
<!--================================================================-->
<center>Published in Linux Gazette Issue 23, December 1997</center>
<P> <HR> <P>
<!-- =================================================================== -->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF 
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT 
PAGE ]"></A> 
<A HREF="./lg_tips23.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./lg_answer23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>

<P><HR><P>
<h5>This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com">gazette@ssc.com</A><BR> 
Copyright &copy; 1997 Specialized Systems Consultants, Inc. </H5> 
<P> 
<H4>&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>
<P> <hr> <P>

<!-- =============================================================== -->
<center>
<H1><A NAME="answer">
<img src="../gx/ans.gif" alt="" border=0 align=middle>
The Answer Guy
<img src="../gx/ans.gif" alt="" border=0 align=middle>
</A></H1> <BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
Starshine Technical Services, <A HREF="http://www.starshine.org/">
http://www.starshine.org/</A> </H4>
</center>

<p><hr><p>
<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_answer23.html#monitor">Running Multiple Instances of X</a>
<li><a HREF="./lg_answer23.html#madness">VC Madness</a>
<li><a HREF="./lg_answer23.html#ospf">Linux and OSPF</a>
<li><a HREF="./lg_answer23.html#pop">Security Problems with pop3</a>
<li><a HREF="./lg_answer23.html#crypt">Cryptographic System</a>
<li><a HREF="./lg_answer23.html#ref">An Interesting De-Referencing Problem</a>
<li><a HREF="./lg_answer23.html#remind">Reminder!</a>
<li><a HREF="./lg_answer23.html#pcmcia">pcmcia ide Drives</a>
<li><a HREF="./lg_answer23.html#kde">KDE BETA 1</a>
<li><a HREF="./lg_answer23.html#program">Compression Program</a>
<li><a HREF="./lg_answer23.html#loadlin2">loadlin</a>
<li><a HREF="./lg_answer23.html#wipe">WipeOut</a>
</ul>

<p><hr><p>
<!--================================================================-->

<a name="monitor"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Running Multiple Instances of X on One Video/Monitor (VCs)
</h3>
<P> <B>
From: Guillermo S. Romero <a href="mailto:famrom@ran.es">famrom@ran.es</a><br>
</B><P><B>


Hello,<br>
I have tried to run multiple X servers with only one card and one monitor.
Is this possible, or is it normal that the second X server does not
run?
I used <tt>startx display :0</tt> the first time, and <tt>:1</tt> the second.
I have a 1024K video board (#9GXE64 PCI, S3 864), and normal config is 8
bpp, 1024*768 virtual desktop, running on a remix of RedHat 4.0, 4.1 and
4.2, with XFree86 as server.
Maybe I did not understand the man page (English is not my first languaje).
Any suggestion?


</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

The normal way this is done is using the form:

<pre>	startx -- :0 &
		startx -- :1 &</pre>

<P>	... The -- is used by startx and xinit to separate an optional
	set of client parameters from the set of display/server
	options and parameters.

<P>	If you ran the command:

<pre>	startx xterm -e myprog -- :1 &</pre>

<P>	... it would start X Windows with a copy of xterm which
	would be running 'myprog' (whatever that might be). The
	remainder of the line informs the X server to use display
	number one (which would be VC -- virtual console -- number
	eight on most Linux systems).

<P>	(On my systems it would start on VC#14 -- accessed with the
	{Right Alt}+{F2} key combination. I routinely configure
	mine with 24 VC's -- the first twelve of which have
	"getty's" (login prompts) and the next eleven of which are
	available for X (xdm's or otherwise), using 'open' commands,
	or for dumping status output from a process (like 'make' or
	'tail -f').

<P>	Read the man pages for startx and xinit one more time.
	I'm pretty sure that the man pages have all been translated
	into Spanish -- so you might want to hunt those down.

<P><B><img align=bottom alt=" " src="../gx/ques.gif">
Thanks!!!

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>
Read the man pages for startx and xinit one more time.


<P><B><img align=bottom alt=" " src="../gx/ques.gif">

Sure, and with a dictonary. ;]

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

I'm pretty sure that the man pages have all been translated
into Spanish -- so you might want to hunt those down.

<P>Try:
<P>man-pages-es-0.2-1.src.rpm:
<a href="ftp://ftp.redhat.com/pub/contrib/SRPMS/man-pages-es-0.2-1.src.rpm">ftp://ftp.redhat.com/pub/contrib/SRPMS/man-pages-es-0.2-1.src.rpm</a>


<P><B><img align=bottom alt=" " src="../gx/ques.gif">

The Spanish Howto is small, too global, sure it does not cover that.
And I still have problems with my ntilde chars and acents, Spanish is not
supported a lot (Linux or another OS, always late and bad)... The system
explained in that howto does not work (but thats another question, whose
solution maybe... magic? real support?).
GSR

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	I'm afraid I'm completely ignorant of internationalization
	issues with Linux. I do know that there is quite a bit of
	work done on Linux boxes in Japan, Germany, Italy and,
	naturally enough, Finland (where Linus comes from).

<P>	As bad as it seems -- Linux' support for other languages is
	probably the best in the world. Unfortunately I don't have
	the skill or resources to point you to the support and
	resources you need.

<P>	Since your English is clearly adequate to discuss these issues
	with me -- you might consider contributing some of your time
	to a translation effort (get the LIGS, NAG, and SAG portions
	of the Linux Documentation project translated, and "beef up"
	(improve) the Spanish-HOWTO.

<P>	I highly recommend that you find or start a Linux user's group
	in your area. This is the best way to help yourself and to
	improve the situation for all of your compatriots.
<P>
--
Jim

			 
<p><hr><p>
<!--================================================================-->

<a name="madness"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
VC Madness
</h3>
<P> <B>
From: <a href="mailto:frees@technologist.com">frees@technologist.com</a><br>
</B><P><B>


Hi<br>
I have an application that uses its own .cshrc and .bashrc to fire up
and this is done by using its own login account.
Now what I would really like is for this to say select VC8 to run on
and then have my normal X on VC7 as usual.
Can this be done? and if so how?
<br>
--Phil

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

<pre>	open -c 8 -- su - $PSUEDOUSER</pre>

<P>	... where PSUEDOUSER is the psuedo users whose .*shrc
you want to run. Naturally you can convert the .*shrc
into a normal shell script and do whatever you like with
it. You have to run this as root -- (so 'su' doesn't prompt
for a password) though there are ways to get around that
'runas' is available at the sunsite.unc.edu archive site and
	its mirrors). If launch this from another UID you'll need to
	ensure that this users (the launching user, not necessarily the
	psuedo-user) has write access to /dev/tty8 (group +w should be
	sufficient).

<P>	If you want to have the console visually switch to this
	application's VC you can just add the -s switch like so:

<pre>	open -c 8 -s -- ....</pre>

<P>	... where the "--" marks the end of 'open's' arguments
	so that the command that follows it can unambigously get
	its own arguments.

<P>	Without the -c switch the 'open' command will select the
	next available VC. Any subsequent 'startx' commands or
	other 'open' commands would then pick later ones (unless
	the others were freed back up).

<P>	You can have two or more copies of X running on different
	VC's as well. For example the command:

<pre>	startx -- :1</pre>

<P>	... will create a second X session on the localhost:1
	display (the first one is addressed as localhost:0 or
	simply :0). These X sessions can be run under different
	UID's and have completely different client configurations
	(colors, window managers, etc). There is also an 'Xnest'
	command that works similarly -- allowing one X session to
	run "within" (as through a window on) one of your existing
	X sessions.

<P>	You can also set the terminal settings and colors using
	normal redirection of the form:

<pre>stty erase ^? > /dev/tty8</pre>

	<P>... and:

<pre>setterm -background blue -foreground yellow -bold on -store \
		> /dev/tty8</pre>

<P>	This last command would set and store a new set of default
	screen colors for the VC. The setterm command can also be
	used to control the Linux VC screen blanker's timeout
	(a value of 0 means "never blank").

<P>	Naturally you may want to read the man pages for all of these.

<P>	If you want to ensure that a given process will *always*
	be running (and will automatically be respawned when it
	dies) you can add it to your /etc/inittab -- so that the
	init process will watch over it. This is how new 'getty'
	processes are spawned on your first six (or so) VC's when
	you boot and are respawned when you logout. Likewise if
	you use 'xdm' to keep a graphical (X based) login prompt
	on one or more of your VC's.

<P>	As you can see, its possible to do quite a bit with Linux
	VC's. I run 12 VC's with getty (as login consoles), have
	one 'xdm', one devoted to syslog, and ten more available for
	other purposes (such as 'startx' and 'open' commands and to
	to use for 'tail -f' commands when need to monitor the
	end of a status or log file -- from a 'make' or whatever.

<P>	The second set of 12 VC's is accessed with the *right*
	{Alt} key. (In case you'd never noticed, the default
	keyboard settings of Linux only allow you to use the
	*left* {Alt} key for switching VC's). I set syslog to
	use VC number 24 with an entry in the /etc/syslog.conf
	file that reads:

<pre>	*.*			/dev/tty24</pre>
	
<P>	This puts a copy of *every* syslog message on to that
	VC -- which is what I switch to for a quick glance and
	try to switch to when I leave any of my systems unattended.
	(That way when one does lock -- as rare as that is -- I have
	some idea of what the last throes of the system were).

<P>	I set that to bright red on black with the following command
	in my rc.local file:

<pre>setterm -foreground red -bold on -store > /dev/tty24</pre>

<P>	(I also do the same to /dev/tty12 which I customarily use
	only for root login's).

<P>	Hope all of that helps. 
<P>
--
Jim


<p><hr><p>
<!--================================================================-->

<a name="ospf"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Linux and OSPF
</h3>
<P> <B>
From: Jose Manuel Cordova-Villanueva <a
href="mailto:jcordova@amoxcalli.leon.uia.mx">jcordova@amoxcalli.leon.uia.mx</a>
</B> <P><B>

Dear Sr.<br>

Recenty I had my first contact with the Linux G. and is a big source of
information, can you inform me if there are a program that can talk ospf
because our ISP, is changing from RIP to OSPF and we have a linux box
in one of our links, for our cisco no problem but for our Linux box??


</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	The software you want is called 'gated' (for "gateway daemon").
	This is a Unix multi-protocol router package for Linux which
	includes support for OSPF and other routing protocols (BGP4,
	IGRP, etc).

<P>	 Here's a link to the top level 'gated' pages

<a href="http://www.gated.merit.edu/">Cornell Gated Consortium
Information</a>

<P>	I've heard that compiling 'gated' for Linux is not
	quite trivial so here is some other links that might help:

	Here's a link to a source RPM in the Red Hat contrib
	directory:

<a
href="ftp://ftp.redhat.com/pub/contrib/SRPMS/gated-R3_6Alpha_2-1.src.rpm">gated-R3_6Alpha_2-1.src.rpm</a>

<P>	Here's a threaded archive of the 'gated' users mailing list:

<a
href="http://nic.merit.edu/mail.archives/html/gated-people/threads.html">Gated-People
Archive</a>

	Here's an odd note about an alternative routing software
	package/project:

<a href="http://www.ra.net/route.server.html"> Route Servers -- RA.net:
routing arbiter project</a>

<P>	Hope that helps.
<P>
--
Jim



<p><hr><p>
<!--================================================================-->

<a name="pop"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Security Problems with pop3 of Linux 2.1.29
</h3>
<P> <B>
From: Sam Hillman <a href="mailto:hillman@easyway.net">hillman@easyway.net</a><br>
</B><P><B>

Well I hope I'm posting to the right person. I have two questions, which
I hope you can answer.

1. How do I setup my linux machine as a POP3 server? I can't find any
FAQs or Howtos.

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>


	Usually you don't have to do anything extra to allow access
	to POP services.  Most Linux distributions include a pop server
	pre-installed and appearing in the /etc/inetd.conf and /etc/services
	files.

<P>	A quick test is to login to the system in question and type
	the command:

		<pre>telnet localhost pop-3</pre>

	... it should respond with something like:

	<pre>+OK your.hostname .... (some copyright info)</pre>

	... and you can type QUIT to get out of that.


<p>	If that doesn't work you'll want to make sure that the
	appropriate lines appear in your /etc/services and /etc/inetd.conf
	files like so:
<pre>
/etc/services:
pop-3		110/tcp	# PostOffice V.3
pop		110/tcp	# PostOffice V.3

/etc/inetd.conf:
pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd	ipop3d</pre>

<P>	If they appear commented out -- remove the leading hash
	sign(s) (or paste these samples in) and restart your 
	inetd with a command like:

<pre>kill -HUP `cat /var/run/inetd.pid`</pre>


<P><B><img align=bottom alt=" " src="../gx/ques.gif">

2. When I log on to my ISP, I download my mail and it gets dumped to the
sendmail, this creates a situation where the mail is bounced back and
forth until it passes the hop limit and is dumped as an error message in
the postmaster box, and a nasty letter is send to the originator from
MAILER-DEMON... I think this maybe because I'm running a local area
network between my two machines, the IP address of the local net is
162.blah.blah... But I also have the IP address the ISP gave me in the
host file.

If the ISP's IP address is the problem can I remove it from the host
file, and just get a duynamic IP when I connect?

Thanks in advance!

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	This is a bigger problem.  First the 162.*.*.* is probably
	not what you want to use for you disconnected LAN.  There is
	an RFC 1918 (originally RFC 1597) which describes and reserves
	a set of addresses for "non-Internet" use.  These are guaranteed
	not to collide with any valid (routable) hosts on the 'net.

	Here's the list of those addresses:

<pre>	192.168.*.*  (255 class C address blocks)
		172.16.*.* through 172.31.*.* (15 class B address blocks)
		10.*.*.*  (one class A address block)</pre>

	... use those however you like.  Be sure to keep them behind your
	own routers (make any hosts with those go through an IP masquerading
	or NAT -- network address translation -- router, or through a 
	SOCKS or other proxy server).

<P>	The next problem is configuring sendmail for use on a 
	disconnected system.  You probably need to define your
	hostname (or an alias to your hostname) to match what your
	ISP has named you.  Each ISP seems to use a different way to 
	manage these "disconnected sendmail subdomains" -- with no
	standardization in site (which is why I use UUCP).

	I gather that some people use a scheme where they only run
	sendmail when they are connected.  The rest of the time 
	their MUA (mail user agents like elm, pine, mh-e, exmh, etc)
	just drop outgoing mail into the mqueue directory where
	'sendmail' will get to it later.

	One problem I have with these configurations is that
	sendmail wants to look up these remote hosts.  This 
	seems to cause various problems for users of "disconnected" 
	or "periodically connected" (dial-up) systems.  

	So far the only solutions I've found are:

	   recompile sendmail without DNS support (there used to 
	   be a sendmail.cf switch that disabled DNS and reverse DNS 
	   activity in sendmail -- but that doesn't seem to work any more)

	   use UUCP.  UUCP was designed for disconnected (dial-up)
	   and polling systems.  It's what I use.  The disadvantage
	   to UUCP is that it's a bit hard to set up the first time
	   -- and you have to find a provider that's willing to 
	   be your MX/SMTP to UUCP gateway.  There are still some
	   people out there where will do this for free or at only
	   a nominal fee.  But they are increasingly hard to find.

	   I use a2i Communications in San Jose.  You could use 
	   a non-local provider if you want to use UUCP over TCP
	   as the transport mechanism (UUCP is pretty flexible 
	   about the underlying transports -- you could probably
	   use tin cans and string as far as its concerned).


<P>	There are several HOWTO's that try to cover this topic.
	Try browsing through some of these:
<UL>
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/ISP-Hookup-HOWTO.html">ISP Hookup HOWTO</a>: Basic introduction to hooking up to an ISP.  
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/Mail-HOWTO.html">Electronic Mail HOWTO</a>: Information on Linux-based mail servers and clients.
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/mini/Mail-Queue">Mail Queue mini-HOWTO</a>: How to queue remote mail and deliver local mail.
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/mini/Offline-Mailing">Offline Mailing mini-HOWTO</a>: How to set up email addresses without a dedicated Internet connection.
<LI><a href="http://sunsite.unc.edu/LDP/HOWTO/UUCP-HOWTO.html">UUCP HOWTO</a>: Information on UUCP software for Linux.
<LI><a
href="http://sunsite.unc.edu/LDP/HOWTO/mini/Sendmail+UUCP">Sendmail+UUCP
mini-HOWTO</a>: How to use sendmail and UUCP together.
</UL><P>
--
Jim 

<P><B><img align=bottom alt=" " src="../gx/ques.gif">

Thanks so much for the detailed suggestions. We have installed a newer version of pop3 on our server for now and we will look into the feasibility of implementing some of your suggestions for a final cure.
Thanks again, James, we really appreciate it.

<br>-Sam Hillman, Service Manager, Easyway Communications.
</B>


<p><hr><p>
<!--================================================================-->

<a name="crypt"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Cryptographic System
</h3>
<P> <B>
From:Emil Laurentiu <a href="mailto:emil@interlog.com">emil@interlog.com</a>
</B><P><B>
Hello Jim,

</B><P><B>Sorry for bothering you but I would apreciate a lot an answer
even a short one like 'no' :)
I am (desperately) searching a crypographic system for my Linux box.
I am already using TCFS but I'm not very happy with it for several
reasons: it is slow, I experienced some data loss, must use the
login password, cannot share encypted files with other users,
NFS - increses security riscs.
And the people in Italy seemed to have stoped work on this project
(latest version is dated february).

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

February doesn't seem that old.

<P>	Are you sure you're using the latest TCFS (v 2.0.1)?
	You can find that at: <a
href="http://pegaso.globenet.it/~ermmau/tcfs/">http://pegaso.globenet.it</a>
	(which is a web form leading to an HTTPS page -- so use
	and SSL capable browser to get there).

<P>	If you find it slow than any other decent encryption
	is also likely to be too slow for you.

<P>	You could look at <a
href="http://www.replay.com">http://www.replay.com</a> (in the Netherlands).
	This has the best collection of cryptography software I've
	seen anywhere.

<P>	The two fs level alternatives to TCFS are CFS (Matt Blaze's
	work, on which TCFS was based) and userfs (which support a
	few different user-level filesystem types including an
	experimental cryptographic one.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">

I am wondering if you know anything about an encryption at the
file system level. Something like SecureDrive (from DOS :) which
did IDEA encryption on the fly at sector level for a partition and
was very fast.


</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	Are you sure SecureDrive is using IDEA? I rather doubt
	that.

<P><B><img align=bottom alt=" " src="../gx/ques.gif">

As an (almost) single user on my linux machine something like this
would be more apropriate.
Of course if I would not find one I'll finish by writing it by myself.
My only concern is that I've been a Linux user only for half a year
and I did not get the chance to study the kernel to well (this will
be a good opportunity :)


</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	Why not pick up on the TCFS or CFS work? Why not
	build on the userfs work (plugging in whatever encryption
	you like)?

<P>	Why write it "by yourself" when you can collaborate with
	other members of the Linux community as they have done
	to bring you Linux itself, and as the FSF and others have
	done to bring you the GNU packages which turn Linux into a
	full OS?

<P>	What you asking for doesn't need any support at the kernel
	level. userfs and CFS already have shown that. The Linux
	kernel already support a robust and open filesystems interface
	(which support more different filesystem types than any other
	-- with read-only support for HPFS, NTFS, BSD and Sun UFS/FFS,
	and support for HFS (Mac), ext2fs, xiafs, Minix, and many others.

<P>	If you're a competant programmer (which I am not, BTW) you
	should be able to trivially take the sources for any of the
	existing filesystem modules and hack together your own
	with the encryption support of your choice. How secure the
	result will be will be a matter of your skills -- and should
	be greatly improved by peer review (by publishing your work
	for all to see).

<P>	Naturally if you are in a free country you can share your
	work on cryptography with the world. However the USA doesn't
	appear to currently be free in this particular respect --
	please find a congress critter to vote out of office if this
	oppresses you.
<P>
--
Jim


<p><hr><p>
<!--================================================================-->

<a name="ref"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
An Interesting De-Referencing Problem
</h3>
<P> <B>
From: Kevbo <a href="mailto:simitar@lvnworth.com">simitar@lvnworth.com</a><br>

</B><P><B>Here's the brain teaser I read about and promptly forgot the solution
(because I thought it would never happen to me). How does one delete
a FILE named ".."  
I have the following at the root directory.
</B><ul>
<li>/.   	a dir (which is normal)
<li>/..	a dir (which is normal)
<li>/..	a file (which is not normal)
</ul>
<P><B>How this happened I don't know. How to remove this not-bothering-me file
has me stumped. Got an answer?


</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	I suspect that this file is actually named something
	like: "/.. " (note the trailing space!).

<P>	In any event you can remove this with a command like

<pre>	find / -type f -maxdepth 1 -name '..*' -print0 | xargs -0 rm
-i</pre>

<P>	Note: you must use the GNU versions of find, xargs, and rm
	to ensure that these features (-print0, -0, and -i) are
	available. (They may be available in other implmentations --
	but you must check first).

<P>	The find parameters here specify files (not directories,
	symlinks, device nodes, sockets, or FIFO's) and force it
	to only search the named directory (or directories if you
	list more than just /). The -print0 force it to be written
	as a null-terminated strings (thus the receive process on
	the other end of the pipe must be able to properly interpret
	null-terminated arguments -- which is what the -0 to xargs
	accomplishes).

<P>	As far as I know there is no way to legally get a NUL character
	into a Unix filename. (Using a hex editor might get one in there
	-- but fsck would probably complain on its next pass).

<P>	The <tt>-i</tt> on rm is just a little extra protection to prevent
	any other unexpected side effects. It forces rm to interactively
	inquire about each argument before removing it.
<P>
--
Jim

<p><hr><p>
<!--================================================================-->

<a name="remind"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Reminder!
</h3>
<P> <B>
From: George Read <a
href="mailto:gread-berkeley@worldnet.att.net">gread-berkeley@worldnet.att.net</a><br>
</B><P><B>


I am a subscriber to caldera-users, but as a rank newbie, 99% of what
gets posted is irrelevant to my situation and over my head. In fact,
I'm looking for some real basic, preliminary information:

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	Perhaps you should consider some avenue of paid support.
	there are a number of consultants and even a 900 support
	line.

<P>	Also, if you have access to IRC there are a few #Linux
	"channels." (If you've never heard of IRC -- or Internet
	Relay Chat -- then think of it as an online CB system --
	similar to the "chatboards" and "chat lines" on various
	BBS' and online services (like CompuServe and AOL)). Granted
	IRC is a bear to figure out -- and 99.9% of what's written there
	is even less relevant or comprehensible than the traffic on
	this list. However the feedback is immediate and there are
	some people who will take time out from their usual chat
	aggenda to help.

<P>	There's also that pesky "Answer Guy" from Linux Gazette ;)
	(but he's too ornery and doesn't help with X Windows stuff
	at all).


<P><B><img align=bottom alt=" " src="../gx/ques.gif">
1. A way to create a primary Linux partition on a drive that is entirely
occupied by a dos active and a dos extended partition. The extended
partition has 400MB available that does not have any data on it, but LISA
2.3 does not wish to give it a primary partition.

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

You have three choices here. You can repartition the drive
	using traditional methods (backup your data, reformat, re-install
	DOS and all applications, restore data). You can repartition
	using FIPS (a non-destructives partitioning program for DOS --
	written by Linux or FreeBSD users from what I gather). If you
	use FIPS the process goes something like: do a backup, verify
	your backup, unfragment you DOS partitions, run CHKDSK and/or
	Norton Disk Doctor and/or SCANDISK, then run FIPS.

<P>	Another approach -- and the only one I know of that doesn't
	involve repartitioning -- is to use MiniLinux or DOSLinux or
	XDenu. These distributions (of which DOSLinux is the most
	recent and must up-to-date) are designed to run on a UMSDOS
	partition (an MSDOS partition mounted under Linux with
	support for some Unix semantics). You would be running COL
	-- but you would be running Linux.

<P>	You can find information about DOSLinux at Kent Robotti's
	home page:
	
<a
href="ftp://wauug.erols.com/pub/people/kent-robotti/doslinux/index.html">ftp://wauug.erols.com/pub/people/kent-robotti/doslinux/index.html</a>

	(Kent is the creator and maintainer of DOSLinux).
<P><B><img align=bottom alt=" " src="../gx/ques.gif">

2. a workaround to a problem with RAWRITE3: I can't see my COL Base cdrom
on a Nakamichi MDR7 jukebox that is controlled by a BusLogic 946C, because
Autoprobe can't find anything and I can't get RAWRITE3 to write MODULES.IMG
to a floppy on A:.

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	Have you tried supplying the "max_scsi_luns=7" parameter
	to the kernel during the bootup sequence (at the LILO prompt).

<P>	Normal SCSI controllers support up to 7 devices. It is
	possible for these controllers to refer to "Logical Units"
	on any/all of these devices. These "logical unit numbers"
	or LUN's aren't very common -- but are used by CD changers
	(which is why most of them are limited to 6 or 7 CD's) and
	some tape changes (though those usually use a different
	mechanism to control tape changes and ejections) and some
	RAID subsystems and CD-ROM "towers."

<P>	I have a NEC 7 platter CD changer which requires this parameter.
	This suggestion assumes that the problem is isolated to the
	CD drive -- and that your kernel (LISA's) is seeing the BusLogic
	card. If the problem is that you can't even see the SCSI controller
	-- then you probably want to look for an alternative boot/root
	diskette set and boot from that.

<P>	One of the nice things about user's groups is that you can
	often have the phone numbers of some local Linux users that
	will cut you a custom kernel on request and let you pick up
	the floppy. I'd highly recommend finding (or starting)
	a local LUG. I've occasionally had people come over to my
	place where we could plug them onto my ethernet and suck
	all the free software they want across from one of my systems.

<P>	(Which reminds me -- I've been meaning to get PLIP working
	for a couple of years now -- I should really get around to
	that).
<P<B><img align=bottom alt=" " src="../gx/ques.gif">

For these reasons, I ask: Is there any way to ask caldera-user users for
some help on these two questions, sent to my own email address, and not have
to read 20 or 30 messages that I can't profit from, at least until I get COL
up and running. I had hoped from the name that Post-Only might be such an
address, but I see that it is something very different.

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	Caldera has some support options. I think some of them are
	extra cost items. Have you called them about your Caldera
	specific questions?

<P>	At first blush it doesn't look like Caldera's COL is the
	best Linux distribution for your needs. If you're intent
	on using COL -- and particularly if you have a business
	need for Linux -- I'd recommend going out and buying an
	additional drive. For a couple hundred bucks (US) you can
	get a 2Gig external SCSI drive (www.corpsys.com if you don't
	have a suitable vendor handy).

<P>	Even if you're just experimenting with Linux and don't want
	to "commit" to it -- an extra external SCSI drive with
	a couple of Gig of space is a handy investment for just about
	ANY operating system. It's pretty convenient to connect
	the extra drive, and just make a copy of everything from your
	main system.

<P>	If your time is worth more than $20/hr you can easily make
	the case for buying a $200 to $300 hard drive. Doing full
	system and data backups, and verifying them prior to
	repartitioning can be pretty time consuming. Even if you
	already have a scheduled backup habit (let's face it --
	most don't) and even if you have a regular recovery test
	plan (which almost nobody bothers with -- often to their
	detriment!) -- doing a major system change (like repartitioning)
	almost requires an extra "full" backup and test cycle.

<P>	(I have customers who've run the cost vs. time numbers
	for their situations and justified buying a full system and
	hired me to do the configuration on the same basis. The
	"extra" system becomes part of the recovery plan for major
	system disasters).
<P>
--
Jim

<p><hr><p>
<!--================================================================-->

<a name="pcmcia"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
pcmcia ide Drives
</h3>
<P> <B>
From: Alan C. Sklar <a href="mailto:CS266446@wcupa.edu">CS266446@wcupa.edu</a><br>
</B><P><B>
I am trying to install a pcmcia drive through a kit I purchased.. I got
the drive all ready I formatted it with a desktop machine and bot my win
95 and linux partitions are defiend... But now when I go and boot linux
I send the commad ide2=0x170 and it loads it identifies the right drive
but I get all sort of errors... Can you help? <br>
C. Alan Sklar	

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	I don't have enough information to help with this one.
	Is this a laptop or a desktop with a PCMCIA adapter
	installed? In either event what is the make/model
	of the system?

<P>	Do you have PCMCIA support installed and built into the
	kernel? What modules do you have loaded? What does your
	/etc/pcmcia/config.opts file look like? What type of
	hard drive is this (make and model)?
<P>
--
Jim

<p><hr><p>
<!--================================================================-->

<a name="kde"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
KDE BETA 1
</h3>
<P> <B>
From: Eric Wood <a
href="mailto:eric@interplas.com>eric@interplas.com">eric@interplas.com</a><br>
</B><P><B>
This should be the most handy tip known to man!
If a certain application (I don't care what it is) complains about
missing a library and you know that
the library it's wanting is in a certain directory THEN:
</B>
<ol>
<li>Add *that* directory to the /etc/ld.so.conf file.
<li>Rerun /sbin/ldconfig
</ol>

<P><B>That's it. What is does is it tells Linux to search the directories
specified in /etc/ld.so.conf
for library files. Forget about the stupid LD_LIBRARY_PATH variable.
Everyone: Please read the
ld.so man page for further knowledge.
<br>
Eric Wood

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	I recently trashed my /etc/ld.so.cache file and
	had forgotten how to fix it (since the last time
	I'd had a damaged ld.so.cache was on an old Sun
	a couple of years ago -- and I've never had one on
	a Linux box before.

<P>	Post that to your tech support archives:

<P>		System hangs on boot -- even with -b and
		single switches -- or it gives messages
		like "unable to open ls.so.cache" in a
		seemingly endless stream:

<pre>		Run /sbin/ldconfig!</pre>
<P>
--
Jim

<p><hr><p>
<!--================================================================-->

<a name="program"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
Compression Program
</h3>
<P> <B>
From: Cygnus <a
href="mailto:caldera-users@rim.caldera.com">caldera-users@rim.caldera.com</a><br>
</B><P><B>

Anyone know of any programs for linux that decompress multi-part
(multi-disk) .zip archives? I can't find a one.

<br>-Cygnus

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	Most Linux distributions come with the free zip/unzip
	package. Here's the -L (license) notice from my Red Hat
	4.2

<P>"Copyright (C) 1990-1996 Mark Adler, Richard B. Wales, Jean-loup Gailly
Onno van der Linden and Kai Uwe Rommel. Type 'zip -L' for the software License.

<P>Permission is granted to any individual or institution to use, copy, or
redistribute this executable so long as it is not modified and that it is
not sold for profit."

<P>	I think there's a source package for "Info-zip" also floating
	around. I don't know if this is Info-zip or an independent
	version -- looking in /usr/doc/unzip*/COPYING I find Mr. Rommel
	listed -- and that document is definitely about Info-zip.

<P>	For the future you might try the 'locate' command -- which is
	fairly common among Linux distributions. The command:

<pre>		locate zip</pre>

<P>	... will quickly find every file with "zip" in the name or path
	that was on your system during the last "updatedb" run
	(which is typically a cron job that's run nightly).
<P>
--
Jim

<p><hr><p>
<!--================================================================-->

<a name="loadlin2"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
loadlin
</h3>
<P> <B>
From: Scott Williams<a href="mailto:scott@gyst.net">scott@gyst.net</a><br>
</B><P><B>
Answer guy,

To run LOADLIN I need to have a copy of the LINUX kernel on one of my
dos partitions, and an initial swap space. No where can I find an
actual explaination on how to do this correctly.

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	You don't need an initial swap space to run LOADLIN or
	to load the kernel. If you have 8Mb or more of RAM you
	don't "need" to have a swap space at all -- but you'll
	probably want one.

	You can swap to a file or a partition -- or even several
	of each. Assuming that you don't have Linux installed
	yet you can view man pages for most Linux/GNU commands,
	functions, packages, and configuration files at:
	<a href="http://www.ssc.com/linux/man.html">http://www.ssc.com/linux/man.html</a>

<P>	... in particular you want to read the mkswap(1) and the
	swapon(8).  The man pages there are accessed via a
	CGI script so you have to post data to a form to access
	the individual pages. Thus I can't give URL's directly
	to the pages in question. That's an unfortunate design
	decision by the web master at SSC -- it would be more
	convenient to access (and cause less server load and
	latency) if they used a cron job to periodically update
	a tree of static HTML pages and saved the CGI just for
	searching them.

<P><B><img align=bottom alt=" " src="../gx/ques.gif">

Every time I try to copy the kernel to a dos diskette, Linux overwrites
the formatting. DOS then cannot recognize the file from the LOADLIN
command.

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

It sounds like you're using 'dd' or RAWRITE.EXE to prepare
	these diskettes. That's fine for transferring boot/root images
	-- but has nothing to do with LOADLIN. To use LOADLIN.EXE
	you copy the kernel image to a plain old DOS file.
<P><B><img align=bottom alt=" " src="../gx/ques.gif">

I haven't even gotten far enough to think about creating an initial swap
space...
Any advice on the subject?
	
<br>Scott

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	I'd consider getting a copy of DOSLinux from
	ftp://ftp.waaug.erols.com/pub/people/kent-robotti/doslinux.html
	(Yes there are still some people out there serving HTML
	pages via FTP -- nothing in the HTML spec *requires* that
	HTTP be used as the transport mechanism).

<P>	Kent Robotti has been working on this distribution for
	awhile. It takes about 32Mb of space on a DOS partition
	-- and comes as a set of six 1.44Mb files (so if fits on a
	half dozen diskettes). You then add a kernel for SCSI or
	IDE use.

<P>	Basically DOSLinux works like this. You get all the
	RAR files (RAR is a Russian Archiving Program like
	PKZIP, SEA ARC, ARJ, LHARC, ZOO, or whatever). The first
	image is a self-extracting file (an archive which is linked
	with a DOS binary of the decompression program -- a common
	DOS technique among archiving programs). You put these
	all in a given directory and run the self-extractor
	(DOSLNX49.EXE as I write this -- it was at "48" a couple
	weeks ago) from C:\.  It thenn extracts all of these images
	to C:\LINUX directory.

<P>	This provides a complete (though minimal) Linux distribution.
	It also shows how to configure a system to use LOADLIN with
	a UMSDOS root partition.

<P>	I realize that you may be intending on use something like
	Red Hat, Slackware, or Debian on a third hard drive, or a
	removable drive or some other device that LILO just can't
	see (because you BIOS can't "see" it). You can do that --
	and I've done in many times (I first used LOADLIN in about
	1994 for exactly that purpose -- with the magneto optical
	drive I still use). However, if the README's and examples
	that come out of the LOADLIN package aren't helping you
	use if for that purpose -- than installing DOSLinux may
	help get you rolling and serve as a vang DOSLinux may
	help get you rolling and serve as a valuable example.

--
Jim


<p><hr><p>
<!--================================================================-->

<a name="wipe"></a>
<h3><img align=bottom alt=" " src="../gx/ques.gif">
WipeOut
</h3>
<P> <B>
From: Falko Braeutigam <a
href="mailto:falko@softwarebuero.de">falko@softwarebuero.de</a>
</B><P><B>

Hi,

in Linux Gazette Issue 22 there was a question about the WipeOut IDE.
Your answer was that you never heard about WipeOut :-( Please check
ShortBytes of Issue #19 - there is an announcement of WipeOut.

WipeOut has nothing to do with xwpe. It _is_ an IDE for C++ and Java.
There is just a new release ->
<a
href="http://www.softwarebuero.de/index-eng.html">http://www.softwarebuero.de/index-eng.html</a>.

<br>Regards,<br>
Falko

</B><P>
<img src="../gx/ans.gif" alt="" border=0 align=middle>

	This definitely counts as my biggest flub in the
	10 months that I've been writing this column. I've
	gotten about 10 messages correcting me on this point.
<P>
--
Jim

<!--================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, James T. Dennis <BR>
Published in Issue 23 of the Linux Gazette December 1997</H5></center>

<P> <hr> <P>
<!--================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF
CONTENTS ]"></A> <A HREF="../index.html"><IMG SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="lg_bytes23.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<A HREF="./boulder.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>

<P> <HR> <P> 
<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H2>Boulder Linux Users Group -- Best of Luck to Michael Hammel</H2>
<H4>By <a href="mailto:allen@boulder.Nist.gov">Wayde Allen</a></H4>
</center>

<P> <HR> <P> 

<P>Well since Michael Hammel was our featured speaker for the evening we had
our obligatory snow storm (grin).  It is amazing that every time he
attends one of our meetings this happens.  Nevertheless, we still had 24
people in attendance.

<P>For those of you who don't know Michael, he writes the <a
href="./gm.html">Graphic Muse</a> column
for <i>Linux Gazette</i>, maintains the Linux Graphics mini-HowTO, helps
administer the internet <a href="http://irtc.org">Ray Tracing Competition</a>,
coauthored the UNIX Web Server book, designed the magazine cover for the
November issue of <i>Linux Journal</i>, and is also the author of a four part
article "The Quick Start Guide to the GIMP" now running in <i>Linux
Journal</i>.

<P>His presentation started out with a demo of the GNU Image Manipulation
Program (GIMP) showcasing many of its features, and perhaps more
importantly giving us all an idea of what it could do.  The discussion
then turned to GUI builders.  The group discussed their experiences,
likes, dislikes, advantages, disadvantages, and general opinions of many
different GUI design software packages.  Supporting this discussion,
Michael showed us examples of GUI building using XForms (I hope I've got
this right) and Visual TCL.

<P>After this discussion, Michael showed a 10 minute video tape of Toy Story
animated shorts done by Pixar.  I think that everyone got a few good
laughs from this.  We then held a drawing for two CD's from the Internet
Ray Tracing competition, and a copy of the November <i>Linux Journal</i>.
As usual, we wrapped up the evening with a general discussion
of Linux related topics.

<P>Since Michael is moving to Dallas next week, I particularly want to thank
him for his support of our group!!!  I have appreciated him taking the
time to talk to us, and have always enjoyed his presentations.  I want to
wish him the best of luck at his new job.  It might be a good idea to warn
the North Texas Linux User's Group of an impending change in their weather
though (very big grin).  Perhaps he can continue to participate in our
discussions on the mailing list? 

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Wayde Allen<BR> 
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./lg_answer23.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./clue.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center><h2>CLUELESS at the Prompt: A Column for New Users</h2>
<H4> By 
<a href="mailto:troll@net-link.net">Mike List</a></H4> </center>
<P><HR><P>
<center><IMG ALIGN=MIDDLE SRC = "../gx/list/gnub.jpg" ></center><p>
<h4>Welcome to installment 8 of Clueless at the Prompt:
a column for new users.</h4>
<P><HR><P>
<b>.bashrc and .bash_profile</b>
Well, I found out why the bash dotfiles I talked about last month didn't work, and
there were a couple things I did wrong.  First I didn't recognize the difference
between instances of bash and how they differ.
<ul>
<li> bash as a login shell reads instructions from .bash_profile
<li> bash as used in any other instance is a non-login shell and will either use
.bashrc or no .dotfile depending on what -option you assign to it.
<li> presumably the same could go for any preferred shellrc files
<li> the correct way to specify an alias is <pre> alias xx=whatever -options.</pre>
notice that there is no white space between the alias name, the equal
sign, and the command that the alias represents     
</ul><p> 
 Besides aliases you can do also change the color of your console screen
 with your .bashrc or .bash_profile, by using commands like:
<pre>
"/dev/tty1") setterm -background green -foreground black -store;;</pre><BR>
 By the way
I found this out by reading back issues of the Linux Gazette, and you might find
some other little gems, just by digging into past issues.
<hr><p>
<b>Installing Software</b><p>
One very tricky procedure for new linuxers is installing software. Several months ago I
touched on this subject, apparently not in enough depth, so I'm going to give it another go this
time with a little more experience under my belt.
The best advice I can give you if you are using debian, redhat, or caldera distributions is to
look for the software you would like in a compatible package format, ie. RPM for redhat-caldera,
and deb for debian. These are most commonly binaries and don't require much to get
running.Slackware has packages in tgz format, but this can be misleading, as some source
packages are inexplicably given a .tgz extension. If you get your software from the CDROM you
should be set, with packages for a given distribution on that CD. Ifg you got your distribution
from an ftp site, try using the most appropriate software found on that site, to see if it fits
your needs. If not, you should check out the Linux Software Map, to see what kind of
alternatives there are for the kind of applications you want. if you have disk space, I
recommend that you choose a couple that seem to be close to what you are looking for, install
them and use them for a short period to see which is more suitable for your uses. Sad but true,
some software compiles easily, but you will probably find that many others take some hacking,
and some doesn't seem to compile at all. You are at a distinct advantage if your Linux
distribution conforms to the Linux FSSTND, which tends to assure that paths to libraries are the
same in your distribution as they were in the distribution that they were written for/in.
With enough hacking however, all of the software that has been compiled on one distribution can
be compiled on any other.<ul>
<li>Use Midnight commander or similar filemanager to look at the contents of the compressed
archive for clues. look at files called README, README.elf, INSTALL or other similarly named
files for information on how to compile or install them. This isn't always easy as it sounds,
but often directions are specific enough to get you on your way.
<li>before unpacking a tarball create a directory to unpack it in and cd to it before using

           <pre> tar -zxvf filename </pre> 
to unpack it, since sometimes the untarring doesn't create a
separate  directory and if you just unpack it in an existing directory you could get a real
ugly situation when you get a bunch of disjointed files cluttering up your directory. you can
also use tar -cxvf or similar combination to get a listing of the files that would be unleashed
when you use the -z option. This will tell you if the files have a designated pathname which
means that it will create its own directories and subdirectories that will keep the parent
directory nice and tidy.
<li> It's a very good idea to print out the README, INSTALL or similar files before you start to
compile the software, so you can refer to the documentation as you go. If you don't have lpr
configured properly yet, you can use
          <pre>cat README |pr -l 56 >/dev/lp0</pre>
(or lp1, or whatever). Using the -l 56 option should paginate the file so
that page breaks occur where they should.
         
<li> When you read the documentation, keep an eye out for any indication that you need, say
Motif or Xforms or other libraries or toolkits that you don't have installed,if you don't have
them you won't have a compiled application either.
<li> Alternatively to printing the documentation out to paper, if you have X installed use
separate xterms to view the docs and configure, and make the application.
<li>Remember, most Linux archive maintainers keep a close eye on their sites so it's safe to
download and install a binary if it's available.</ul>

<hr><p>I'm not really a Linux guru, and I'm starting to get into more
advanced (??) stuff, and my intent was and still is to present information
that a new user can implement now and research at his/her convenience, I'm
not trying to be the Weekend Mechanic OR the Answer Guy, although I aspire
to their level of Linux prowess. Briefly put, although it's a little late
to be brief, I may not be appearing monthly after this issue, since I
don't want to write just to hear myself type, I'll likely post a column
when I can nail down a column's worth of information.
<hr> 
<p> I still invite questions, suggestions, reasonable criticism and just
plain e-mail:
 <center><a href="mailto:troll@net-link.net">troll@net-link.net</a><p>
 <b>Don't M$ out, try Linux!!</b></center>
<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Mike List<BR> 
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"

ALT="[ FRONT PAGE ]"></A>
<A HREF="./boulder.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./comdex.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H2>COMDEX/Fall '97</H2>
<H4>By <a href="mailto:mktg@ssc.com">Carlie Fairchild</a></H4>
</center>
<P> <HR> <P>  

Las Vegas, Nevada is host each year to one of the
largest technology trade shows in the U.S.--COMDEX/Fall.
This year nearly 220,000 industry
professionals lined up to find, test and research the latest
technologies from the leading industry vendors.
<P>
Earlier in the year the staff of <I>Linux Journal</I> volunteered to
coordinate the COMDEX/Fall
Linux Pavilion. Coordinating the event turned out to mean hours of
preparation,
and, luckily, vendors were quick to lend a hand. Kit Cosper of Linux
Hardware Solutions managed to talk the spirit of Linux into
Softbank, the sponsor of the COMDEX show. As a result, COMDEX personnel
were very cooperative and worked with us to ensure that the floor space
for the pavilion was in the best possible site; that is, we weren't hidden
away in a back corner.
<P>
Attendees seemed pleased to find many of their favorite
Linux vendors in one convenient and easy-to-find area.
Vendors present
included Caldera, Linux Hardware Solutions, Enhanced Software Technologies,
S.u.S.E., Red Hat Software, Hard Data, Quant-X, Infomagic, LinuxMall, Linux
International and, of course, <I>Linux Journal</I>.
<P>
Jon "maddog" Hall barely held his own against the hordes of Linux
enthusiasts visiting the Linux International booth. Several
members of the Linux community kindly volunteered their time to
staff the Linux International booth, answering questions and
spreading the word about Linux. Volunteers included Marc Merlin,
Ira Abramov, Dan Peri and Richard Demanowski.
<P>
Red Hat Software announced the December 1 release of Red Hat Linux 5.0.
To mark the event, Red Hat balloons filled the Linux Pavilion area of
the convention center. The Linux mascot, Tux the penguin, was carried away
in all of the excitement (see photo).
<P>
S.u.S.E., a popular European Linux vendor, also announced the latest
release of their Linux distribution, S.u.S.E. 5.1. This was S.u.S.E.'s
first appearance at COMDEX, and considering their rapid growth in the
U.S. market,
it will most likely not be their last. Their distribution demonstrations
proved to be great crowd pleasers, compliments of Bodo, Rolf, Michael and
James Gray, the President of S.u.S.E. U.S. (See review of S.u.S.E. in this
issue.)
<P>
Clarica Grove, Britta Kuybus and I staffed the <I>Linux Journal</I> booth.
We were quite pleased with the turnout of this year's show.
During last year's COMDEX, we were kept busy explaining what Linux is
to all comers.
We were pleased to find that this year's COMDEX attendees had remembered
and done their
homework from last year. Not only did most people we
spoke with know about Linux, but many of them are using it and very
excited with their results.
It goes to show that the popularity of Linux is indeed growing.
Linux is being looked at more than ever as a cost-effective, viable
operating system. Thanks to years of dedicated work by all of the Linux
vendors, Linux International and the Linux community, we are now able to
begin enjoying the success of Linux. This year's COMDEX Linux Pavilion
was a showcase of this success.
<P>
Linux Journal would like to thank everyone involved with this year's
show--look forward to seeing you there next year.

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Carlie Fairchild <BR> 
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./clue.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./procmail.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center><h1>Configuring procmail with The Dotfile Generator</h1>
<H4>By <a href="mailto:blackie@imada.ou.dk">Jesper Pedersen</a></H4>
</center>
<P> <HR> <P>  

<a href="http://www.imada.ou.dk/~blackie/dotfile/"><img width=100 height=94
align=right border=0 src=./gx/pedersen/gray-g3.gif></a>

In this article, I'll describe how to configure procmail using The Dotfile
Generator (TDG for short). This will include:
<ul>
  <li> How to sort mails coming from different mailing list
  <li> How to setup an auto reply filter, when you are on vacation
  <li> How to change some part of a letter, i.e. remove the signature
  <li> How to avoid that mail get lost!
</ul>

It might be a good idea to download the program. To do that, please go to
the <a href="http://www.imada.ou.dk/~blackie/dotfile/">home page of
TDG</a>, to find the nearest mirror. You might also be interesting in
reading <a href="http://www.imada.ou.dk/~blackie/dotfile/TDG/">the
article</a> I've written about TDG for <a href="http://www.linuxjournal.com">Linux
Journal</a>.
















<p><hr><center><h1>Starting TDG</h1></center>
To start TDG with the procmail module, type <tt>dotfile procmail</tt>. Now
a window should appear like in figure 1. As you can see, the module is split
up in three pages, the first two are very simple, so lets start with the page
called <tt>General Setup</tt>. This page can be seen in figure 2.<p>

<table CELLSPACING=1 CELLPADDING=4 WIDTH=100% COLS=2>
<tr>
<td align=top>
<center><img width=203 height=193 src="./gx/pedersen/main.jpg"><p>Figure 1</center>

<td align=top>
<center><img width=414 height=277 src="./gx/pedersen/general.jpg"><p>Figure 2</center>
</table>

On this page there are four things, to configure:
<ol>
  <li> The directory to use as prefix for all file operations. This is just
       for ease, since all file operations may be with full prefix.
  <li> Your email address, will be used in preventing loop-backs.
  <li> Configuration of log files. These are very
       useful, when you wish to investigate where 
       the different mail went. If you turn on <i>abstract logging</i>, you
       may find the program mailstat very useful. (See <a
       href="#aboutlog">The log file</a> below) 
  <li> The search path, in which procmail may find the programs which it
       needs. Note this is only the programs, that you specify in filters etc. 
</ol>















<p><hr><center><h1>Avoiding lost mail</h1></center>

Since procmail handles your incoming mail, the security is very important
to this module. This means that you may backup your incoming mail in three
different ways. To do this, go to the page called <tt>Backup</tt>. Part of
it can be seen in figure 3.<p>

<center>
<img width=442 height=418 src="./gx/pedersen/backup.jpg"><br>
figure 3
</center><p>


The first category of backup is to back up all incoming mail. The code, which
must be generated to the procmailrc file for this, will be written as the
very first line. This is to avoid that any errors in the generated procmail
file will throw away any of your mails. This sort of backup is only a
good idea when you at first start using the generated procmail file. The main
drawback is that all incoming mail is saved in <b>one</b>
file, and this file may become huge very fast.<p>

<a name="method2">The</a> second method is to backup all incoming mail, which are delivered by
procmail. This may be a good idea to use, to verify that mail are
sorted into the right places.<p>

The third method is to backup all mail, which makes it to your incoming
mailbox. This mail are often mails, which do not come from a mailing list,
and which are not junk mail to thrown away.<p>

In the first method, you have to specify the full filename. This is because
this method has to be 100% full prof. In the next two methods you may build
the file names from the current date and time. This makes it
possible to save this sort of mail to folders, for the current
year/month/week etc. E.g. a folder called backup-delivered-1997-July<p>

As an additional feature, you may keep the files as gziped files.<p>

The backup of delivered mail may be specified for each individual recipe,
or for all recipes at once. (see figure 4 check box 9)

To learn how to use the FillOut elements, which configures the file to save
to, please see <a href="http://www.imada.ou.dk/~blackie/dotfile/TDG/">the
Dotfile Generator article</a> in Linux Journal.










<p><hr><center><h1>Setting up the recipes</h1></center>
In procmail a central concept is a <i>recipe</i>. A recipe is a set of
conditions, and a set of actions. All the actions are executed, if all of
the conditions is fulfilled. Below is a few examples of conditions:
<ul>
  <li> The letter comes from president@white.house.com
  <li> The subject is <i>subscribe</i>
  <li> The size of the letter is greater than 1Mb
  <li> The letter contain the text ...
</ul>

A list of actions may include:
<ul>
  <li> Reply to the sender, that you are on holiday
  <li> forward the letter to another person
  <li> save the letter to a file
  <li> change some part of the letter (i.e. add a new header field, add some
       text to it etc.)
</ul>

A procmail configuration is a sequence of recipes. When a letter arrive,
each recipe is checked to see if all its conditions are fulfilled. If they
are, the actions of the recipe is executed.<p>

Procmail will finish testing recipes when one is matched, unless a flag is
set to tell it, that this recipe should not stop the deliverment (see
figure 4 check box 8). This means that the order of the recipes are
important, since only the first recipe, which match will process the letter.<p>

If none of the recipes are fulfilled, or if the ones which are fulfills
have check box 8 in figure 4 set, the letter is delivered to the incoming
mailbox as if the procmail filter haven't been there at all.<p>

You configure the recipes on the page called ``Recipes''. This page can be
seen in figure 4.<p>

<center>
<img width=477 height=553 src="./gx/pedersen/recipes-with-numbers.jpg"><br>
figure 4
</center><p>

What you see here is an ExtEntry. An ExtEntry is a widget, which repeats it
elements as many times as necessary (just like a list box repeats the
labels.) All what you see on this page, is one single recipe. To see a new
recipe, you have to scroll the outer scroll bar (1). To add a new
recipe, you have to press the button below the scroll bar.<p>

As described above, a recipe is a set of conditions. This set is also
represented with an ExtEntry (2). To scroll to another condition in a
recipe, you have to use scroll bar (2), and to add a new condition, you have to
use the button below scroll bar (2).<p>

You may give each recipe a unique name, which will make it easier to find a
given recipe. This name will also be written to the file with mail delivered by recipes (<a href="#method2">method 2 above</a>), so you can
see which recipe matched the actual letter. To give a recipe a name, use
entry (3). At the right side of the entry, a button labeled <tt>Idx</tt> is
located. This is a quick index to the outer ExtEntry (i.e. the recipes). If
you press this button a list box will drop down, where you may select one
of the recipes to scroll to, by its name.

<h2>The conditions of a recipe</h2>
The most common condition one wishes to set up, is that one of the header
fields matches a given regular expression, or that the body of the letter
matches a given regular expression. To explain how to do that, lets first
see what a header may look like.

<pre>
From procmail-request@Informatik.RWTH-Aachen.DE  Tue Jan 28 16:30:46 1997
Date: Tue, 28 Jan 1997 10:06:28 -0500 (EST)
From: Rick Troxel &lt;rick@helix.nih.gov&gt;
Subject: Re: Lynx as an external viewer for pine
In-reply-to: &lt;Pine.LNX.3.95.970128011626.3854C-100000@sushi.uni-bonn.de&gt;
To: procmail mailing list &lt;procmail@Informatik.RWTH-Aachen.DE&gt;
Cc: "Robin S. Socha" &lt;uzs8kb@uni-bonn.de&gt;
</pre>

The very first line of the letter is special. This line has been
written by the program sending the letter (often called sendmail). This
header field is often always the same for a given mailing list, so to sort
mail from a mailing list, it might be a good idea to read the letter with an
ordinary file reader (<b>NOT</b> a mail reader, as it will seldom show this
line). And copy this information to the pattern field (figure 4, label
(6) ). As the element to match, you have to select <tt>Sendmail from</tt>
in entry (5). <p> 

Three special macros exists in procmail. These may be used, when matching
header fields:
<dl>
  <dt> TO
  <dd> This macro matches every destination specifications.
  <dt> FROM_DAEMON
  <dd> This should match when the letter comes from a daemon (which
       includes mailing lists). This is useful, to avoid creating a mail
       loop with some mailing list.
  <dt> FROM_MAILER
  <dd> An other regular expression, which matches that the letter comes
       from mail daemon.
</dl>
To see what these macros stand for, please refer to the manual page called
procmailrc.<p>

There is a lot of header fields to chose between in the  pull down menu
(5), but if the one you wish to select isn't located there, you may type it
yourself.<p>

The check box (4) may be used to negate the condition, i.e. the pattern
shall not match to fulfill the condition. 

<h2>Regular expressions</h2>

So far, I have mentioned that you may type a regular expression in (6). In
most cases, it may not be necessary to know anything about regular
expressions, since the procmail module will take care of most of it for
you. One thing may be worth to know anyway, and that is that you may match
``anything'' with <tt>.*</tt> This means that <tt>abc.*def</tt> will match
anything which start with abc and ends with def, eg. <tt>abcdef</tt> or
<tt>abcXXXXdef</tt>. To see a more detailed description of the set of regular
expression, that procmail uses, you may press the button labeled
<tt>Description</tt><p>


One common pitfall is to forget to match everything at the start of the
line. I.E. If you wish to set up a regular expression for the <tt>From:</tt>
field above, it is not enough to give the pattern:
<tt>rick@helix.nih.gov</tt>, since this is not at the start of the line,
you have to tell procmail that every mail messages, which includes the text
<tt>rick@helix.nih.gov</tt> is to be handled, I.E. insert <tt>.*</tt> in
front of the email address.

<h2>Letting an external program decide whether a condition is
fulfilled</h2>

A final way to set up a condition is by using an external program to verify
some conditions. This is done by pressing button (7). This will bring up a
window with a FillOut like the one you can see in figure 3. This time,
however, the entry has been replaced with a text box. In this text box you
may type some commands, which reads either the header or the body on
standard input. These command may refer to some header fields from the
letter. The line (separated with a newline) will be joined together with a
separating semicolon. This makes each line a separate command.<p>

Procmail will consider the condition fulfilled if the exit code from the
program is 0 and not otherwise. This behavior may be changed with the
check button (4) in figure 4.
















<p><hr><center><h1>Actions</h1></center>
The actions, that this module can handle is split up in six parts. These
are described in detail below. To activate an action, you first have to
select the check box, which is located next to it. This is, to make it clear
which actions are enabled for a given recipe.



<h2>Predesigned filters</h2>
In the window which appear, when you press the button
labeled <tt>Predesigned Filters</tt>, you may set up a filter. This filter
may change the header fields, add new header fields and/or remove existing
header fields.<p>

On this page you will find one custom-made filter: <tt>Remove
signatures</tt>. With this filter, you may specify a signature for each
email address. If the text you specify is found (exactly!) it will be
removed from the letter. My intention is that more custom-made filters will
be added, as users send me their ideas and filters.

<h2>Handmade filters</h2>
If you wish to create your own filter, you have to go the page <tt>Handmade
filters</tt>. On this page, you may send the header and/or the body of a
letter through a command.<p>


As an example, you may remove the header with the command <tt>cat - >>
/dev/null</tt>, or add a message to the body of a message with the command
<tt>echo This letter has been resent to you, by my procmail filter!; cat -</tt><p>

If only the filter actions is selected, the
filter will change the letter permanently, i.e. the changes will have effect
on the subsequent recipes (even on the delivered letter, if no recipe
match!) This may be useful if you e.g. uses a mail reader, which does not
support mime, and you have a filter, which can convert mime encoded text to
7 bit ascii.<p>

If however one of the other actions are enabled, the changes will only have
effect within this recipe!





<h2>The reply action</h2>

With the reply action, you may set up a reply mechanism, which sends a
letter back to the sender, with a message you specify. One feature of this
mechanism is that you may specify how often a reply should be send, you
have the following possibilities.
<ul>
  <li> Send a reply to each letter
  <li> Send a reply only once
  <li> Send only a reply if it is more than a given number of days since
       the last reply was send.
</ul>
This is useful, if you leave on vacation, and wish to send a message that
you will not read your letter at once.<p>

The reply is only sent, if the letter does not come from a daemon, to avoid
that you sent a reply to every message on a mailing list.



<h2>The forward action</h2>
With the forward action, you may forward letters to other email
accounts.

<h2>The save to file action</h2>
With this action, you may save the letter to a file. The file name is
specified with a FillOut widget, just like you specified the name of a file
to save backups to. This time, however, you have two additional features:
you may use the content of a header field, or you may use the output from a
command. In figure 5, you can see how to select a header field to extract
as part of the file name.<p>

<center>
<img width=361 height=194 src="./gx/pedersen/header.jpg"><br>
figure 5
</center><p>

Email addresses may be given in three ways:
<ul>
  <li> real name &lt;email&gt;
  <li> email (real name)
  <li> email
</ul>
If you select that the field is an email address, you may specify that you
wish to extract the user name with or without the domain part.<p>

Finally, you may pipe the header field though a command you specify
yourself. This command may read the value of the header field on standard
input, and write to standard output.

<h2>The pipe action</h2>
With the pipe action, you may specify a command, which takes care of the
letter. This command may read the letter on standard input, and may not write
anything (it will be ignored!).








<p><hr><center><h1><a name="aboutlog">The log file</a></h1></center>
The procmail file generated from TDG, contain lots of
comments, which should make it easy for you to find a specific recipe, in
case you wish to see what it look like.<p>

Should something go wrong, you may turn on extended diagnostic, this will
write additional lines to the log file, which lets you see what it does. To
debug this, you have to read both the log file and the procmail
file.<p>

If you use the <em>log abstract</em> options, you will find the program
mailstat very useful. This will tell you how many letters have been
delivered where. One line in the output from the mailstat programs is fake,
and that is the line, which says: <tt>/bin/false</tt>. This
line is due to the way that the generated code look. When you wish to throw
away a letter, in a way so you can explicit see that is has been dumped,
you should deliver it to the file called <tt>/dev/null</tt>. Please note
that you can only use the mailstat program, if extended diagnostic is
turned off.













<p><hr><center><h1>The End</h1></center>
Before procmail start filtering all your incoming mail, you have to add
the following line to the file called <tt>~/.forward</tt>:
<pre>
"|IFS=' ' &&exec /usr/local/bin/procmail -f-||exit 75 #YOUR_USERNAME" 
</pre>
With the correct pathname for procmail, and your email address replaced
with <tt>YOUR_USERNAME</tt><p>

Here's a few link, which you may find interesting:
<dl>
  <dt> The procmail mailing list
  <dd> To subscribe to the procmail mailing list, send a letter to <a
       href="mailto:procmail-request@informatik.rwth-aachen.de">procmail-request@informatik.rwth-aachen.de</a>. Letters to it should be send to <a href="mailto:procmail@informatik.rwth-aachen.de">procmail@informatik.rwth-aachen.de</a>
       
  <dt> <a href="http://www.imada.ou.dk/LG/issue14/procmail.html">Procmail Mini-Tutorial in Linux Gazette</a>
  <dd> In The Linux Gazette issue 14, Jim Dennis has written a mini howto
       on procmail
       
  <dt> <a href="http://www.ling.helsinki.fi/~reriksso/procmail/mini-faq.html">Procmail Mini-FAQ</a>
  <dd> <a href="http://www.iki.fi/~era/">Era Eriksson</a> Has created an excellent FAQ for procmail, which may be worth visiting before you ask anything on the mailing list
  <dt> <a href="http://www.imada.ou.dk/~blackie/dotfile/">The home page of
       the  Dotfile Generator</a>
  <dd> At the home page of The Dotfile Generator, you may find additional
       information about the other modules, which TDG contains (at the
       moment this include: Bash, Elm, Emacs, ipfwadm, Fvwm1, Fvwm2, Tcsh
and Rtin).
</dl>


<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Jesper Pedersen <BR> 
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./comdex.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./gm.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P>
<!--===================================================================-->

&nbsp;<!-- =============================================================
		This Page Designed by Michael J. Hammel.
		Permission to use all graphics and other content for private,
		non-commerical use is granted provided you give me (or the 
		original authors/artists) credit for the work.

		CD-ROM distributors and commercial ventures interested in 
		providing the Graphics Muse for a fee must contact me,
		Michael J. Hammel (mjhammel@csn.net), for permission.
     ============================================================= !--><!--  The Button box as a client side imagemap -->
<MAP NAME="nav-main"><AREA SHAPE="rect" HREF="#mews" coords="20,18 185,40"><AREA SHAPE="rect" HREF="#webwonderings" coords="10,60 185,83"><AREA SHAPE="rect" HREF="#musings" coords="90,102 185,130"><AREA SHAPE="rect" HREF="#resources" coords="70,152 185,180"></MAP>
<TABLE BORDER=0 COLS=2 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/gm3.gif" ALT="Welcome to the Graphics Muse" NOSAVE HEIGHT=216 WIDTH=441 ALIGN=LEFT></TD>

<TD VALIGN=BOTTOM>
<CENTER><FONT SIZE=-1>Set your browser as wide as you'd like now.&nbsp;
I've fixed the Muse to expand to fill the aviailable space!</FONT></CENTER>

<CENTER><FONT SIZE=-2>&copy; 1997 by <A HREF="mailto:mjhammel@csn.net">mjh</A>&nbsp;</FONT></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;
<HR WIDTH="100%">
<TABLE BORDER=0 COLS=2 WIDTH="100%" >
<TR>
<TD WIDTH="185"><IMG SRC="../gx/hammel/muse-image-map.gif" ALT="Button Bar"
BORDER=0 USEMAP="#nav-main" HEIGHT=200 WIDTH=185 ALIGN=LEFT></TD>

<TD VALIGN=TOP><B><FONT SIZE=+1>muse:</FONT></B>&nbsp;
<OL>
<LI>
<I>v;</I> to become absorbed in thought&nbsp;</LI>

<LI>
<I>n;</I> [ fr. Any of the nine sister goddesses of learning and the arts
in Greek Mythology ]: a source of inspiration&nbsp;</LI>
</OL>
&nbsp;<IMG SRC="../gx/hammel/w.gif" ALT="W" HEIGHT=28 WIDTH=36 ALIGN=BOTTOM>elcome
to the Graphics Muse! Why a "muse"? Well, except for the sisters aspect,
the above definitions are pretty much the way I'd describe my own interest
in computer graphics: it keeps me deep in thought and it is a daily source
of inspiration.&nbsp;
<CENTER><FONT SIZE=-1>[<A HREF="#mews">Graphics Mews</A>][<A HREF="#webwonderings">WebWonderings</A>][<A HREF="#musings">Musings</A>]
[<A HREF="#resources">Resources</A>]</FONT></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;
<BR><IMG SRC="../gx/hammel/t.gif" ALT="T" HEIGHT=28 WIDTH=26 ALIGN=LEFT>his column
is dedicated to the use, creation, distribution, and discussion of computer
graphics tools for Linux systems.
<BR>&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can it be true?&nbsp; Has it really
been a whole year for the Muse?&nbsp; Time surely travels more quickly
as we grow older.&nbsp; The lazy days of youth have left me forever, replaced
by the hectic life of adulthood and responsibility.&nbsp; I love it.&nbsp;
No wonder life was so confusing for me as a youth.&nbsp; I was bored.

<P>So, another busy month gone by.&nbsp; I'm still in the throws of pre-shipment
testing at work but fortunately my code seems to be pretty stable now.&nbsp;
I've even managed to get far enough ahead that I've been able to work at
home on other projects while the rest of the gang catches up.&nbsp; To
their credit, their stuff was harder to work on than mine.&nbsp; I got
to design and write my code from scratch.&nbsp; No legacy code for me.

<P>One of the things I've been working on is getting deeper into the GIMP.&nbsp;
If you haven't seen it yet, take a look at the November Linux Journal.&nbsp;
The first of a 4 part series I wrote on the GIMP was published in that
issue.&nbsp; I also have started to learn much more about how to create
interesting effects.&nbsp; If you have some free time and online-money
to burn, check out my <A HREF="http://www.csn.net/~mjhammel/gimp/gallery.html">GIMP
Gallery.</A>&nbsp; I've put most of my more interesting images there.

<P>This month I'm going to talk a little about how to use the GIMP to create
a frame with a 3D metallic or plastic look.&nbsp; The process turns out
to be fairly simply and is one you will probably get to know by heart if
you use the GIMP very often.

<P>I'll also cover my notes from SIGGRAPH '97.&nbsp; I wish I could have
done this right after I got back when the conference was still fresh in
my mind, but things didn't work out that way.

<P>Finally, I'll be covering JavaScript image rollovers - those cute little
image swapping thingies that many people have added to their Web pages.&nbsp;
You can do these using a number of different techniques, but I'm only familiar
with JavaScript right now so thats what we'll talk about.

<P>As usual, feel free to <A HREF="mailto:mjhammel@csn.net">send me comments</A>
on any of this.
<BR><A NAME="mews"></A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/mews.gif" ALT="Graphics Mews" HEIGHT=53 WIDTH=242 ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disclaimer: Before I get too far into this
I should note that any of the news items I post in this section are just
that - news. Either I happened to run across them via some mailing list
I was on, via some Usenet newsgroup, or via email from someone. I'm not
necessarily endorsing these products (some of which may be commercial),
I'm just letting you know I'd heard about them in the past month.
<BR>&nbsp;
<TABLE BORDER=0 COLS=3 WIDTH="100%" NOSAVE >
<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=30 VSPACE=2 HEIGHT=1 WIDTH=1 ALIGN=LEFT></TD>

<TD></TD>
</TR>

<TR NOSAVE>
<TD WIDTH="50%" NOSAVE>
<H2>
CurveSoft announces release of FontScope.</H2>
CurveSoft(tm) is pleased to announce the availability of <B><I><FONT COLOR="#CC6600">FontScope</FONT></I></B>(tm):
A commercial, high-performance portable rasterizer ibrary for Type 1 scalable
fonts sometimes also called PostScript(tm) fonts.&nbsp;

<P>FontScope allows developers and programmers to build Type 1 scalable
font support directly into their applications thus roviding a fast, efficient,
high quality platform-independent solution to the problem of providing
scalable font support.&nbsp;

<P>See <A HREF="http://www.curvesoft.com">http://www.curvesoft.com</A>
for further details about the product.&nbsp;

<P>FREE DEMO&nbsp;
<BR>You can download a free demo for the Linux(x86) and SunOS(SPARC) platforms
from the web page at <A HREF="http://www.curvesoft.com">http://www.curvesoft.com</A>
. The demo lets you arbitrarily scale, skew or rotate characters from any
Type 1 font you may have and view either the bitmap or the outline on the
screen. If you have Multiple Master fonts, it lets you create instances
and then view characters from those instances.&nbsp;

<P>If you have access to a Linux(x86) or a SunOS(SPARC) machine, we strongly
suggest downloading the demo program since that allows you to test FontScope
on your own Type 1 fonts as well as get an idea of thespeed and quality.
If unanswered questions still remain, please email them to info@curvesoft.com</TD>

<TD ROWSPAN="3" WIDTH="2" BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=1 HEIGHT=1 WIDTH=1></TD>

<TD VALIGN=TOP WIDTH="49%" NOSAVE>
<TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<H2>
The GRASP Environment for Ada 95, C, Java, VHDL</H2>
<B><I><FONT COLOR="#CC6600">GRASP</FONT></I></B> is commercial grade GUI
front-end for GNAT, gcc, and JDK. Users can compile, edit, and run programs
directly from GRASP. The editor provides complete syntax coloring with
user selected colors and fonts.&nbsp;

<P>GRASP provides complete support for generating, editing, and printing
Control Structure Diagrams (CSDs) from Ada 95, C, Java, and VHDL source
code. The CSD is a diagram intended to increase the comprehension efficiency
of source code.&nbsp;

<P>GRASP runs under SunOS/Solaris, IRIX, Linux, and WinNT. It is freely
available via the GRASP homepage at&nbsp;
<BR><A HREF="http://www.eng.auburn.edu/grasp">http://www.eng.auburn.edu/grasp</A>
<BR>&nbsp;
<BR>&nbsp;</TD>
</TR>

<TR NOSAVE>
<TD BGCOLOR="#000000" NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=3></TD>
</TR>

<TR NOSAVE>
<TD VALIGN=CENTER NOSAVE>
<BR>&nbsp;

<P>The Texture Library-mirror in Vienna has changed. Please update your
bookmarks and links from:&nbsp;
<CENTER>http://klein.htu.tuwien.ac.at/~rs/</CENTER>

<CENTER>to</CENTER>

<CENTER><A HREF="http://freibier.ml.org/texlib/">http://freibier.ml.org/texlib/</A></CENTER>
</TD>
</TR>
</TABLE>
&nbsp;</TD>
</TR>

<TR NOSAVE>
<TD NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>

<TD NOSAVE><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>

<TR>
<TD></TD>

<TD></TD>
</TR>

<TR NOSAVE>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000" NOSAVE><IMG
SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>
</TABLE>
&nbsp;
<BR><!--
		  -- Did You Know Section
		  -->
<H4>
Did You Know?</H4>
... Adobe Acrobat contains some nice fonts you can use with your X Windows
environment? You get these scalable PostScript fonts:
<BR>&nbsp;
<CENTER><TABLE BORDER=0 COLS=4 WIDTH="70%" NOSAVE >
<TR>
<TD>Courier-Bold</TD>

<TD>Courier-BoldOblique</TD>

<TD>Courier-Oblique</TD>

<TD>Courier</TD>
</TR>

<TR NOSAVE>
<TD>Helvetica-Bold</TD>

<TD NOSAVE>Helvetica-BoldOblique</TD>

<TD>&nbsp;Helvetica-Oblique</TD>

<TD>Helvetica</TD>
</TR>

<TR NOSAVE>
<TD>Times-Bold</TD>

<TD>Times-BoldItalic</TD>

<TD NOSAVE>Times-Italic</TD>

<TD>Times-Roman</TD>
</TR>

<TR>
<TD>AdobeSansMM</TD>

<TD>AdobeSerifMM</TD>

<TD>Symbol</TD>

<TD>ZapfDingbats</TD>
</TR>
</TABLE></CENTER>
I checked the License file and there doesn't appear to be anything against
using these for general use on your system, but you should read the License
yourself to be certain. Then search all the old CD-ROMs you can find for
*.pfa and *.pfb files. For example, Lotus 123 v1.1 for Windows has these:
<BR>&nbsp;
<CENTER><TABLE BORDER=0 COLS=4 WIDTH="70%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>ArialMT</TD>

<TD NOSAVE>Bodoni-BoldCondensed</TD>

<TD>BrushScript</TD>

<TD>Courier</TD>
</TR>

<TR NOSAVE>
<TD>DomCasual</TD>

<TD>LetterGothic</TD>

<TD>NewsGothic</TD>

<TD NOSAVE>Perpetua</TD>
</TR>

<TR>
<TD>Symbol</TD>

<TD>TimesNewRomanPS</TD>

<TD>TimesNewRomanPS-Bold</TD>

<TD>TimesNewRomanPS-BoldItalic</TD>
</TR>

<TR NOSAVE>
<TD ALIGN=CENTER VALIGN=CENTER COLSPAN="4" NOSAVE>TimesNewRomanPS-Italic</TD>
</TR>
</TABLE></CENTER>
You can then use the <A HREF="http://goblet.anu.edu.au/~m9305357/type1inst.html">Type1Inst</A>
script to set up the directories with the new files. Don't forget to run
<B><I><FONT COLOR="#CC6600">xset</FONT></I></B> to tell your X server about
the new directories!

<P><!--
		  -- Q and A Section
		  -->
<H4>
<B><FONT SIZE=+0>Q and A</FONT></B></H4>
<I>Q:</I>&nbsp; Whats the latest on VRML?

<P>A:&nbsp; Check out the VRML update on BUILDER.COM:
<CENTER><A HREF="http://www.cnet.com/Content/Builder/Authoring/Vrml/index.html?dd">http://www.cnet.com/Content/Builder/Authoring/Vrml/index.html?dd</A></CENTER>


<P><I>Q</I>:&nbsp; Whats the latest news on commercial game development
for Linux?

<P>A:&nbsp; There was an important announcement from Crack.com recently.&nbsp;
Check out
<CENTER><A HREF="http://www.gamecenter.com/News/Item/0,3,1190,00.html">http://www.gamecenter.com/News/Item/0,3,1190,00.html</A></CENTER>
&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" BGCOLOR="#000000" NOSAVE >
<TR>
<TD><IMG SRC="../gx/hammel/cleardot.gif" HEIGHT=3 WIDTH=1></TD>
</TR>
</TABLE>

<H2>
Reader Mail</H2>
Dr. Norman Fahrer &lt;<A HREF="mailto:fano@norcov.com">fano@norcov.com</A>>
wrote:&nbsp;<IMG SRC="./gx/hammel/nolimits.jpg" HSPACE=10 VSPACE=10 BORDER=3 HEIGHT=235 WIDTH=356 ALIGN=RIGHT>
<UL>I read your article in the Linux journal. I was running the older version
of gimp (0.5..) and yesterday I wanted to get the new gimp version running.</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; The 0.5 is quite
old.&nbsp; 0.61 was the last publicly released Motif version.
<UL>I configured + compiled + installed.&nbsp; Everything built fine. Now
when I type 'gimp' it says :
<UL><B>gimp: can't load library 'libgtk.so.1'</B></UL>
I have that library built and installed into /usr/local/lib where it is
symboliclly linked to 'libgtk.so.1.0.0'. Do you have any idea what I can
do to get the Gimp running ? Thanks for your help,</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; After installing
the GTK library, be sure the loader knows about it.&nbsp; First run "ldconfig
-p | grep gtk" to see if it already does know about the GTK library.&nbsp;
If you get no output from this then run "ldconfig" again, but without the
-p option.&nbsp; When that completes, run "ldconfig -p | grep gtk" to verify
the library can be found.&nbsp; You'll need to run ldconfig as the root
user if you've installed the library in /usr/local/lib.

<P>ldconfig generally looks in /usr/local/lib, along with a few other places,
for libraries.&nbsp; To make sure it does, check /etc/ld.so.conf and make
sure that directoy is listed there.&nbsp; Check the man pages for ldconfig
if you have any further problems.

<P>If ldconfig -p shows gtk is already installed then the other possibility
is to add the following to your .profile:
<UL><B>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib</B>
<BR><B>export LD_LIBRARY_PATH</B></UL>
This may help the loader find the library at run time too.

<P><A HREF="mailto:kar@webline.dk">kar@webline.dk </A>wrote:
<UL>Do you know of a tool that can convert Corel's cdr and wpg formats
into a more commonly accessibly format?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; Image Alchemy supports
wpg.&nbsp; It may also support cdr by now although the version I have doesn't
list it (I know there are a number of formats it supports that aren't listed,
however).&nbsp; Check out my Graphics Muse column in the August 1997 Linux
Gazette.&nbsp; There are links there to their web site. The Linux Gazette
is at http://www.ssc.com/lg.
<UL>It's a little much to buy a package just for that - perhaps you could
ask in your column if anybody knows other programs that can?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; Ok.&nbsp; So readers,
anyone know of a cheaper method?&nbsp; If so send it to him.&nbsp; I'm
satisfied with knowing there is a commercial solution.

<P>Tethys &lt;<A HREF="mailto:tethys@ml.com">tethys@ml.com</A>> wrote in
respose to a Musing last month about NetPBM not having JPEG conversion
tools:
<UL>Yes, you're right. Netpbm doesn't come with tools to convert to and
from JPEG. Maybe it should. However, this is probably because the libjpeg
distribution that it would use already comes with cjpeg and djpeg. By default,
these already act like ppmtojpg and jpgtoppm. They also accept other formats
like GIF, BMP, TGA etc.</UL>
David Maha &lt;<A HREF="mailto:cmulator@pacific.net.sg">cmulator@pacific.net.sg</A>>
wrote:
<UL>My installation diskette for my image256 software was destroyed by
coffee, and I've been looking for the software for quite some time now.
I have a A4 Tech A4Color AC 4096 hand-held scanner. Do you know of which
software can be used to operate the scanner and if possible in Windows
environment? Can you tell me where I could download it or get it on the
net?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; I'm not familiar
with MS platforms.&nbsp; I don't use them.&nbsp; However, there are apparently
some Linux drivers for this scanner on the Sunsite Linux archives. Take
a look at: <A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/graphics/scanners">ftp://sunsite.unc.edu/pub/Linux/apps/graphics/scanners</A>.

<P>I did a review of all the Linux scanner information I could find in
my Graphics Muse column in March of this year.&nbsp; You can take a look
at it starting at the Linux Gazette's (which is the online magazine that
carries my Graphics Muse column) table of contents at <A HREF="http://www.ssc.com/lg">http://www.ssc.com/lg</A>.

<P>Gregory Gardener &lt;<A HREF="mailto:GardenerG@code20nl.npt.nuwc.navy.mil">GardenerG@code20nl.npt.nuwc.navy.mil</A>>
wrote:
<UL>I work for the DOD.&nbsp; From reading your column in Linux Journal
it appears that you have expertise in the area of PC graphics...so I'm
directing my question to you. If I wanted to develop a PC software product--an
interactive educational system--what PC graphics package is "state of the
art" for Linux or Windows?</UL>
<B><I><FONT COLOR="#993300">'Muse</FONT></I></B>:&nbsp; Good question.

<P>Don't choose a platform, choose a technology:&nbsp; Java and/or VRML.&nbsp;
Why?&nbsp; By doing so you remove the need for your end users to be required
to have a particular platform to use your software.&nbsp; Second, you can
more easily fit into any organization no matter what platforms they might
already have.

<P>Problems:
<OL>
<LI>
Java is not quite standard on all platforms yet.</LI>

<LI>
VRML is very new and has the traditional problems with new technologies
(acceptance, standards, etc).</LI>

<LI>
VRML requires the availability of a VRML browser on your end-users platforms.</LI>
</OL>
#1 is not going to be a problem by the middle of next year (my guess).
Depending on your roll-out date it might be worth starting with Java right
from the start.&nbsp; In fact, I'm investing my own time in learning Java.&nbsp;
I do GUI development for a living and feel my skills in X may not be enough
for the long run.&nbsp; Java GUI is the next big thing for people like
me.

<P>#3 is a problem.&nbsp; There are only a few VRML browsers for Linux
right now and I don't know much abou them.&nbsp; Liquid Reality is one
- it requires you have the Java runtime environment installed and working.&nbsp;
VRML on non-Linux is actually better supported right now, but thats probably
a situation that will be fixed within the next year (again, my guess).

<P>Now, assume you go with these two.&nbsp; Now you can choose your *own*
development platform.&nbsp; I'd pick Linux.&nbsp; Why?&nbsp; Because MS
is not being very forthcoming about their support of Java - Linux has embraced
it quite happily.&nbsp; I'm just getting started with Java development
so I can't tell you how to use the tools, but the Java Development Kit
(JDK), all the way up to version 1.1.3, has been ported to Linux.&nbsp;
There is a commercial Java IDE kit, Vibe, for Linux already.

<P>VRML is like HTML and you can write it using vi or EMACS or whatever
text editor you'd like.&nbsp; Eventually there will be WYSIWYG editors
for VRML, but for now it shouldn't be difficult to do by hand.&nbsp; In
fact, many of the current VRML texts are written from the point of view
that you <I>are</I> writing it by hand.

<P>Alternatives:&nbsp; OpenGL/Motif/C.&nbsp; This is the way I'd do it
<I>right</I> now simply because I already now Motif and C and OpenGL is
something I've been studying off and on for a few months now.&nbsp; I really
like OpenGL, but if you use Motif/C your application is less portable across
platforms (ie its not very easy to port to MS or Macs).&nbsp; OpenGL has
been ported to lots of platforms, but it doesn't provide a windowing toolkit
so you have to use it with a toolkit native to your platforms (Motif/X,
MS Windows, etc).

<P>Now, this still might not address your problem because "an interactive
educational system" can encompass all sorts of display data so its hard
to say if Java/VRML will work for you.&nbsp; What sort of graphics do you
need to display?&nbsp; How do they need to be displayed?&nbsp; User Interfaces
(UI's) is a big area of study that few people hear about because the hype
from the technologies you use for them gets more attention.&nbsp; The problem
still exists - which technology do you use?&nbsp; The answer - whatever
one you're most comfortable with for now.&nbsp; Eventually, you need to
get familiar with Java and VRML.

<P>
<HR WIDTH="100%">
<BR><A NAME="webwonderings"></A>
<BR><IMG SRC="../gx/hammel/webwonderings.jpg" HEIGHT=57 WIDTH=246>
<H2>
Adding JavaScript rollovers to Web pages.</H2>
Last month I talked about browser detection with JavaScript.&nbsp; Like
most Web technologies, JavaScript is new and prone to problems, even within
the applications for which it was developed - the Netscape Navigator Web
browser.&nbsp; In order to make the best use of JavaScript with Netscape
Browsers you'll want to make sure you understand what versions of the browser
support which JavaScript constructs.&nbsp; Browser detection helps you
do this.

<P>This month we'll talk about a common trick many people are using in
their Web pages today:&nbsp; image rollovers.&nbsp; An image rolllover
is an image that changes based on user input.&nbsp; For example, if you
look at my <A HREF="http://www.csn.net/~mjhammel/gimp/gimp.html">GIMP pages</A>
(you'll need Netscape 3.x or later for this) you'll see image rollovers
in the menus.&nbsp; When you place the mouse over the text for one of the
menu items, the Gallery for example, the text background changes to a light
blue or cyan color.&nbsp; The text is actually an image, not ordinary HTML
text.&nbsp; When you place the mouse over the image it is swapped out for
another image, the cyan colored version.&nbsp; Thats a rollover.

<P>Adding rollovers is actually fairly easy.&nbsp; First, you need to make
two copies of an image (we're taking a very basic approach to this - you
can actually create multiple versions of the image to be displayed based
on different types of user input).&nbsp; The first copy is the original,
the image to be displayed initially or when no user input is being applied.&nbsp;
The second is the image to be swapped in when the user moves the mouse
over the original or clicks on the image.&nbsp; Creating these images can
be done in any number of ways.&nbsp; Personally, I use t<A HREF="http://www.gimp.org">he
GIMP.</A>&nbsp; Its well designed for these kind of image processing tasks.

<P>Next you need to understand how JavaScript interprets user input.&nbsp;
These are called events.&nbsp; There are number of different events that
JavaScript can recognize&nbsp; Not all are applicable to images, however,
nor to use with rollovers.&nbsp; The ones of interest are:
<BR>&nbsp;
<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 COLS=3 WIDTH="70%" BGCOLOR="#FFCC00" NOSAVE >
<TR NOSAVE>
<TD BGCOLOR="#66FFFF" NOSAVE><B>Event Name</B></TD>

<TD BGCOLOR="#66FFFF" NOSAVE><B>Meaning</B></TD>

<TD BGCOLOR="#66FFFF" NOSAVE><B>JavaScript and Netscape versions</B></TD>
</TR>

<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onclick</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User clicks on an image.</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.0 (Navigator pre-3.x)</TD>
</TR>

<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmouseover</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User moves the mouse over the image</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.0 (Navigator pre-3.x)</TD>
</TR>

<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmouseout</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User moves cursor out from link or image
map.</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.1 (Navigator 3.x)</TD>
</TR>

<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmousedown</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User presses a mouse key down but doesn't
release it.</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.2 (Navigator 4.x)</TD>
</TR>

<TR NOSAVE>
<TD ALIGN=LEFT VALIGN=TOP NOSAVE>onmouseup</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>User releases the mouse button.</TD>

<TD ALIGN=LEFT VALIGN=TOP NOSAVE>1.2 (Navigator 4.x)</TD>
</TR>

<CAPTION ALIGN=BOTTOM><B>JavaScript Events useful for rollovers</B></CAPTION>
</TABLE></CENTER>
These are all fairly self explanatory.&nbsp; They are all associated with
the way a user handles the mouse in relation to the image. Note also that
the event name is case insensitive.&nbsp; You will often see examples where
the evens are written like onMouseOver or onClick.

<P>Finally, you need to understand how JavaScript references images on
a Web page.&nbsp; The trick to rollovers is to update the correct image
- in some cases the image to update is not the image over which the mouse
currently rests.&nbsp; For example, see my <A HREF="http://www.csn.net/~mjhammel/nav-top.html">contents
page</A> where I update a central image when the mouse is placed over images
that surround the central image.&nbsp; That page doesn't do a good job
checking which browser is being used and as a result it doesn't work well
with non-Netscape 3.x browsers, or even 3.x browsers on non-Unix platforms.&nbsp;
Still, the rollovers do work right on the Linux Netscape browser.

<P>JavaScript references images as objects and as such treats them just
like any other object.&nbsp; Images in a document (documents are HTML pages)
are referenced using names, such as
<BR>&nbsp;
<CENTER><TABLE BORDER=0 CELLSPACING=3 CELLPADDING=3 COLS=1 WIDTH="350" NOSAVE >
<TR NOSAVE>
<TD ALIGN=CENTER VALIGN=CENTER NOSAVE><A HREF="javascript:void(null)" onmouseover="navInfo('Happy Dog, eh?', 1); return true;" onMouseout="clearInfo(0);return true"><IMG SRC="./gx/hammel/dog-1.jpg" NAME="dog" BORDER=0 HEIGHT=240 WIDTH=320></A></TD>
</TR>

<TR NOSAVE>
<TD ALIGN=CENTER VALIGN=CENTER NOSAVE><B>document.dog.src</B></TD>
</TR>
</TABLE></CENTER>
The <I>document</I> name means the current document (page), the <I>dog</I>
name references the NAME= tag given to the above image, and the <I>src</I>
name refers to the name of the image, such as "dog-1.gif".&nbsp;&nbsp;
You'll notice, if you have an appropriate browser (I was lazy - there is
no browser detection code included!), that the above image changes when
you place the mouse over the dog.&nbsp; So does the text in the status
bar at the bottom of the document.&nbsp; Lets look at the code that handles
this.

<P>First, lets look at the image's HTML definition:
<UL><B>&lt;A <FONT COLOR="#009900">HREF="javascript:void(null)"</FONT></B>
<UL><B><FONT COLOR="#009900">onMouseOver</FONT>="mouseIn('Happy Dog, eh?',);
return true;"</B>
<BR><B><FONT COLOR="#009900">onMouseOut</FONT>="mouseOut(); return true"></B></UL>
<B>&lt;IMG SRC="./gx/hammel/dog-1.jpg" <FONT COLOR="#009900">NAME</FONT>="dog"
<FONT COLOR="#009900">BORDER</FONT>=0 HEIGHT=240 WIDTH=320></B>
<BR><B>&lt;/A></B></UL>
Notice the name of the image:&nbsp; NAME="dog".&nbsp; This gives JavaScript
the object reference it needs to access the correct image.&nbsp; You can
also access images using a documents <I>images</I> index, but thats a somewhat
haphazard method (one I use with my contents page) and a bit harder to
use.&nbsp; I recommend using NAME tags for rollovers.

<P>A few other things we should note about this bit of HTML:
<OL>
<LI>
There are event handlers for when the mouse enters the image area (<B>onMouseOver</B>)
and for when the mouse leaves the image area (<B>onMouseOut</B>). We'll
discuss the values we associate with each of these in a moment.</LI>

<LI>
The event handlers are placed in an anchor with an HREF tag.&nbsp; The
HREF points to a JavaScript function called "void", which is a simple method
for doing nothing.&nbsp; In this case we want only the event handlers to
do anything and the anchor to do nothing.</LI>

<LI>
We've set the border width to 0 for the image so that no border will be
placed around the image.&nbsp; If we didn't do this a border would be added
that used the link and visited-link colors because the image is wrapped
in an anchor tag. This way, the image doesn't really look like a link.&nbsp;
Thats good, since its not really a link to anything.</LI>
</OL>
Before we talk about the event handlers, we should take a look at the JavaScript
code:
<UL><B>&lt;SCRIPT LANGUAGE="JavaScript"></B>

<P><B>&lt;!-- Hide script from older browsers</B>

<P><B>numitems=2;</B>
<BR><B>SampleImages = new Array(numitems);</B>

<P><B>SampleImages[0] = new Image();</B>
<BR><B>SampleImages[1] = new Image();</B>

<P><B>// Establish the two image objects we want to use.</B>
<BR><B>SampleImages[0].src="./gx/hammel/dog-1.jpg";</B>
<BR><B>SampleImages[1].src="./gx/hammel/dog-2.jpg";</B>

<P><B>// Event handler called for onMouseOver event</B>
<BR><B>function mouseIn(input_status)</B>
<BR><B>{</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status = input_status;</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.dog.src = SampleImages[1].src;</B>
<BR><B>}</B>

<P><B>// Event handler called for onMouseOut event</B>
<BR><B>function mouseOut()</B>
<BR><B>{</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; status="";</B>
<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; document.dog.src = SampleImages[0].src;</B>
<BR><B>}</B>

<P><B>// End of hidden script --></B>

<P><B>&lt;/SCRIPT></B></UL>
For this example you are safe in placing this bit of code inside the &lt;HEAD>
&lt;/HEAD> section of your HTML.

<P>The two event handlers call JavaScript functions.&nbsp; The mouseIn()
function is called to change the image when the mouse enters the image
area.&nbsp; As you see in the HREF tag the event handler associated with
this function is the onMouseOver event.&nbsp; This function has two lines.&nbsp;
The first takes the text passed as an argument and places it on the status
bar at the bottom of the browser.&nbsp; The second line replaces the image
referenced as "dog" by the second image in the SampleImages array. Pretty
straight forward, don't you think?

<P>The second function, mouseOut(), is called when the mouse is moved out
of the image area.&nbsp; It, too, has two lines.&nbsp; The first clears
the status bar and the second places the image in the first element of
the SampleImages array over the image currently in the object called "dog".&nbsp;
In this case, the SampleImages array's first element holds the same image
source as the original image displayed in the IMG tag in our HTML source.

<P>A few things to note about the code: I used an array to hold the images
I wanted to use for my rollover.&nbsp; In this simple example I could just
have easily used
<CENTER><B>document.dog.src = "./gx/hammel/dog-1.jpg"</B></CENTER>
instead.&nbsp; If you use an array be sure to define the storage for the
array objects.&nbsp; I first defined the array with
<CENTER><B>SampleImages = new Array(numitems);</B></CENTER>
I then defined the image storage for each element of the array with
<CENTER><B>SampleImages[0] = new Image();</B></CENTER>
Of course this could be done in a loop, like with a for() statement.&nbsp;
The definition of these objects with the "new" keyword causes JavaScript
to load the image but not actually display it.&nbsp; You could use these
scripts to preload images to a page so that when subsequent pages were
accessed the images could be pulled from cache immediately.

<P>The image object also contains a number of other properties, such as
the BORDER width, image HEIGHT and WIDTH, and the VSPACE attribute for
setting the vertical space around the image.&nbsp; By not specifying the
HEIGHT and WIDTH for the document.dog object in the functions I have assumed
the new image has the same dimensions as the old.&nbsp; If this were not
the case you might want to update the image dimensions in your functions
as well.

<P>Well, that should get you started.&nbsp; Image rollovers are kinda cool
to play with and can add a little pizazz to an otherwise drap Web page,
but be careful.&nbsp; Like most of the neat toys on the Web, too much of
anything can be annoying.

<P>
<HR WIDTH="100%">

<P><A NAME="musings"></A>
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/musings.gif" ALT="Musings" HEIGHT=52 WIDTH=247 ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;
<TABLE BORDER=0 COLS=3 WIDTH="100%" NOSAVE >
<TR>
<TD ALIGN=LEFT VALIGN=TOP COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG
SRC="../gx/hammelcleardot.gif" ALT="indent" HSPACE=1 HEIGHT=1 WIDTH=1 ALIGN=LEFT></TD>

<TD></TD>
</TR>

<TR>
<TD ALIGN=LEFT VALIGN=TOP ROWSPAN="3" WIDTH="50%">
<H2>
SIGGRAPH 97 Notes</H2>
For those that don't know, SIGGRAPH is the yearly conference on computer
graphics sponsored by the ACM.&nbsp; To be exact, SIGGRAPH is the Special
Interest Group - Graphics of the ACM and the conference is an extension
of that, but in the past few years this conference has grown into a major
exposition where all the big names in the computer and entertainment industry
show their latest wares.&nbsp; This year the conference was held in Los
Angeles.&nbsp; It was also my inaguaration into this madhouse.&nbsp;

<P>I should tell you that what follows is not specifically Linux related.&nbsp;
I will try to associated what I saw or learned with Linux as much as possible,
but in general Linux is not a powerhouse at SIGGRAPH,&nbsp; In fact, with
the exception of one technical course and a couple of engineers manning
booths at the show, I didn't hear anyone talk about Linux.&nbsp; We have
some work ahead of us to get real notice.&nbsp;

<P>For me, SIGGRAPH lasted 4 days, Sunday through Wednesday, even though
the conference actually ran for 6 days.&nbsp; I went as my vacation (sick,
isn't it) and after 4 days had been run so ragged I decided my last full
day would do something quite and peaceful - so I went to Universal Studios.&nbsp;
SIGGRAPH, for those who've never been, is non-stop energy drain, both physically
and mentally.&nbsp;

<P>My first day there I spent going through lines - at the airport, at
the car rental (my god, what a mess), and at the conference registration
booths.&nbsp; I had preregistered and so I only needed to pick up my conference
materials, but that took about 45 minutes.&nbsp; Having not been to a conference
of any kind since a trip to Interop back in 1991, I was a bit disappointed
to see no texts provided for the courses.&nbsp; In fact, the courses weren't
really courses, they were presentations in front of monster sized audiences.&nbsp;
I remember the Interop courses being a bit more personal, more like real
classes.&nbsp;

<P>Although I got there late, I did managed to get into the Introductory
class on OpenGL that was given by SGI staff members.&nbsp; It was mostly
a discussion on basic OpenGL syntax.&nbsp; I did manage to wind up sitting
right next to Bruce Peren's office mate at Pixar - a very nice fellow named
Jim W. (my notes didn't include his last name - hope he doesn't get made
at me).&nbsp; That seemed strange until I found out that Pixar sends just
about everyone to SIGGRAPH.&nbsp; A few days later I saw Larry Gritz but
didn't get a chance to talk to him.&nbsp; Like most people at SIGGRAPH,
he was in a hurry to get somewhere.&nbsp;

<P>The rest of the day I spent wondering around the LA convention center
looking for where other classes and events would be held.&nbsp; There was
a career center downstairs where people could post resumes and companies
posted job positions.&nbsp; Xi Graphics had a posting there, but other
than that I didn't see any Linux-related postings.&nbsp; By the time I
got back to my hotel it was about 9pm - and I had yet to eat that day.&nbsp;
One word of warning to future attendees:&nbsp; take snacks!&nbsp; Finding
food can be hard and what you do find can be awful (at least in LA by the
convention center) and you <B><I>will</I></B> need the enegy!&nbsp; Being
a running, I should have brought a few energy bars with me.&nbsp; Well,
thats a lesson learned.&nbsp;

<P>The next day I went to the Advanced OpenGL course, also taught by SGI
staff.&nbsp; This was a more interesting class to me, since it talked about
techniques a bit more than just syntax.&nbsp; There were some good discussions
on using environment maps (mapping an image to surface), projecting textures,
and billboarding.&nbsp; This last one is a cool technique I wasn't aware
of.&nbsp; An image is mapped onto a planar surface and that surface is
programmed to always face towards the viewer.&nbsp; It is sort of like
taking a photo of a tree, cutting away all of the photo except the tree,
and pasting it to a popsicle stick.&nbsp; The stick is then rotated so
that the photo of the tree always faces you.&nbsp; It simulates a 3D effect
without all the overhead of huge polygon counts for a real tree.&nbsp;
This technique works well for scene objects that are in the distance but
looses its effect up close.&nbsp; You can see billboarding effects in many
games.&nbsp;

<P>Another effect they covered was the creation of fire.&nbsp; They used
a noise function along with what are called "quad mappings" to blur regions
of the noise.&nbsp; They then added some turbulence and an absolute value&nbsp;
<CENTER><TABLE BORDER=0 COLS=1 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/flame.jpg" HEIGHT=256 WIDTH=256></TD>
</TR>
</TABLE></CENTER>
function to create veins in the fire.&nbsp; It turns out you can do something
similar with the GIMP by using the solid noise filter, followed by some
blurring and waves adjustments, and cleaned up with a combination of curves/color
balance adjustments (for color), and sharpening (for details).&nbsp;

<P>When I got home I went to visit my sister and her kids and watched them
play Super Mario Bros on their ... Sega?&nbsp; Anyway, having just returned
from SIGGRAPH I could see the effects they talked about in the advanced
OpenGL course.&nbsp; It was very enlightening.&nbsp;

<P>One of my reasons for going to the OpenGL courses was to get an idea
for how multimedia applications could be built for Linux.&nbsp; An alternative
to an OpenGL based multimedia kit would be one based on VRML. I attended
the VRML Demo SIG on Monday night and it had some very cool demos using
VRML 2.0.&nbsp; If based on CD-ROM this could be a very good cross platform
environment for multimedia packages (edutainment, for example).&nbsp; The
current drawback is that the demos required 2.0 capable browsers, but there
should any number of those showing up in the next year or so.&nbsp; According
to CGW (freebie that was dropped at my hotel room - very nice touch), Netscape
4.0 has the SGI Cosmo Player embedded in it now.&nbsp; I haven't been able
to get this to work yet, however.&nbsp; Since I have a 2.0 kernel installed
now I can try some of the other VRML browsers available.&nbsp; Maybe I'll
get to that next month.&nbsp;
<CENTER><A HREF="#next-column">-Top of next column-</A></CENTER>

<CENTER>&nbsp;</CENTER>
</TD>

<TD ROWSPAN="3" WIDTH="2" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent" HSPACE=1 HEIGHT=1 WIDTH=1></TD>

<TD WIDTH="49%">

<P><BR>
<LH><A NAME="next-column"></A><B>More Musings...</B>&nbsp;</LH>&nbsp;
<LI>
<A HREF="more-musings.html">GIMP Tip</A> - 3D metal and plastic borders.</LI>

<BR>&nbsp;</TD>
</TR>

<TR>
<TD BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1></TD>
</TR>

<TR NOSAVE>
<TD VALIGN=TOP NOSAVE>On Tuesday I arrived 1/2 hour early to take the 3D
Animation Workshop.&nbsp; I was about 20th in line of 100 or so, but somehow
managed to miss getting a little blue ticket.&nbsp; Despite the people
at the door having seen me there for 30 minutes waiting (before others
had showed up) I still didn't get in.&nbsp; I was very pissed.&nbsp; This
class was one of my prime reasons for my going to SIGGRAPH.&nbsp; Hint:&nbsp;
if you get in line at SIGGRAPH, make sure you check with the people in
front of you to see if you need to have some special form, ticket, or sacrificial
offering to get in.&nbsp;

<P>My fallback course was the GUI/Multimedia class.&nbsp; There really
wasn't much multimedia discussion - mostly it covered how to design GUI
intefaces.&nbsp; Lots of design criteria which I'd learned by fire long
ago.&nbsp; When they finally did get around to multimedia they talked about
the lack of standards and how most applications are reinventing GUI rules.&nbsp;
This was my assessment before going to the class, but it was nice to have
it reinforced by someone who studies such things for a living.&nbsp;

<P>Next I skipped out to Mark Kilgard's OpenGL w/Windowing systems class.&nbsp;
Pretty good stuff.&nbsp; Brian Paul talked about MesaGL a little as well
as some portability issues.&nbsp; Both are very nice guys - I chatted with
them a bit after the class.&nbsp; One thing Mark mentioned was that there
arent' any toolkits specifically built with OpenGL, which makes sense.&nbsp;
There is an overhead in creating widgets using OpenGL that would make it
unsuitable for most applications.&nbsp; Instead, OpenGL is integrated into
applications using some other toolkit, like Motif, XForms, or Tk, using
a toolkit specific OpenGL-capable widget.&nbsp;

<P>Later on I stumbled into the Java3D class for a few minutes.&nbsp; Looks
interesting but I didn't get too many details.&nbsp; Sun is saying a beta
release of a sample implementation of the specification&nbsp; is due out
in December of 1997 but the course speakers said they hoped to have it
out much sooner.&nbsp; They also expect that since the specification is
public and being openly developed that sample implementations from non-Sun
sources are likely to show up before the Sun release.&nbsp; Or at least
they expect that - they didn't have any information on any specific implementations.&nbsp;
At this point I haven't heard of any Java3D announcements from my usual
sources.&nbsp;

<P>I talked to a couple of recruiters at the career fair, mostly just to
get a feel for what companies are looking for these days.&nbsp; They mentioned
that the best way people can avoid getting lost in the crowd of candidates
at the fair is to submit resumes based on job postings from the corporate
web sites.&nbsp; If you go next year looking for work, check out some of
the participating companies job listings before heading to the career fair.&nbsp;

<P>First day of the show for me was Wednesday.&nbsp; It looked more like
a cross between a theme park ride and a disco, especially when Intel rolled
out their MMX "clean-room dancers".&nbsp; SGI offered a 1/2 hour demo ride
with their O2 systems.&nbsp; Cute demo but really didn't give a good feel
for what you were really buying.&nbsp; After talking to some of the show
staff and taking the demo ride I still don't know exactly what applications
come with the stock O2 box.&nbsp; The $4995 price offered to conference
participants wasn't bad, however.&nbsp; Certainly compares well with a
comparably equipped PC running NT.&nbsp; There is a freeware/shareward
CD available for O2 developers according to one of the engineers I talked
to, but I didn't see it.&nbsp;

<P>The SGI O2 demo showed me one thing which I had hoped I'd find out from
the show:&nbsp; how to create multimedia applications.&nbsp; In fact, after
the demo a White Paper was passed out explaining how the demo was put together.&nbsp;
Some items, like the networking that allowed real-time texture mapping
of live video, are not really possible on Linux boxes with available software.&nbsp;
But most of the rest is:&nbsp; OpenGL rendered in Motif widgets was used
for the GUI and OpenGL and VRML were used for interactive 3D displays.&nbsp;
OpenGL is available commercially and with MesaGL.&nbsp; Motif is available
commercially. I'm not certain VRML is available for integration into applications
via an API, but animation could be done using MPEG.&nbsp; There are some
MPEG API's, such as MpegTV's API.&nbsp; ImageMagick's PlugIn distribution
appears to have an MPEG library, but I don't know if it provides a decent
enough API for commercial multimedia applications.&nbsp;

<P>After seeing the SGI demo and the VRML SIG demos I've changed my mind
about VRML - its ready for prime time.&nbsp; I wouldn't recommend it for
network applications yet, at least not Internet based applications, but
for private networks (such as kiosks) or CD-based multimedia applications
it could offer some unique possibilities.&nbsp;

<P>Wacom was at the show and a few of the staff didn't get defensive when
I brought up Linux (it all depends on how non-abrasively you bring up the
subject). They were even quite apologetic about not having any info on
which tablets were supported by XFree86.&nbsp; They now have a pad that
is actually a full-color flat screen - you simply draw on it like you do
with the tablets.&nbsp; Very cool, but currently runs > $2200.&nbsp;

<P>Cosmo Software (new division of SGI) staff were pleasant as well, mentioning
that it might be possible to provide someone with the source to port the
Cosmo Player to Linux.&nbsp; The player (which plays VRML 2.0 scenes) is
free for various other platforms.&nbsp; I guess they just need someone
to ask for it and provide some credentials to prove they could do a decent
port.&nbsp; Unfortunately, I'm not certain who to talk to about this.&nbsp;

<P>Huge crowds formed around the Apple booth right at the entrance.&nbsp;
One demo I caught caused an OS lockup, but for the most part people were
quite excited about the products.&nbsp; I don't know much about Mac's so
didn't stay long.&nbsp; However, like LInux, Mac is an underdog in the
OS world and I can't help but hope they survive.&nbsp;

<P>The one thing about this trip that stood out for me was LA itself.&nbsp;
It was Hot.&nbsp; Outside.&nbsp; Inside.&nbsp; In classes.&nbsp; In the
car.&nbsp; In the hotel.&nbsp; Everywhere.&nbsp; Hot. LA also has an ugly
downtown compared to others I've seen.&nbsp; It also apparently has very
few restaurants anywhere near the Convention Center.&nbsp; A 6 block walk
in Colorado is no big deal, but a 6 block walk in LA in August....*sigh*.&nbsp;
Food was a big problem for me.&nbsp; I hope the same problem doesn't exist
in Orlando next year.&nbsp;
<BR>&nbsp;
<BR>&nbsp;</TD>
</TR>

<TR>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#000000"><IMG SRC="../gx/hammel/cleardot.gif" HSPACE=1 HEIGHT=1 WIDTH=1>submitted
resumes based on job postings from their web sites.</TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;
<TABLE BORDER=0 COLS=1 WIDTH="100%" >
<TR>
<TD><IMG SRC="../gx/hammel/resources.gif" ALT="Resources" HEIGHT=57 WIDTH=246 ALIGN=LEFT></TD>
</TR>
</TABLE>
The following links are just starting points for finding more information
about computer graphics and multimedia in general for Linux systems. If
you have some application specific information for me, I'll add them to
my other pages or you can contact the maintainer of some other web site.
I'll consider adding other general references here, but application or
site specific information needs to go into one of the following general
references and not listed here.
<BR>&nbsp;
<TABLE BORDER=0 COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE><A HREF="http://www.csn.net/~mjhammel/linux/lgh.html">Linux
Graphics mini-Howto</A>&nbsp;
<BR><A HREF="http://www.csn.net/~mjhammel/ugu/ugu.html">Unix Graphics Utilities</A>&nbsp;
<BR><A HREF="http://www.digiserve.com/ar/linux-snd/">Linux Multimedia Page</A>&nbsp;

<P>Some of the Mailing Lists and Newsgroups I keep an eye on and where
I get much of the information in this column:&nbsp;

<P><A HREF="http://www.gimp.org">The Gimp User and Gimp Developer Mailing
Lists</A>.&nbsp;
<BR><A HREF="http://www.irtc.org">The IRTC-L discussion list</A>&nbsp;
<BR><A HREF="news:comp.graphics.rendering.raytracing">comp.graphics.rendering.raytracing</A>&nbsp;
<BR><A HREF="news:comp.graphics.rendering.renderman">comp.graphics.rendering.renderman</A>&nbsp;
<BR><A HREF="news:comp.graphics.api.opengl">comp.graphics.api.opengl</A>&nbsp;
<BR><A HREF="news:comp.os.linux.announce">comp.os.linux.announce</A>&nbsp;</TD>

<TD><IMG SRC="../gx/hammel/gmuse.jpg" HSPACE=10 HEIGHT=270 WIDTH=190></TD>
</TR>
</TABLE>
<A NAME="future"></A>
<H2>
Future Directions</H2>
Next month:
<BR>I don't know yet.&nbsp; Things are very hectic right now, but I'll
think of something.&nbsp; Thanks to everyone who has made suggestions in
the past!&nbsp; I do keep all your suggestions, even if I haven't gotten
around to all of them yet.

<P><A HREF="mailto:mjhammel@csn.net">Let me know what you'd like to hear
about!</A>

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Michael J. Hammel<BR> 
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"

LT="[ FRONT PAGE ]"></A>
<A HREF="./procmail.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./bench2.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<!-- =============================================================
		This Page Designed by Michael J. Hammel.
		Permission to use all graphics and other content for private,
		non-commerical use is granted provided you give me (or the 
		original authors/artists) credit for the work.

		CD-ROM distributors and commercial ventures interested in 
		providing the Graphics Muse for a fee must contact me,
		Michael J. Hammel (mjhammel@csn.net), for permission.
     ============================================================= !--><A NAME="musings"></A>
<TABLE>
<TR>
<TD>
<H2>
More...</H2>
<IMG SRC="../gx/hammel/musings.gif" ALT="Musings" HEIGHT=52 WIDTH=247 ALIGN=LEFT>&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<TABLE WIDTH="100%" >
<TR>
<TD ALIGN=RIGHT WIDTH="100%"><FONT SIZE=-2>&copy; 1997 <A HREF="mailto:mjhammel@csn.net">Michael
J. Hammel</A>&nbsp;</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP BGCOLOR="#000000" cellpadding="0" cellspacing="0"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent"  ALIGN=LEFT></TD>
</TR>
</TABLE>
<A NAME="1"></A>
<H2>
GIMP Tip:&nbsp; 3D metal and plastic borders</H2>
This is a little trick for creating 3D frames with a metallic or shiny
plastic look.&nbsp; The trick is pretty easy and once you've done it a
few times it will become second nature.
<BR>&nbsp;
<TABLE BORDER COLS=2 WIDTH="100%" NOSAVE >
<TR NOSAVE>
<TD NOSAVE>
<OL>
<LI>
Select a thick, solid brush.&nbsp; I used Circle (09).&nbsp; This brushes
will create thick frames.&nbsp; Thin brushes create thin frames.&nbsp;
Don't use feathered brushes.&nbsp; We need a solid outline at this point.</LI>

<LI>
Make sure the foreground is black and the background is white.</LI>

<LI>
Outline a selection using the Bezier and Marquee tools.</LI>

<LI>
Stroke the selections.&nbsp; You can do this in multiple steps.&nbsp; I
created three separate selections, stroking each one individually.</LI>

<LI>
Blur the image using the Gaussian Blur with a horizonatal and vertical
radius of between 1.5 and 5 units.</LI>
</OL>
</TD>

<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/gimp-1.jpg" HEIGHT=321 WIDTH=304></TD>
</TR>

<TR NOSAVE>
<TD>
<BR>&nbsp;
<OL>
<LI>
Use CTRL-A to select the entire image.&nbsp; Copy it to a named buffer
(Shift-CTRL-C).&nbsp; We'll call it the "frame-outline" buffer.</LI>

<LI>
Unselect the image with SHIFT-CTRL-A.</LI>

<LI>
Invert it - the frame becomes white and the background black.</LI>

<LI>
Emboss the image, using a Depth of between 3 and 10.&nbsp; You can pick
whatever azimuth and elevation looks good to you.</LI>
</OL>
&nbsp;</TD>

<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/gimp-3.jpg" HEIGHT=321 WIDTH=304></TD>
</TR>

<TR NOSAVE>
<TD>
<OL>
<LI>
Use the curves filter to create the metallic affect.&nbsp; The figure at
right shows the settings I used.&nbsp; I only changed the "Value" levels,
which apply to all three of the Red, Green, and Blue channels at the same
amount.</LI>
</OL>
</TD>

<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/curves-settings.jpg" HEIGHT=408 WIDTH=302></TD>
</TR>

<TR NOSAVE>
<TD>
<OL>
<LI>
Add a layer mask to the image.&nbsp; At this point there should only be
one layer in the image.&nbsp; Click on the mask area in the Layers and
Channels dialog to make it the active layer.&nbsp; You will probably need
to add an alpha channel to the layer first.&nbsp; You can do that with
the Layers and Channels dialog layer menus (click the right mouse button
over the name of the layer to display the menu).</LI>

<LI>
Paste the "frame-outline" buffer into the mask. Anchor it to the mask.</LI>

<LI>
Invert the mask.&nbsp; It should be black with the frame outline in white
now.</LI>

<LI>
Apply the mask.</LI>
</OL>
</TD>

<TD ALIGN=CENTER NOSAVE><IMG SRC="./gx/hammel/gimp-4.jpg" HEIGHT=331 WIDTH=318></TD>
</TR>
</TABLE>
&nbsp;

<P>Thats it.&nbsp; You now have a metallic, or perhaps shiny plastic looking,
frame.&nbsp; I added a white background and a adrop shadow to make it stand
out a little more.&nbsp; You can use the curves filter again to add color
to the frame.&nbsp; The curves filter does some amazing effects if you
make the curves with drastic changes in direction (steep curves).

<P>One other hint:&nbsp; if you look at the edges of the the frame where
it is not straight, such as the right side along the curves, the frame
is sort of rough.&nbsp; This problem can be reduced using better settings
in the curves dialog box.&nbsp; Don't get confused - the problem I&nbsp;described
happens on <I>curves of the frame</I>, but the <I>curves dialog</I> is
just related to adjustments to colors in the image.&nbsp; The dialog isn't
related to non-straight lines.
<BR>&nbsp;
<TABLE WIDTH="100%" >
<TR>
<TD VALIGN=TOP COLSPAN="4" BGCOLOR="#000000" cellpadding="0" cellspacing="0"><IMG SRC="../gx/hammel/cleardot.gif" ALT="indent"  ALIGN=LEFT></TD>
</TR>
</TABLE>
&nbsp;
<TABLE WIDTH="100%" >
<TR>
<TD ALIGN=RIGHT><FONT SIZE=-2>&copy; 1997 by <A HREF="mailto:mjhammel@csn.net">Michael
J. Hammel</A>&nbsp;</FONT></TD>
</TR>
</TABLE>
&nbsp;
<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1>GNU/Linux Benchmarking - Practical Aspects</H1>

<H2>by 
<A HREF="mailto:andrewbalsa@usa.net">Andr&eacute; D. Balsa </A></H2>v0.4, 26 November 1997
</center>
<P><HR><P> 
<EM>This is the second article in a series of 4 articles on GNU/Linux Benchmarking, to be published by the Linux Gazette. The first article presented some basic benchmarking concepts and analyzed the Whetstone benchmark in more detail. The present article deals with practical issues in GNU/Linux benchmarking: what benchmarks already exist, where to find them, what they effectively measure and how to run them. And if you are not happy with the available benchmarks, some guidelines to write your own. Also, an application benchmark (Linux kernel 2.0.0 compilation) is analyzed in detail.</EM><HR>
<P>
<H2>1. <A HREF="./bench2.html#ss1">The DOs and DON'Ts of GNU/Linux benchmarking</A></H2>

<P>
<H2>2. <A HREF="./bench2.html#ss2">A roundup of benchmarks for Linux</A></H2>

<P>
<H2>3. <A HREF="./bench2.html#ss3">Devising or writing a new Linux benchmark</A></H2>

<P>
<H2>4. <A HREF="./bench2.html#ss4">An application benchmark: Linux 2.0.0 kernel compilation with gcc</A></H2>
<UL>
<LI><A HREF="./bench2.html#ss4.1">4.1 General benchmark features</A>
<LI><A HREF="./bench2.html#ss4.2">4.2 Benchmarking procedure</A>
<LI><A HREF="./bench2.html#ss4.3">4.3 Examining the results</A>
</UL>

<P>
<H2>5. <A HREF="./bench2.html#ss5">Next month</A></H2>

<P> <HR><P> 

<H2><A NAME="ss1">1. The DOs and DON'Ts of GNU/Linux benchmarking</A></H2>


<P>GNU/Linux is a great OS in terms of performance, and we can hope it will only get better over time. But that is a very vague statement: we need figures to prove it. What information can benchmarks effectively provide us with? What aspects of microcomputer performance can we measure under GNU/Linux?
<P>Kurt Fitzner reminded me of an old saying: <B></B><B><EM>"When performance is measured, performance increases."</EM></B>
<P>Let's list some general benchmarking rules (not necessarily in order of decreasing priority) that should be followed to obtain accurate and meaningful benchmarking data, resulting in real GNU/Linux performance gains:
<OL>
<LI>Use GPLed source code for the benchmarks, preferably easily available on the Net.</LI>
<LI>Use standard tools. Avoid benchmarking tools that have been optimized for a specific system/equipment/architecture.</LI>
<LI>Use Linux/Unix/Posix benchmarks. Mac, DOS and Windows benchmarks will not help much.</LI>
<LI>Don't quote your results to three decimal figures. A resolution of 0.1% is more than adequate. Precision of 1% is more than enough.</LI>
<LI>Report your results in standard format/metric/units/report forms.</LI>
<LI>Completely describe the configuration being tested.</LI>
<LI>Don't include irrelevant data.</LI>
<LI>If variance in results is significant, report alongside results; try to explain why this is so.</LI>
<LI>Comparative benchmarking is more informative. When doing comparative benchmarking, modify a single test variable at a time. Report results for each combination.</LI>
<LI>Decide beforehand what characteristic of a system you want to benchmark. Use the right tools to measure this characteristic.</LI>
<LI>Check your results. Repeat each benchmark once or twice before publicly reporting your results.</LI>
<LI>Don't set out to benchmark trying to prove that equipment A is better than equipment B; you may be in for a surprise...</LI>
<LI>Avoid benchmarking one-of-a-kind or proprietary equipment. This may be very interesting for experimental purposes, but the information resulting from such benchmarks is absolutely useless to other Linux users.</LI>
<LI>Share any meaningful information you may have come up with. If there is a lesson to be learned from the Linux style of development, it's that sharing information is paramount.</LI>
</OL>
<P> <HR><P> 
<H2><A NAME="ss2">2. A roundup of benchmarks for Linux</A></H2>


<P>These are some benchmarks I have collected over the Net. A few are Linux-specific, others are portable across a wide range of Unix-compatible systems, and some are even more generic.
<UL>
<LI><B>UnixBench</B>. A fundamental high-level Linux benchmark suite, Unixbench integrates CPU and file I/O tests, as well as system behaviour under various user loads. Originally written by staff members at BYTE magazine, it has been heavily modified by David C. Niemi.</LI>
<LI><B>BYTEmark</B> as modified by Uwe Mayer. A CPU benchmark suite, reporting CPU/cache/memory , integer and floating-point performance. Again, this test originated at BYTE magazine. Uwe did the port to Linux, and recently improved the reporting part of the test.</LI>
<LI><B>Xengine</B> by Kazuhiko Shutoh. This is a cute little X window tool/toy that basically reports on the speed with which a system will redraw a coloured bitmap on screen (a simulation of a four cycle engine). I like it because it is unpretentious while at the same time providing a useful measure of X server performance. It will also run at any resolution and pixel depth.</LI>
<LI><B>Whetstone</B>. A floating point benchmark by Harold Curnow.</LI>
<LI><B>Xbench</B> by Claus Gittinger. Xbench generates the famous xstone rating for Xserver performance comparisons.</LI>
<LI><B>XMark93</B>. Like xbench, this is a script that uses X11's x11perf and computes an index (in Xmarks). It was written a few years later than xbench and IMHO provides a better metric for X server performance.</LI>
<LI><B>Webstone 2.01</B>. An excellent tool for Web server performance testing. Although Webstone is copyight by Silicon Graphics, it's license allows free copying and examination of the source code.</LI>
<LI><B>Stream</B> by John D. McCalpin. This program is based on the concept of "machine balance" (sustainable memory bandwidth vs. FPU performance). This has been found to be a central bottleneck for computer architectures in scientific applications.</LI>
<LI><B>Cachebench</B> by Philip J. Mucci. By plotting memory access bandwidth vs. data size, this program will provide a wealth of benchmarking data on the memory subsystem (L1, L2 and main memory).</LI>
<LI><B>Bonnie</B> by Tim Bray. A high-level synthetic benchmark, bonnie is useful for file I/O throughput benchmarking.</LI>
<LI><B>Iozone</B> by Bill Norcott. Measures sequential file i/o throughput. The new 2.01 version supports raw devices and CD-ROM drives.</LI>
<LI><B>Netperf</B> is copyright Hewlett-Packard. This is a sophisticated tool for network performance analysis. Compared to ttcp and ping, it verges on overkill. Source code is freely available.</LI>
<LI><B>Ttcp</B>. A "classic" tool for network performance measurements, ttcp will measure the point-to-point <B>bandwidth</B> over a network connection.</LI>
<LI><B>Ping</B>. Another ubiquitous tool for network performance measurements, ping will measure the <B>latency</B> of a network connection.</LI>
<LI><B>Perlbench</B> by David Niemi. A small, portable benchmark written entirely in Perl.</LI>
<LI><B>Hdparm</B> by Mark Lord. Hdparm's -t and -T options can be used to measure disk-to-memory (disk reads) transfer rates. Hdparm allows setting various EIDE disk parameters and is very useful for EIDE driver tuning. Some commands can also be used with SCSI disks.</LI>
<LI><B>Dga</B> with b option. This is a small demo program for XFree's DGA extension, and I would never have looked at it were it not for Koen Gadeyne, who added the b command to dga. This command runs a small test of CPU/video memory bandwidth.</LI>
<LI><B>MDBNCH</B>. This is a large ANSI-standard FORTRAN 77 program used as an application benchmark, written by Furio Ercolessi. It accesses a large data set in a very irregular pattern, generating misses in both the L1 and L2 caches.</LI>
<LI><B>Doom</B> :-) Doom has a demo mode activated by running <CODE>doom -timedemo demo3</CODE>. Anton Ertl has setup a Web page listing results for various architectures/OS's.</LI>
</UL>
<P>All the benchmarks listed above are available by <B>ftp</B> or <B>http</B> from the 
<A HREF="http://www.tux.org/bench">Linux Benchmarking Project </A>server in the download directory: www.tux.org/pub/bench or from the Links page.

<P> <HR> <P> 
<H2><A NAME="ss3">3. Devising or writing a new Linux benchmark</A></H2>


<P>We have seen last month that (nearly) all benchmarks are based on either of two simple algorithms, or combinations/variations of these:
<OL>
<LI>Measuring the number of iterations of a given task executed over a fixed, predetermined time interval.</LI>
<LI>Measuring the time needed for the execution of a fixed, predetermined number of iterations of a given task.</LI>
</OL>

<P>We also saw that the Whetstone benchmark would use a combination of these two procedures to "calibrate" itself for optimum resolution, effectively providing a workaround for the low resolution timer available on PC type machines.
<P>Note that some newer benchmarks use new, exotic algorithms to estimate system performance, e.g. the Hint benchmark. I'll get back to Hint in a future article.
<P>Right now, let's see what algorithm 2 would look like:
<BLOCKQUOTE>
<EM>initialize loop_count</EM>
</BLOCKQUOTE>

<BLOCKQUOTE>
<EM>start_time = time()</EM>
</BLOCKQUOTE>

<BLOCKQUOTE>
<EM>repeat </EM>
</BLOCKQUOTE>

<BLOCKQUOTE>
<BLOCKQUOTE>
<EM>benchmark_kernel()</EM>
</BLOCKQUOTE>
</BLOCKQUOTE>

<BLOCKQUOTE>
<BLOCKQUOTE>
<EM>decrement loop_count</EM>
</BLOCKQUOTE>
</BLOCKQUOTE>

<BLOCKQUOTE>
<EM>until loop_count = 0</EM>
</BLOCKQUOTE>

<BLOCKQUOTE>
<EM>duration = time() - start_time</EM>
</BLOCKQUOTE>

<BLOCKQUOTE>
<EM>report_results()</EM>
</BLOCKQUOTE>

<P>Here, <EM>time()</EM> is a system library call which returns, for example, the elapsed wall-clock time since the last system boot. <EM>Benchmark_kernel()</EM> is obviously exercising the system feature or characteristic we are trying to measure.
<P>Even this trivial benchmarking algorithm makes some basic assumptions about the system being tested and will report totally erroneous results if some precautions are not taken:
<OL>
<LI>If the benchmark kernel executes so quickly that the looping instructions take a significant percentage of total loop processor clock cycles to execute, results will be skewed. Preferably, <EM>benchmark_kernel() </EM>should have a duration of &gt; 100 x duration of looping instructions.</LI>
<LI>Depending on system hardware, one will have to adjust <EM>loop_count</EM> so that total length duration &gt; 100 x clock resolution (for 1% bechmark precision) or 1000 x clock resolution (for 0.1% benchmark precision). On PC hardware, clock resolution is 10 ms.</LI>
<LI>We mentionned above that we used a straightforward wall-clock <EM>time()</EM> function. If the system load is high and our benchmark gets only 3% of the CPU time, we will get completely erroneous results! And of course on a multi-user, pre-emptive, multi-tasking OS like GNU/Linux, it's impossible to guarantee exclusive use of the CPU by our benchmark.</LI>
</OL>

<P>You can substitute the benchmark "kernel" with whatever computing task interests you more or comes closer to your specific benchmarking needs.
<P>Examples of such kernels would be:
<UL>
<LI>For FPU performance measurements: a sampling of FPU operations.</LI>
<LI>Various calculations using matrices and/or vectors.</LI>
<LI>Any test accessing a peripheral i.e. disk or serial i/o.</LI>
</UL>

<P>For good examples of actual C source code, see the UnixBench and Whetstone benchmark sources.

<P> <HR><P> 

<H2><A NAME="ss4">4. An application benchmark: Linux 2.0.0 kernel compilation with gcc</A></H2>


<P>The more one gets to use and know GNU/Linux, and the more often one compiles the Linux kernel. Very quickly it becomes a habit: as soon as a new kernel version comes out, we download the tar.gz source file and recompile it a few times, fine-tuning the new features.
<P>This is the main reason for proposing kernel compilation as an application benchmark: it is a very common task for all GNU/Linux users. Note that the application that is being directly tested is not the Linux kernel itself, it's <B>gcc</B>. I guess most GNU/Linux users use gcc everyday.
<P>The Linux kernel is being used here as a (large) standard data set. Since this is a large program (gcc) with a wide variety of instructions, processing a large data set (the Linux kernel) with a wide variety of data structures, we assume it will exercise a good subset of OS functions like file I/O, swapping, etc and a good subset of the hardware too: CPU, memory, caches, hard disk, hard disk controller/driver combination, PCI or ISA I/O bus. Obviously this is not a test for X server performance, even if you launch the compilation from an xterm window! And the FPU is not exercised either (but we already tested our FPU with Whetstone, didn't we?). Now, I have noticed that test results are almost independent of hard disk performance, at least on the various systems I had available. The <B>real bottleneck</B> for this test is CPU/cache performance.
<P>Why specify the Linux kernel version 2.0.0 as our standard data set? Because it is widely available, as most GNU/Linux users have an old CD-ROM distribution with the Linux kernel 2.0.0 source, and also because it in quite near in terms of size and structure to present-day kernels. So it's not exactly an out-of-anybody's-hat data set: it's a typical real-world data set.
<P>Why not let users compile <B>any</B> Linux 2.x kernel and report results? Because then we wouldn't be able to compare results anymore. Aha you say, but what about the different gcc and libc versions in the various systems being tested? Answer: they are part of your GNU/Linux system and so also get their performance measured by this benchmark, and this is exactly the behaviour we want from an application benchmark. Of course, gcc and libc versions must be reported, just like CPU type, hard disk, total RAM, etc (see the Linux Benchmarking Toolkit Report Form).
<H2><A NAME="ss4.1">4.1 General benchmark features</A></H2>


<P>Basically what goes on during a gcc kernel compilation (make zImage) is that: 
<OL>
<LI>Gcc is loaded in memory, </LI>
<LI>Gcc gets fed sequentially the various Linux kernel pieces that make up the kernel, and finally</LI>
<LI>The linker is called to create the zImage file (a compressed image file of the Linux kernel).</LI>
</OL>

<P>Step 2 is where most of the time is spent.
<P>This test is quite stable between different runs. It is also relatively insensitive to small loads (e.g. it can be run in an xterm window) and completes in less than 15 minutes on most recent machines.

<H2><A NAME="ss4.2">4.2 Benchmarking procedure</A></H2>


<H3>Getting the source.</H3>


<P>Do I really have to tell you where to get the kernel 2.0.0 source? OK, then: ftp://sunsite.unc.edu/pub/Linux/kernel/source/2.0.x or any of its mirrors, or any recent GNU/Linux CD-ROM set with a copy of sunsite.unc.edu. Download the 2.0.0 kernel, gunzip and untar under a test directory (<CODE>tar zxvf linux-2.0.tar.gz</CODE> will do the trick).
<H3>Compiling and running</H3>


<P>Cd to the linux directory you just created and type <CODE>make config</CODE>. Press &lt;Enter&gt; to answer all questions with their default value. Now type <CODE>make dep ; make clean ; sync ; time make zImage</CODE>. Depending on your machine, you can go and have lunch or just an expresso. You can't (yet) blink and be done with it, even on a 600 MHz Alpha. By the way, if you are going to run this test on an Alpha, you will have to cross-compile the kernel targetting the i386 architecture so that your results are comparable to the more ubiquitous x86 machines.

<H2><A NAME="ss4.3">4.3 Examining the results</A></H2>


<H3>Example 1 </H3>


<P>This is what I get on my test GNU/Linux box:
<P><CODE>186.90user 19.30system 3:40.75elapsed 93%CPU (0avgtext+0avgdata 0maxresident)k</CODE>
<P><CODE>0inputs+0outputs (147838major+170260minor)pagefaults 0swaps</CODE>
<P>The most important figure here is the total elapsed time: <B>3 min 41 s </B>(there is no need to report fractions of seconds).
<H3>Hardware setup description</H3>


<P>If you were to complain that the above benchmark is useless without a description of the machine being tested, you'd be 100% correct! So, here is the LBT Report Form for this machine:

<P>LINUX BENCHMARKING TOOLKIT REPORT FORM
<PRE>
CPU 
</PRE>

<PRE>
=== 
</PRE>

<PRE>
Vendor: AMD
</PRE>

<PRE>
Model: K6-200
</PRE>

<PRE>
Core clock:208 MHz (2.5 x 83MHz)
</PRE>

<PRE>
Motherboard vendor: ASUS
</PRE>

<PRE>
Mbd. model: P55T2P4
</PRE>

<PRE>
Mbd. chipset: Intel HX
</PRE>

<PRE>
Bus type: PCI
</PRE>

<PRE>
Bus clock: 41.5 MHz
</PRE>

<PRE>
Cache total: 512 Kb
</PRE>

<PRE>
Cache type/speed: Pipeline burst 6 ns
</PRE>

<PRE>
SMP (number of processors): 1
</PRE>

<PRE>
RAM 
</PRE>

<PRE>
=== 
</PRE>

<PRE>
Total: 32 MB
</PRE>

<PRE>
Type: EDO SIMMs
</PRE>

<PRE>
Speed: 60 ns
</PRE>

<PRE>
Disk 
</PRE>

<PRE>
==== 
</PRE>

<PRE>
Vendor: IBM
</PRE>

<PRE>
Model: IBM-DCAA-34430
</PRE>

<PRE>
Size: 4.3 GB
</PRE>

<PRE>
Interface: EIDE
</PRE>

<PRE>
Driver/Settings: Bus Master DMA mode 2
</PRE>

<PRE>
Video board 
</PRE>

<PRE>
=========== 
</PRE>

<PRE>
Vendor: Generic S3
</PRE>

<PRE>
Model: Trio64-V2
</PRE>

<PRE>
Bus: PCI
</PRE>

<PRE>
Video RAM type: 60 ns EDO DRAM 
</PRE>

<PRE>
Video RAM total: 2 MB
</PRE>

<PRE>
X server vendor: XFree86
</PRE>

<PRE>
X server version: 3.3
</PRE>

<PRE>
X server chipset choice: S3 accelerated 
</PRE>

<PRE>
Resolution/vert. refresh rate: 1152x864 @ 70 Hz
</PRE>

<PRE>
Color depth: 16 bits
</PRE>

<PRE>
Kernel 
</PRE>

<PRE>
====== 
</PRE>

<PRE>
Version: 2.0.29
</PRE>

<PRE>
Swap size: 64 MB
</PRE>

<PRE>
gcc 
</PRE>

<PRE>
=== 
</PRE>

<PRE>
Version: 2.7.2.1
</PRE>

<PRE>
Options: -O2
</PRE>

<PRE>
libc version: 5.4.23 
</PRE>

<PRE>
Test notes 
</PRE>

<PRE>
==========
</PRE>

<PRE>
Very light system load.
</PRE>

<PRE>
RESULTS 
</PRE>

<PRE>
======== 
</PRE>

<PRE>
Linux kernel 2.0.0 Compilation Time: 3 m 41 s
</PRE>

<PRE>
Whetstone Double Precision (FPU) INDEX: N/A
</PRE>

<PRE>
UnixBench 4.10 system INDEX: N/A
</PRE>

<PRE>
Xengine: N/A
</PRE>

<PRE>
BYTEmark integer INDEX: N/A
</PRE>

<PRE>
BYTEmark memory INDEX: N/A
</PRE>

<PRE>
Comments
</PRE>

<PRE>
========= 
</PRE>

<PRE>
Just tested kernel 2.0.0 compilation.
</PRE>

<H3>General comments</H3>


<P>Again, you will want to compare your results to those obtained on different machines/configurations. You will find some results on my Web site about 6x86s/Linux, in the 
<A HREF="http://www.tux.org/~balsa/linux/cyrix/p0c.html">November News </A>page.
<P>This of course is pure GNU/Linux benchmarking, unless you want to go ahead and try to cross compile the Linux kernel on a Windows95 box!? ;-)

<P> <HR><P> 
<H2><A NAME="ss5">5. Next month</A></H2>


<P>I expect that by next month you will have downloaded and tested a few benchmarks, or even started writing your own. So, in the next article: <EM>Collecting and Interpreting Linux Benchmarking Data</EM>
<UL>
<LI>Correct uses of Linux benchmarking data.</LI>
<LI>Architecture specific issues of Linux benchmarks.</LI>
<LI>Benchmarking Linux SMP systems.</LI>
<LI>Examples of more complex benchmarks: UnixBench and BYTEmark.</LI>
</UL>


<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Andr&eacute; D. Balsa <BR> 
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./gm.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./cftp.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->


<center><h1>Comfortable FTP</h1></center>

<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>

<p><hr><p>

<center><h3>Introduction</h3></center>

<p>There are quite a few FTP clients available for Linux these days.  Several
of them are X programs, but why incur the overhead of running an X FTP client?
Downloading a file is not a very interactive process.  Usually an FTP download 
is a process running in the background, which just needs to be checked every
now and then.

<p>On the other hand, using the basic command-line FTP program is not much fun
unless you enjoy typing complete pathnames and filenames.  A great improvement
is the classic ncurses-based client <b>NcFtp</b>, written by Mike Gleason.
This program has a well-designed bookmarking facility and supports the FTP
"reget" command, which allows resumption of interrupted
downloads. Unfortunately, file and directory names still must be typed in,
though NcFtp does support shell-like completion of filenames in both local and
remote directories.

<p>Recently I came across a new FTP client called <b>cftp</b>.  It is being
developed by Dieter Baron, and though it is still a relatively new program, it
has been working superbly for me.

<center><h3>About cftp</h3></center>

<p>Cfpt isn't a showy application.  It uses the termcap library, which allows
it to show a reverse-video modeline displaying the current host and directory,
as well as the number of bytes transferred.  Otherwise it resembles a <b>ls
-l</b> listing of files in the remote directory.  The default keybindings are
fairly intuitive: <b>d</b> downloads a file, <b>v</b> views a remote file
using your default pager, and the left and right arrow keys function like they
do in the <b>Lynx</b> text-mode web-browser: the left arrow-key takes you back
to the previous directory, and the right arrow-key descends into the
subdirectory under the cursor.  The other key-bindings (as well as user
options) can be viewed during a session by typing <kbd>:help</kbd>.  The colon
as a prefix to a command will be familiar to anyone who has used the <b>vi</b>
editor or one its clones.  <b>Vi</b> and <b>Emacs</b> motion-keys can also be
used instead of the arrow-keys.

<p>What impressed me was the quickness with which the program starts up and
makes the connection; before you know it a directory listing is displayed.
This is a small and efficient little program which nevertheless has convenient 
keyboard commands.  It's just the thing for making a quick check of an FTP
site, perhaps reading a few *.lsm or README files, then pressing <b>q</b>
which tells cftp to first log off, then quit.  Directory listings displayed
during a session are cached in memory, so returning to a previously-viewed
directory is near-instantaneous.

<p>Many FTP programs are in effect front-ends for the command-line FTP
utility, just as many mail clients use sendmail to do the actual
mail-handling. In contrast, cftp uses its own built-in FTP routines; this may
be one reason for its speed.  Instead of passing an FTP command through a GUI
layer before handing it to the actual FTP executable, cftp is talking directly
with the remote server.

<center><h3>Aliases and Configuration</h3></center>

<p>There are two files which cftp reads when starting up, <i>~/.cftprc</i> and 
<i>~/.netrc</i>.  The <i>~/.cftprc</i> file can contain personal changes to
default settings, such as keybindings.  Aliases for oft-visited sites can be
entered into this file as well.  The line<br>
<p><kbd>alias sun ftp://sunsite.unc.edu/pub/Linux/Incoming</kbd><br>
<p>enables quick access to the site by merely typing <kbd>cftp sun</kbd>.

<p>The <i>~/.netrc</i> file is used by the default FTP program, as well as the
FTP facilities provided by GNU Emacs' dired and XEmacs' EFS.  Cftp refers to
this file as well.  An entry like this:<br>

<p><kbd>default login anonymous password [your e-mail address]</kbd><br>

<p>will save typing login info for sites which allow anonymous access, and if
you access a site for which you have a username and password, lines like
these:<br> <pre><kbd>machine [hostname] login [login-id] password [password]
macdef init cd /[directory to change to]</kbd></pre><br> will speed up
accessing the site.

<center><h3>New Enhancements</h3></center>

<p>When I began this review version 0.7 was the latest version; since then
version 0.8 has been released, which contains several new features:

<ul>
  <li>In this version "putting" or uploading files to
      a remote site is supported.
  <li>Directory listings can now be sorted by date as well as by name.
  <li>A new option is a beep when a download is completed.  This is handy when 
      a session is running in the background or on another desk-top.
</ul>

<hr>
<center><h3>Conclusion</h3></center>

<p>As I write this <b>cftp-0.8.tar.gz</b> is the current version; the latest
release can be found at the cftp home
<a href="ftp://ftp.giga.or.at/pub/nih/cftp">FTP site</a>, or via the WWW at
<a href="http://ftp.giga.or.at/pub/nih/cftp">this site</a>.

<p>I enjoyed trying this small application and find myself using it often.
It's a small download and should compile easily if you have libtermcap
installed.  If you do try it, let <a href="mailto://dillo@giga.or.at">
Deiter Baron</a> know what you think of it. 


<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Larry Ayers<BR> 
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"

ALT="[ FRONT PAGE ]"></A>
<A HREF="./bench2.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./tkman.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center><h1>TkMan</h1></center>

<center>
<h4><a href="mailto: layers@marktwain.net">by Larry Ayers</a></h4>
</center>
<p><hr><p>

<center><h3>Introduction</h3></center>

<p>The traditional form of unix documentation is the manual-page system, which
uses the <b>man</b> command in conjunction with the <b>Groff</b> text
formatter to display manual pages (with your default pager) on a terminal
screen.  This system is rather long in the tooth, but is still in widespread
use because it both works well and doesn't require a windowing system.  The
man-page directory structure (with a directory corresponding to each directory
of executables) is pretty well standardized, ensuring that when new software
is installed the corresponding man-page(s) have a place waiting for them in
the hierarchy.

<p>For the past couple of years Thomas Phelps, of the University of California
at Berkeley, has been writing and rewriting a Tcl/Tk based man-page reader
called TkMan.  As John Ousterhout has released the successive versions of Tcl
and Tk TkMan has been updated to make use of the expanded capabilities of the
two toolkits.  Soon after the release of Tcl/Tk 8.0 this past August, TkMan
2.0 was released; it's a major release with several new features, thus this
review. 

<center><h3>Features and Capabilities</h3></center>

<p>TkMan is a super-charged reader which can access and search
your man-pages in a variety of useful ways, and then display them in a
nicely-formatted and very configurable fashion.  Here is a sampling of what
TkMan can do:

<ul>
  <li>Any man-page mentioned in another page serves as a hyper-text
      link, giving man-page reading something of the flavor of
      HTML browsing.
  <li>The section headers of a page can be collapsed into an outline, making
      it easy to get a feel for the contents and organization of the page.
  <li>Hyper-linked listings of each category of man-page (such as <b>User
      Commands</b> or <b>Games</b>), as well as a listing of new and recently
      added pages.
  <li>A listing of often-accessed pages can be created, and "virtual volumes"
      of pages can be set up, if you'd like to have several scattered pages
      accessible as a new volume or category.
  <li>Integration with the <i>apropos</i> and <i>whatis</i> commands.
  <li>There is an entry field in the main window which allows you to enter
      text-strings or regular expressions and search for them in the displayed 
      page.
  <li>If you have the <b>Glimpse</b> indexing and search facility installed,
      TkMan can use its services for powerful searches of man-page text.
  <li>If you are either bored or in the mood for a little aleatory learning,
      there is a menu-button which will cause a random man-page to be displayed.
  <li>When starting up, TkMan reports on any faults it finds in your man-page
      and man-path set-up.
  <li>Configurable display colors and fonts.
</ul>

<p>It is all too easy to end up with superfluous copies of man-pages on a
Linux system.  If your man-pages are gzipped, an upgrade to a new version of a 
program will install the new page, but the new one won't over-write the old
because the old one has the <i>.gz</i> suffix, and thus the filename is
different.  TkMan offers a means of keeping track of duplicate man-pages; wnen 
a page is displayed, the title of the page in the menu-bar will have drop-down 
entries showing the paths of any other pages with the same name.  Selecting
one of these will load the page, and if it's an older version or just an exact 
duplicate it can be deleted.  Here's a screenshot of a typical window:<br>

<p>

<img alt="TkMan Screenshot" src="./gx/ayers/tkman.gif">

<p>This screenshot shows a man-page in its "folded" state; the right-pointing
triangles are sections with hidden text.  A mouse-click will expand them.

<hr>
<center><h3>Installation</h3></center>

<p>The latest version of TkMan relies on Tcl8.0 and Tk8.0, so if you want to
try it out this may be a good time to upgrade.  Recent versions of Tcl/Tk
compile easily "out-of-the-box", so this shouldn't present too much of a
problem.  Unfortunately, especially if you've recently compiled and installed
the 8.0 versions (and deleted the source), TkMan needs one patch to be applied
to one of the Tk8.0 source files in order to function.  The Tk source then
needs to be recompiled.  Thomas Phelps attempted to convince the Tk developers
to include his patch in the distribution, but was unsuccessful.  The patch
adds outlining to the Tk text display functions.  I've run several other
applications which rely on Tk8.0 and the patch so far hasn't caused any
problems.

<p>TkMan also depends on the services provided by PolyglotMan (formerly Rman),
also written by Thomas Phelps.  PolyglotMan is a separate program which can
reverse-compile or translate man-pages from their native Nroff or Groff format
to a variety of other formats, such as HTML, SGML, LaTeX, TkMan's native
format, and the Perl pod format, among others. This should be compiled and
installed first, as the TkMan makefile needs to contain PolyglotMan's path.

<p>TkMan is entirely a Tcl/Tk program, so it doesn't need to be compiled.  The 
makefile instead rewrites several of the Tcl files, adapting them to your
system's paths, before copying them to (by default) /usr/local.  The makefile
is well-commented and easy to adapt to your system.

<center><h3>Availability</h3></center>

<p>The current versions of both TkMan and PolyglotMan can be downloaded from
the home <a href="ftp://ftp.cs.Berkeley.EDU/ucb/people/phelps/tcltk">site</a>.
<hr>

<center><h3>Observations</h3></center>

<p>TkMan isn't the sort of man-page reader you'd want to fire up just to check 
the syntax of a command, but if you're needing to refer to several man-pages
in a session it can be a great convenience.  A history of pages you have
viewed is stored as you work, and it can be accessed from a dynamically
updated drop-down menu.  The overview of all man-pages in a section can
be interesting, too.  It's easy to forget just how many of these pages there
are, and sometimes just seeing the title of a program or command in the
listing can spark curiousity.  It's easy to get in the habit of using
just a small subset of a command's capabilities; several times I've noticed a
page listed for a command I've used frequently but never thought to
investigate.  Even more times I've seen listings for programs I long ago
deleted!

<p>There are probably more features in TkMan than most people will ever use,
but this increases the odds that the one which suits you is included.  This
seems to be a very high-quality program, and it will run on just about any
flavor of unix out there.

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Larry Ayers<BR> 
Published in Issue 23 of <i>Linux Gazette</i>, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"

LT="[ FRONT PAGE ]"></A>
<A HREF="./cftp.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./flower/page1.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>

<P> <hr> <P> 

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H2>Processes on Linux and Windows NT</H2>
<H4>By Glen Flower, <a
href="mailto:glenf@eis.net.au">glenf@eis.net.au
</a></H4>
</center>
<P><HR><P>

<DIR>
<DIR><FONT SIZE=+3><A HREF="./flower/intro.html">Introduction</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/vmem.html">Virtual Memory</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/psimage.html">Process Image</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/groups.html">User and Group Privileges</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/multitask.html">Multitasking</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/multiproc.html">Multiprocessing</A></FONT></DIR>
</DIR>

<DIR>
<DIR><FONT SIZE=+3><A HREF="./flower/context.html">Process Context</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/threads.html">Threads</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/schedule.html">Scheduling</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/mutex.html">Mutual Exclusion and Synchronisation</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/timers.html">Timers</A></FONT></DIR>
</DIR>

<DIR>
<DIR><FONT SIZE=+3><A HREF="./flower/ipc.html">Communication Between Processes</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/linuxproc.html">A Closer Look at Processes on
the Linux Operating System</A></FONT>

<P><FONT SIZE=+3><A HREF="./flower/books.html">Bibliography</A></FONT>

<P>&nbsp;</DIR>
</DIR>

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Glen Flower <BR> 
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./tkman.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./shoham/drafth.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<CENTER>&nbsp;</CENTER>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Bibliography</B></FONT></FONT>
<DIR>
<DIR><FONT SIZE=+1>The Linux Kernel : David A Rusling, Linux Documentation
Project.</FONT>

<P><FONT SIZE=+1>Linux Programming Guide : Linux Documentation Project.</FONT>

<P><FONT SIZE=+1>Kernel Hacker's Guide : Linux Documentation Project.</FONT>

<P><FONT SIZE=+1>Pthreads posix threads html pages</FONT>

<P><FONT SIZE=+1>Inside Windows NT, Helen Custer, Microsoft Press.</FONT>

<P><FONT SIZE=+1>Readings on Microsoft Windows and WOSA, Microsoft Press.</FONT>

<P><FONT SIZE=+1>Programming Windows NT Unleashed: Hamilton, Williams.</FONT>

<P><FONT SIZE=+1>Operating Systems : William Stallings.</FONT>

<P><FONT SIZE=+1>The Magic Garden Explained : Goodheart, Cox.</FONT>

<P><FONT SIZE=+1>Windows NT Magazine : July 1997 : The NT Scheduler.</FONT>

<P><FONT SIZE=+1>Linux Journal : April 1997 : Threads Programming, Martin
McCarthy.</FONT>

<P><FONT SIZE=+1>Linux man pages for : ps, vmstat, fuser, kill, procinfo,
procmeter, free, readprofile, profil, nice, renice, pstree, top.</FONT>

<P><FONT SIZE=+1>Linux source code.</FONT>

<P><FONT SIZE=+1>Lecture notes for 85349 Operating Systems : David Jones
/ Steve Smith, CQU</FONT>
<DIR>
<DIR>

<P><FONT SIZE=+1>&nbsp;</FONT></DIR>
</DIR>

<DIV ALIGN=right><FONT SIZE=-1>&nbsp;</FONT><A HREF="./flower/linuxproc.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
</DIR>
</DIR>

&nbsp;<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Process
Context</B></FONT></FONT>

<P><FONT SIZE=+1>&nbsp;Each time a process is removed from access to the
processor, sufficient information on its current operating state must be
stored such that when it is again scheduled to run on the processor it
can resume its operation from an identical position. This operational state
data is known as its <I>context</I> and the act of removing the process's
thread of execution from the processor (and replacing it with another)
is known as a <I>process switch </I>or<I> context switch.</I></FONT>

<P><FONT SIZE=+1><I>&nbsp;</I>The distinction is made here between the
condition where a process is removed from the processor completely and
is replaced by another process (a process switch) and the case where the
process state is stored while execution is interrupted temporarily (a context
switch). Note that a process switch performs a superset of the operations
required for the context switch. The latter case may be when an external
interrupt is serviced or when a system call necessitates a switch from
user mode to system mode. In the case of the process switch much more information
must be saved in order to later restore the process context than in the
second case where the process remains resident in memory while it's thread
of execution is interrupted.</FONT>

<P><FONT SIZE=+1>&nbsp;The context of a process includes its address space,
stack space, virtual address space, register set image (e.g. Program Counter
(PC), Stack Pointer (SP), Instruction Register (IR), Program Status Word
(PSW) and other general processor registers), updating profiling or accounting
information, making a snapshot image of its associated kernel data structures
and updating the current state of the process (waiting, ready, etc).</FONT>

<P><FONT SIZE=+1>&nbsp;This state information is saved in the process's
process control block which is then moved to the appropriate scheduling
queue. The new process is moved to the CPU by copying the PCB info into
the appropriate locations (e.g. the program counter is loaded with the
address of the next instruction to execute).</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Each process's context is described by a <I>task_struct
</I>structure. The task_struct holds data such as the scheduling policy,
scheduler priority, real time priority, processor allowed time counter,
processor registers, file handles (files_struct), virtual memory (mm_struct).&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>The kernel maintains a view of a process or thread known
as a kernel process object or kernel thread object respectively. These
contain just the information the kernel needs to effectively switch between
processes or threads.</FONT></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>&nbsp;When a process switch is made the scheduler saves
the process's task_struct and replaces the current tasks pointer with a
pointer to the new process's task_struct, restoring its memory access and
register context. This may be assisted by hardware.</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>&nbsp;The kernel makes a context switch by pushing context
information onto the current kernel mode stack, for a process it also saves
the address of it's page table directory so that it's address space is
maintained.&nbsp;</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;
<DIV ALIGN=right><A HREF="./flower/multiproc.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/threads.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>

<FONT COLOR="#3366FF"><FONT SIZE=+3><B>User
and Group Privileges</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>

<P><FONT SIZE=+1>&nbsp;Each process has some form of associated Process
Identifier, (PID) through which it may be manipulated. The process also
carries the User Identifier (UID) of the person who initiated the process
and will also have group identifier (GID).</FONT>

<P><FONT SIZE=+1>&nbsp;The UID is used to decide privilege to perform operations
on resources such as files. Processes will normally belong to one or more
process groups. A group identifier (GID) is used by the kernel to identify
privileges allocated to a group of users and hence their created processes.
Groups allow subsets of the available privileged operations (such as granting
of access to files, printers, ability to create directories) to be restricted
to members of a particular group only, with non members of the group being
excluded from performing those operations.</FONT>

<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows
NT</FONT></FONT></B></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>On a Unix derivative system such
as Linux the PID, UID and GID identifiers equate to simple integers which
are associated with processors as part of their Process Control Block.</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>A process handle is used for the
process identifier. A process handle is a special case of an Object handle,
where object handles may reference files, devices and processes.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>On Unix processes maintain a parent-child
relationship where the process that initiates a sub process becomes a parent
to it?s child via a fork and optional exec operation to first clone the
parent process and then replace it with a new executable process image.
Due to this relationship it is possible to terminate all child processes
by sending a KILL signal to the parent. All of the processes in the system
are accessed via a doubly linked list whose root is the init process?s
task_struct data structure.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>Windows NT processes do not maintain
a parent-child relationship. Instead a process maintains an Object table
to hold handles of other processes.&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>When a new process is created it inherits all object handles
from its creator that were previously marked with the inheritance attribute.&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>Access to resources is decided
as a result of the combination of resource defined permissions and a combination
of the UID, GID (or effective UID and GID) under which a process is running.
The owner of a resource or the administrator may grant access to a user
or group of users.</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>The NT Object Manager attaches
an <I>access token</I> to a process which is checked against a resource's
permissions to decide what granted access rights the process is allowed.
The owner of a resource or the administrator may grant access permissions
to a user or group of users.</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>Example : a Linux device may be allocated the bitmask
permissions of <FONT FACE="Courier">crwxr-x---</FONT>, may be owned by
the root user (UID=0) and be allocated to the <FONT FACE="Courier">admin</FONT>
group. The allocated permissions of the device indicate that a process
operating for the root user will have read, write and execute permissions
on the device. A process operating with an effective GID of the admin group
will have read and execute permissions, with other users being prevented
from carrying out any operations on the device.</FONT>
<DIV ALIGN=right><A HREF="./flower/psimage.html"><IMG
SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/multitask.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
&nbsp;
<BR><B><FONT COLOR="#3366FF"><FONT SIZE=+2>Introduction to Processes</FONT></FONT></B>

<P><FONT SIZE=+1>When a developer writes, compiles and links a programme
it may be stored on a computer disk as a file in the disk file system.
This file is created in a predefined format that the operating system or
operating system shell will recognise as an executable programme.</FONT>

<P><FONT SIZE=+1>&nbsp;When a programme is run it is instantiated in memory,
taking up system resources such as memory for data structures, file descriptors
and providing at least one thread of execution which defines the current
state and subsequent required operations for the process. The current executing
program, or process, has total use of the microprocessor while in it's
run state. A process will use files within the filesystems and may access
the physical devices in the system either directly or indirectly.</FONT>

<P><FONT SIZE=+1>&nbsp;A process may operate in one of two modes which
are known as 'user' mode and 'system' mode (or kernel mode). A single process
may switch between the two modes, i.e. they may be different phases of
the same process. Processes defaulting to user mode include most application
processes, these are executed within an isolated environment provided by
the operating system such that multiple processes running on the same machine
cannot interfere with each other's resources. A user processs switches
to kernel mode when it makes a system call, generates an exception (fault)
or when an interrupt occurs (e.g. system clock). At this point the kernel
is executing on behalf of the process. At any one time during its execution
a process runs in the context of itself and the kernel runs in the context
of the currently running process. This is shown in Figure 1.</FONT>
<CENTER><IMG SRC="./gx/flower/process.gif" ALT="Logical view of a Linux process" HEIGHT=336 WIDTH=448></CENTER>


<P><FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>Processes operating in kernel mode are privileged and
are granted access to all computer resources (such as all available memory)
free of the restrictions applied to user mode processes. The distinction
between a process in either user or kernel mode may be supported by the
hardware which serves to enforce the privilege rule and so protect the
computer system from undue damage or failure due to ill behaved user processes.</FONT>

<P><FONT SIZE=+1>&nbsp;Though the basic concepts are similar, different
operating systems implement process management in different ways.</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows
NT</FONT></FONT></B></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>On the Linux operating system
privileged services are largely implemented by a single monolithic kernel.
The kernel provides the central services required to support the successful
operation of the computer.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>The Linux kernel can also have a number of loadable modules
which may serve to supplement its central functions e.g. by the addition
of a new file system. As the kernel carries out a number of responsibilities
within a single entity it is commonly known as a macrokernel architecture.</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1>The Windows NT operating system
is based on a derivative of a layered operating system (such as VAX VMS)
and a true client/server operating (such as Mach) microkernel architecture,
where the central kernel process carries out only the most basic tasks
in the most efficient manner possible.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;Associated with the microkernel are a number of
privileged processes collectively known as the Executive which operate
in their own separate process subsystems. These includes (amongst others)
a dedicated Process Manager, Object Manager and Virtual Memory manager
to provide specialised services as required to support the establishment
of processes and their resources.</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>The operating system itself will execute largely in kernel
mode. User mode processes will often need access to services which can
only be accessed by privileged code operating in kernel mode. In this case
they call a system function which causes a hardware 'trap' to occur, causing
a context switch to system mode where the required operation can be carried
out in a controlled manner by 'trusted' operating system functions before
context switching back again to user mode.</FONT>

<P><FONT SIZE=+1>&nbsp;Every user process runs in its own address space
(typically 3Gbytes on a 32 bit processor) isolated from the address space
of other active processes. From the point of view of the individual process
it also has complete access to the processor(s) of the machine on which
it is running i.e. it has it's own <I>virtual machine</I> on which it runs,
under the control of the operating system but independent from other processes.</FONT>
<BR>&nbsp;
<CENTER>&nbsp;</CENTER>

<DIV ALIGN=right><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/vmem.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;

<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Communication Between Processes</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>

<P><FONT SIZE=+1>&nbsp;Processes operate within their own virtual address
space and are protected by the operating system from interference by other
processes. By default a user process cannot communicate with another process
unless it makes use of secure, kernel managed mechanisms. There are many
times when processes will need to share common resources or synchronise
their actions. One possibility is to use threads, which by definition can
share memory within a process. This option is not always possible (or wise)
due to the many disadvantages which can be experienced with threads. Methods
of passing messages or data between processes are therefore required.</FONT>

<P><FONT SIZE=+1>&nbsp;<B><FONT COLOR="#FF0000">Linux</FONT></B> supports
the following methods of communication. System V IPC refers to the version
of Unix in which the concepts noted below were first introduced.</FONT>
<BR>&nbsp;
<TABLE BORDER CELLPADDING=7 WIDTH="510" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="20%">
<DIR><FONT SIZE=+1>Signals</FONT></DIR>
</TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Signals are used to signal asynchronous
events between processes. A process may implement a signal handler to carry
out required when an event occurs or may use the system default actions.
Most signals can be ignored or blocked, though the KILL signal cannot be
ignored and will result in a non clean process exit.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%">
<DIR><FONT FACE="Courier New"><FONT SIZE=+1>UNIX pipes</FONT></FONT></DIR>
</TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A pipe connects the standard output
of one process to the standard input of another. They provide a method
of one-way communication between processes in a parent-child relationship
and for this reason may be called half duplex pipes.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Named Pipes (FIFOs)</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Named pipes appear similar to
regular pipes but are implemented as device special First In-First Out
(FIFO) files in the file system. It is not necessary for processes to maintain
a parent-child relationship for them to communicate via named pipes. Named
pipes are persistent and may be reused after their initial setup.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>System V IPC Message Queues</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Message queues consist of a linked
list within the kernel's addressing space. Messages are added to the queue
sequentially and may be retrieved from the queue in several different ways.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>System V IPC Semaphores</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Semaphores are counters used to
control access to shared resources by multiple processes. They are most
often used as a locking mechanism to prevent processes from accessing a
particular resource while another process is performing operations on it.
Semaphores are implemented as sets, though a set may have a single member.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>System V IPC Shared Memory</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Shared memory is a mapping of
an area of memory into the address space of more than one process. This
is the fastest form of IPC as processes do not subsequently need access
to kernel services in order to share data.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Full-duplex pipes (STREAMS)</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>STREAMS were introduced by AT&amp;T
and are used for character based I/O within the kernel and between it?s
associated device drivers as a full duplex transfer path between processes.
Internally pipes may be implemented as STREAMS.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Remote Procedure Call (RPC)</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A network inter-process connection
protocol based on Sun Microsystems' RPC standard.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Networking sockets (Berkeley style)</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Sockets allow local or network
connection between processes. Socket names are implemented within a domain.
In the UNIX domain a socket is given a path name within the file system.
Other processes may use that name to communicate.</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>
<BR><FONT SIZE=+1><B><FONT COLOR="#FF0000">Windows NT</FONT></B> inter-process
communication and synchronisation facilities include the following :</FONT>
<BR>&nbsp;
<TABLE BORDER CELLPADDING=7 WIDTH="510" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Events or Event Pairs</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Event handles may be inherited,
passed on creation or duplicated for a process. Event handles may optionally
have names and are signalled using the SetEvent call.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier New"><FONT SIZE=+1>Anonymous
Pipes</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Used primarily for communication
between related processes. Anonymous pipes cannot be used over a network.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier New"><FONT SIZE=+1>Named
Pipes (FIFOs)</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Named pipes are similar to anonymous
pipes but may be referenced by name rather than handle, may be used over
a network and can use asynchronous, overlapped I/O.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Semaphores</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>Like Linux, Windows NT semaphore
objects are implemented as counters which act as guardians over a section
of code or resource.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Shared Memory</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A <I>section </I>object is a Win32
subsystem object which is made available as a<I> file mapping object </I>which
two or more processes may share. One thread creates the section object
and other threads obtain handles to it.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Remote Procedure Calls (RPCs)</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>An implementation of the Distributed
Computing Environment (DCE) standard for calling processes over a network.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT SIZE=+1>Local Procedure Calls (LPCs)</FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>A facility similar in usage to
RPC but in fact being a cut down version that can act only on a local computer
to perform efficient message passing between client/server processes using
kernel provided mechanisms. There are three basic choices :</FONT>&nbsp;
<OL TYPE="i">
<LI>
<FONT SIZE=+1>Messages may be passed into a server port objects message
queue - used for small messages.</FONT></LI>

<LI>
<FONT SIZE=+1>Messages are passed via a shared memory object.</FONT></LI>

<LI>
<FONT SIZE=+1>Quick LPC is used by portions of the Win32 subsystem to achieve
minimum overhead and maximum speed.</FONT></LI>
</OL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier New"><FONT SIZE=+1>STREAMS</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="80%"><FONT SIZE=+1>An implementation of the Unix
System V driver environment used in networking.</FONT></TD>
</TR>
</TABLE>
&nbsp;

<P>&nbsp;
<DIV ALIGN=right><FONT SIZE=-1>&nbsp;</FONT><A HREF="./flower/timers.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/linuxproc.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>

&nbsp;
<BR><FONT COLOR="#3366FF"><FONT SIZE=+3><B>A Closer Look at Processes on
the Linux Operating System</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>

<P><FONT SIZE=+1>&nbsp;On Linux there are a number of utilities which allow
the System Administrator to examine the status of processes and to adjust
their relative priorities or change their operational status. Some of these
capabilities can be demonstrated by examining one programme available for
the Linux OS : the Apache httpd daemon : a freely available web server.
In the following prints of screen outputs some columns have been ommitted
where they do not affect the demonstration being given.</FONT>

<P><FONT SIZE=+1>&nbsp;From the following it can be seen that the size
of the http daemon is 142699 bytes on the disk. Within the ELF file there
are 108786 bytes of code, 4796 bytes of initialised data and 19015 bytes
of uninitialiased data.</FONT>

<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
ls -l httpd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;-rwxr-x--- 1 root root 142699
Oct 5 1996 httpd*</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
size httpd</FONT></FONT>
<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="451" >
<TR>
<TD VALIGN=TOP WIDTH="16%"><FONT FACE="Courier"><FONT SIZE=+1>text</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>Data</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>bss</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="17%"><FONT FACE="Courier"><FONT SIZE=+1>dec</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>hex</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="23%"><FONT FACE="Courier"><FONT SIZE=+1>filename</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="16%"><FONT FACE="Courier"><FONT SIZE=+1>108786&nbsp;</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>4796&nbsp;</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>19015&nbsp;</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="17%"><FONT FACE="Courier"><FONT SIZE=+1>132597&nbsp;</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="15%"><FONT FACE="Courier"><FONT SIZE=+1>205f5&nbsp;</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="23%"><FONT FACE="Courier"><FONT SIZE=+1>httpd</FONT></FONT></TD>
</TR>
</TABLE></CENTER>
<FONT SIZE=+1>Performing an object dump of the file shows that the code
section is offset within the file and starts at hexadecimal address 0x1ce0,
read only data starts at 0x16238, other data at 0x1a9e8 and uninitialised
data at 0x1bcb0. There is a table of debugging symbols at 0x1bcb0 :</FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
objdump --headers httpd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>httpd: file format elf32-i386</FONT></FONT>

<P><FONT SIZE=+1><FONT FACE="Courier">&nbsp;Sections: </FONT>&lt; Some
sections excluded for clarity ></FONT>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>Idx Name Size VMA LMA File off
Algn</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>0 .interp 00000013 080000d0 080000d0
000000d4 2**0</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, READONLY,
DATA</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>8 .text 00014544 08001ce0 08001ce0
00001ce0 2**4</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, READONLY,
CODE</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>10 .rodata 000047ac 08016238 08016238
00016238 2**2</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, READONLY,
DATA</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>11 .data 00001050 0801b9e8 0801b9e8
0001a9e8 2**2</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, ALLOC, LOAD, DATA</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>16 .bss 00004a47 0801ccb0 0801ccb0
0001bcb0 2**4</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>ALLOC</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>17 .stab 000004f8 00000000 00000000
0001bcb0 2**2</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>CONTENTS, READONLY, DEBUGGING</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT></DIR>
</DIR>
<FONT SIZE=+1>The http daemon utilises functions from the standard 'C'
library, linked as a dynamic linked library (the 'so' stands for 'shared
object') :</FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
ldd -r httpd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp; libc.so.5 => /usr/local/lib/libc.so.5
(0x4000a0)</FONT></FONT>

<P><FONT SIZE=+1>The daemon is started at system boot time and was sleeping
(S) when its status was checked, it is consuming very little CPU time :</FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;<FONT COLOR="#0000FF">orion-1:#</FONT>
ps -fc | grep httpd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;PID TTY STAT TIME COMMAND</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>90 ? S 0:00 httpd</FONT></FONT>

<P><FONT SIZE=+1>&nbsp;A printout of the tree of all processes running
on the computer and their interrelationships shows that the httpd has <FONT FACE="Courier">init</FONT>
as its parent process, this is typical of a Unix daemon process. It has
also created three child processes which it now controls, presumably to
listen for http connections.</FONT>

<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
pstree</FONT></FONT>
<DIR>
<DIR>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;init-+-4*[agetty]</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-bash--script--script--bash--script--script--bash--pstree</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-bash</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-crond</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-gpm</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-httpd--3*[httpd]</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-inetd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-kflushd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-klogd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-kswapd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-lpd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-rpc.mountd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-rpc.nfsd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-rpc.portmap</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-sendmail</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>|-syslogd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>`-update</FONT></FONT>

<P><FONT SIZE=+1>&nbsp;</FONT></DIR>
</DIR>
</DIR>
</DIR>
<FONT SIZE=+1>This is confirmed by examining a few of the processes running
in more detail. The <FONT FACE="Courier">init</FONT> process has a Process
ID (PID) of 1. It can be seen that the parent PID of the httpd is 1 as
expected.</FONT>

<P><FONT SIZE=+1>&nbsp;It can be seen that the resident memory footprint
(Resident Set Size (RSS)) of the httpd process is 528 kilobytes whereas
its overall size in virtual memory is 1012 Mb. It can be seen that the
process runs with a User ID of 0 (owned by the administrator (root)) and
that it is running at the default priority of 0 (-20 being maximum real-time
and 20 being the lowest priority). The SW&lt; status for the kernel swap
daemon (kswapd) process shows that it is sleeping, has no resident pages
and has a priority less than 0.</FONT>

<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
ps -cl1,2,3,90</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;F UID PID PPID PRI NI SIZE
RSS WCHAN STAT TTY TIME COMMAND</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>100 0 1 0 0 0 844 328 c01115c9 S
? 0:03 init [5]</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>40 0 2 1 0 0 0 0 c0111a38 SW ? 0:00
(kflushd)</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>40 0 3 1 -12 -12 0 0 c0111a38 SW&lt;
? 0:00 (kswapd)</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>140 0 90 1 0 0 1012 528 c0119272
S ? 0:00 httpd</FONT></FONT>

<P><FONT SIZE=+1>&nbsp;Looking at the virtual memory performances of the
process it can be seen that the httpd has had 23 major page faults where
a page fault represents an action to load a page of text from disk or buffer
cache. The text (code) resident set size (TRS) is 24 kilobytes which suggests
a code page size of 1024 bytes when viewed in association with the page
fault number. The Data Resident Size is 108 kilobytes, giving a total SIZE
of 132 kilobytes. The process shares 115 kilobytes with other processes
(this may represent the standard 'C' shared library).</FONT>

<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
ps -cmp1,2,3,90</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="500" >
<TR>
<TD VALIGN=TOP WIDTH="8%"><FONT SIZE=+1>PID</FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>MAJFLT</FONT></TD>

<TD VALIGN=TOP WIDTH="8%"><FONT SIZE=+1>MINFLT</FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>TRS</FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>DRS</FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>SIZE</FONT></TD>

<TD VALIGN=TOP WIDTH="11%"><FONT SIZE=+1>SWAP</FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT SIZE=+1>RSS</FONT></TD>

<TD VALIGN=TOP WIDTH="11%"><FONT SIZE=+1>SHRD</FONT></TD>

<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>COMMAND</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>2</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>kflushd</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>3</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>kswapd</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>1</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>206</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>49</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>5</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>77</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>82</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>82</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>65</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>init&nbsp;</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>90</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>23</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT SIZE=+1>51</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>24</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>108</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>132</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>0</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT SIZE=+1>132</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="11%">
<CENTER><FONT SIZE=+1>115</FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="17%"><FONT SIZE=+1>httpd&nbsp;</FONT></TD>
</TR>
</TABLE>
<FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>

<P><FONT SIZE=+1>The system administrator can re-prioritise the httpd process
by changing it's NICE level. Here the priority of process 90 (httpd) is
made higher by 10. Only the administrator can change priorities in a negative
direction as shown. This prevents inexperienced users from overloading
the CPU and also protects the system from hackers.</FONT>

<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
renice -10 90</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;90: old priority 0, new priority
-10</FONT></FONT>

<P><FONT SIZE=+1>&nbsp;The new priority level can now be seen, although
on this system the httpd is idle, receiving no web access requests so it
would not consume much more CPU.</FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1><FONT COLOR="#0000FF">orion-1:#</FONT>
ps -cl</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="470" >
<TR>
<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>UID</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>PID</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>PRI</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>PPID</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>NI</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>SIZE</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>RSS</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>STAT</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>TIME</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>COMMAND</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>844</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>328</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>S</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:03</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>init [5]</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>SW</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:00</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>(kflushd)</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>3</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-12</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-12</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>SW&lt;</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:00</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>(kswapd)</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>90</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-10</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>-10</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="10%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>1012</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>528</FONT></FONT></DIV>
</TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>S &lt;</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="10%"><FONT FACE="Courier"><FONT SIZE=+1>0:00</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="20%"><FONT FACE="Courier"><FONT SIZE=+1>httpd</FONT></FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>The system is now loaded somewhat by running some CPU
intensive shell scripts. The virtual memory statistics of the computer
are examined every 5 seconds for five iterations.</FONT>

<P><FONT SIZE=+1>&nbsp;The procs field shows that on average 2 processes
are waiting for CPU run time (r) and on iteration 3 two processes are in
uninterruptable sleep. There is no swapping activity going on as the processes
are small enough to be fully resident in memory.</FONT>

<P><FONT SIZE=+1>&nbsp;There is however I/O activity as blocks of data
are brought in (bi) and sent out (bo) to I/O devices. The 'system' fields
show that many interrupts are occurring per second (in) as well as many
context switches (cs). The first iteration gives the average history since
the last system reboot, whereas the subsequent four readings are for time
now. It can be seen that the CPU is never idle (id) and is spending around
35% of its time in user mode and 65% of its time performing privileged
operations in system mode.</FONT>

<P><FONT SIZE=+1>&nbsp;This report is consistent with the known operations
being performed : I/O intensive disk reads : the Linux 'find' command searching
the disk.</FONT>

<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
vmstat 5 5</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="536" >
<TR>
<TD VALIGN=TOP COLSPAN="3" WIDTH="10%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>procs</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="4" WIDTH="24%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>memory</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="3" WIDTH="13%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>swap</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="3" WIDTH="12%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>io</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="3" WIDTH="20%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>system</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="3" WIDTH="22%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>cpu</FONT></FONT></CENTER>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="3%"><FONT FACE="Courier"><FONT SIZE=+1>r</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT FACE="Courier"><FONT SIZE=+1>b</FONT></FONT></TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>w</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT FACE="Courier"><FONT SIZE=+1>swpd</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT FACE="Courier"><FONT SIZE=+1>free</FONT></FONT></TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="6%"><FONT FACE="Courier"><FONT SIZE=+1>buf</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>si</FONT></FONT></TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>so</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>bi</FONT></FONT></TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>bo</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="9%"><FONT FACE="Courier"><FONT SIZE=+1>in</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="8%"><FONT FACE="Courier"><FONT SIZE=+1>cs</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>us</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>sy</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="7%"><FONT FACE="Courier"><FONT SIZE=+1>id</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>10</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>8</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>133</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>34</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>6</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>8</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>86</FONT></FONT></CENTER>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>614</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>11</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>737</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1234</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>32</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>68</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>1</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>100</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%"><FONT FACE="Courier"><FONT SIZE=+1>129</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>435</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>366</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>40</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>60</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>202</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>26</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>375</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>455</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>33</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>67</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="3%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>2</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="6%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>230</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP COLSPAN="2" WIDTH="5%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="9%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>331</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="8%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>472</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>31</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>69</FONT></FONT></CENTER>
</TD>

<TD VALIGN=TOP WIDTH="7%">
<CENTER><FONT FACE="Courier"><FONT SIZE=+1>0</FONT></FONT></CENTER>
</TD>
</TR>
</TABLE>
<FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>

<P><FONT SIZE=+1>&nbsp;It is possible to probe the Linux kernel and find
which operations are consuming the most CPU load. When this is done it
is seen that the kernel is spending most of it's time dealing with the
directory cache, file system and writing to the console. The system scheduling
process is only the twentieth most active process on the list.</FONT>

<P><FONT SIZE=+1>&nbsp;To be able to read the profiling information from
the kernel it must first be compiled with profiling enabled.</FONT>

<P><FONT SIZE=+1>&nbsp;<FONT FACE="Courier"><FONT COLOR="#0000FF">orion-1:#</FONT>
readprofile | sort -nr | head -20</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="415" >
<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>CLK_TCK</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>Function</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%"><FONT FACE="Courier"><FONT SIZE=+1>Normalised
load</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>67649</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>total</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0.0858</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>7796</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>d_lookup</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>54.1389</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>5425</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>ext2_readdir</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>3.5319</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>5034</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>scrup</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>7.8168</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>4573</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>filldir</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>14.8474</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>4481</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>find_inode</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>86.1731</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>2849</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>ext2_check_dir_entry</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>15.8278</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>2581</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>getname</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>7.9660</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1885</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>getblk</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>2.2440</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1665</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>sys_newlstat</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>6.8238</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1546</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>lookup_dentry</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>5.1533</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1542</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>do_con_write</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>0.3119</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1425</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>get_hash_table</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>9.6284</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1422</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>cp_new_stat</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>4.5577</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1323</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>__namei</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>10.3359</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1270</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>system_call</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>19.8438</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1231</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>ext2_getblk</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>2.2140</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1084</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>raw_scan_sector</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>1.8951</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>1077</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>sys_getdents</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>3.0597</FONT></FONT></DIV>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="35%"><FONT FACE="Courier"><FONT SIZE=+1>973</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="33%"><FONT FACE="Courier"><FONT SIZE=+1>schedule</FONT></FONT></TD>

<TD VALIGN=TOP WIDTH="32%">
<DIV ALIGN=right><FONT FACE="Courier"><FONT SIZE=+1>1.2102</FONT></FONT></DIV>
</TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>The Linux 'ps' command takes its information from the
/proc virtual-file system (VFS) which is a disk image of the process structures
as controlled by the kernel. Note that the VFS is a direct mirror of the
kernel data structures and does not actually reside on disk, although it
appears to do so when acessed with normal Linux commands.</FONT>

<P><FONT SIZE=+1>Looking directly at the httpd process in the /proc file
system, all of the information given by the administrative tools can be
obtained, though often in a less user friendly format. The following is
a direct dump of the httpd <FONT FACE="Courier">status</FONT> table, with
comments added for explanation :</FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1><FONT COLOR="#0000FF">orion-1:#</FONT>
cat /proc/90/status</FONT></FONT>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>Name: httpd</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>State: S (sleeping)</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>Pid: 90 # Process ID</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>PPid: 1 # Parent Process (init)</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>Uid: 0 0 0 0 # User ID (root)</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>Gid: 65535 65535 65535 65535 # Group
ID</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>VmSize: 1012 kB # Total virtual memory</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>VmLck: 0 kB # Total locked</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>VmRSS: 512 kB # Text Resident Set
Size</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>VmData: 276 kB # Virtual Memory Data
size</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>VmStk: 20 kB # Stack size</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>VmExe: 108 kB # Executable</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>VmLib: 576 kB # Library</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>SigPnd: 00000000 # Signals pending</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>SigBlk: 00000000 # Signals blocked</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>SigIgn: 80000000 # Signals ignored</FONT></FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1>SigCgt: 00006441 # Signals caught</FONT></FONT></DIR>
</DIR>
<FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>The following are all the signals recognised by the Linux
operating system, they are enumerated starting at zero (i.e. SIGHUP is
0, SIGKILL is 9, etc) :</FONT>

<P><FONT FACE="Courier"><FONT SIZE=+1><FONT COLOR="#0000FF">orion-1:#</FONT>
fuser -l</FONT></FONT>
<DIR>
<DIR><FONT FACE="Courier"><FONT SIZE=+1>HUP INT QUIT ILL TRAP ABRT IOT
BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN
TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR UNUSED</FONT></FONT><FONT FACE="Courier"><FONT SIZE=+1></FONT></FONT>
<DIV ALIGN=right><A HREF="./flower/ipc.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/books.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
<FONT FACE="Courier"><FONT SIZE=+1></FONT></FONT>&nbsp;
<BR><FONT FACE="Courier"><FONT SIZE=+1></FONT></FONT>&nbsp;</DIR>
</DIR>

<FONT COLOR="#3366FF"><FONT SIZE=+3>Multiprocessing</FONT></FONT>

<P><FONT SIZE=+1>So far we have considered machines which have only a single
processor (known as the Central Processor Unit). Becoming more common these
days are multi-processor machines which may have a number of processors
(for example four or thirty two) which may provide true concurrency to
multiple tasks running on the machine. On these machines the <A
HREF="./flower/schedule.html">scheduler</A>
will arrange for the execution of processes to occur in a manner selected
to take maximum advantage of the available processing capacity. Asymmetric
multiprocessing (ASMP) operating systems typically select one processor
to run operating system code, with the other processors running user jobs.
Problems with such systems include a lack of portability of the operating
system to other platforms. Symmetric multiprocessing systems (SMPs), which
include Linux, Sun's Solaris and Windows NT each allow the operating system
to run on any or all of the available processors, sharing memory between
them. The central unit for execution on such machines is the thread, with
multiple threads of a single process having the possibility to be spread
across multiple processors. The scheduling task on an SMP computer can
become extremely complex.</FONT>
<DIV ALIGN=right><A HREF="./flower/multitask.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/context.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Multitasking</B></FONT></FONT>

<P><FONT SIZE=+1>It would be extremely inefficient for a single process
to have complete use of the processor from the time of its start-up to
the completion of its operations. One reason for this is that most processes
must pause very often to wait for input such as data from I/O devices,
keyboard input or disk accesses. In the simplest case therefore a large
amount of useable CPU time would be wasted due to this blocking. This would
result in a large overall time to carry out a number of independent tasks.
The processor must also handle asynchronous software or hardware interrupts
which may require high priority service for a short period, requiring the
currently active process to be displaced from the processor while the interrupt
is handled before normal processing can be resumed. Such interrupts may
be caused by events such as an input buffer becoming full which, if not
serviced in a timely manner could result in an unrecoverable loss of data.</FONT>

<P><FONT SIZE=+1>To increase throughput efficiency most modern operating
systems implement a method to allow many processes to be available for
running at any one time. Their access to the processor is interleaved and,
as the speed of modern processors is high compared to slower I/O devices,
it is possible to provide a pseudo real-time response to an active user
of the system for any particular process when in reality many processes
are being run. The total time to complete a number of tasks will also be
less due to less time being wasted waiting for external inputs. Interrupt
handling is facilitated as well as this round robin scheduling of normal
processes.</FONT>

<P><FONT SIZE=+1>This procedure is known as Multitasking (or Multiprogramming)
and its sequencing is controlled by an operating system service called
the scheduler. Some operating systems (e.g. Windows 3.1) just rely on the
process itself giving up the processor at regular intervals or when waiting
on I/O. This approach is known as co-operative multitasking and it can
have many problems as, if the process does not give up the CPU at the expected
time failure can occur. In this case all other processes will be blocked
and there will be no way for the operating system to gain control of the
processor, most likely resulting in a system lockup or crash.</FONT>

<P><FONT SIZE=+1>A better approach, and that used in most operating systems
designed for efficient multitasking is that of <I>pre-emptive multitasking
. </I>In this case it is the operating system that decides which process
gets access to the CPU. It can allocate CPU time to a process or remove
the process from the CPU as required. Each candidate process gets access
to the CPU for a short time (known as a quantum) based on their allocated
priority, their process class and also their voluntary release of the processor
as they wait for external input.</FONT>
<DIV ALIGN=right>&nbsp;</DIV>

<DIV ALIGN=right></DIV>

<DIV ALIGN=right><A HREF="./flower/groups.html"><IMG SRC="./gx/flower/cyan_lef.gif"
BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG
SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A
HREF="./flower/multiproc.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;

<P>&nbsp;
<BR>&nbsp;

<P>&nbsp;
<BR>&nbsp;
<BR>&nbsp;

<CENTER>&nbsp;</CENTER>
<B><FONT COLOR="#3366FF"><FONT SIZE=+3>Mutual Exclusion and Synchronisation</FONT></FONT></B>

<P><FONT SIZE=+1>&nbsp;Allowing multiple processes access to the same resources
in a time sliced manner or potentially consecutively in the case of <A HREF="./flower/multiproc.html">multiprocessor</A>
systems can cause many problems. This is due to the need to maintain data
consistency, maintain true temporal dependencies and to ensure that each
thread will properly release the resource as required when it has completed
its action.</FONT>

<P><FONT SIZE=+1>&nbsp;Concurrent processes in <A HREF="./flower/multitask.html">multitasking</A>
and / or multiprocessing operating systems must deal with a number of potential
problems</FONT>

<P><FONT SIZE=+1>&nbsp;</FONT>
<CENTER><TABLE BORDER CELLPADDING=7 WIDTH="482" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="25%"><FONT SIZE=+1>Process starvation or indefinite
postponement</FONT></TD>

<TD VALIGN=TOP WIDTH="75%"><FONT SIZE=+1>A low priority process never gets
access to the processor due to the higher effective processor access of
other processes. Solution is to cause processes to 'age' or decline in
priority as they use up CPU quanta.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="25%"><FONT SIZE=+1>Process deadlock</FONT></TD>

<TD VALIGN=TOP WIDTH="75%"><FONT SIZE=+1>Two or more processes are competing
for resources, each blocking the other.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="25%"><FONT SIZE=+1>Race Conditions</FONT></TD>

<TD VALIGN=TOP WIDTH="75%"><FONT SIZE=+1>The processing result depends
on when and how fast two or more processes complete their tasks.</FONT></TD>
</TR>
</TABLE></CENTER>
<FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>The data consistency and race condition problems may be
addressed by the implementation of Mutual Exclusion and Synchronisation
rules between processes whereas starvation is a function of the scheduler.</FONT><FONT SIZE=+1></FONT>

<P><FONT SIZE=+1>There are a number of synchronisation primitives :</FONT>

<P><FONT SIZE=+1>&nbsp;</FONT>
<CENTER><TABLE BORDER CELLPADDING=7 WIDTH="472" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Events</FONT></TD>

<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>A thread may wait for events such
as the setting of a flag, integer, signal or presence of an object. Until
that event occurs the thread will be blocked and will be removed from the
run queue.&nbsp;</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Critical Sections</FONT></TD>

<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>These are areas of code which
can only be accessed by a single thread at any one time.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Mutual Exclusions</FONT></TD>

<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>mutexes are objects that ensure
that only a single thread has access to a protected variable or code at
any one time.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Semaphores</FONT></TD>

<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>These are similar to mutual exclusions
but may include counters allowing only a specified number of threads access
to a protected variable or code at any one time.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="22%"><FONT SIZE=+1>Atomic operations</FONT></TD>

<TD VALIGN=TOP WIDTH="78%"><FONT SIZE=+1>This mechanism ensures that an
non decomposable transaction is completed by a thread before access to
the same atomic operation is granted to another thread. The thread may
have non-interruptable access to the CPU until the operation is completed.</FONT></TD>
</TR>
</TABLE></CENTER>
<FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>Deadlock is a <I>permanent</I> blocking of a set of processes
that either compute for system resources or communicate with each other
[MAEK87]. Deadlock may be addressed by mutual exclusion or by deadlock
avoidance. Mutual exclusion prevents two threads accessing the same resource
simultaneously. Deadlock avoidance can include initiation denial or allocation
denial, both of which serve to eliminate the state required for deadlock
before it arises.</FONT>

<P><FONT SIZE=+1>&nbsp;Both Linux and Windows NT solve these problems in
different ways. Windows NT has functions which equate to all of the above
instances. Both implement multiprocessor mutual exclusion mechanisms called
<I>spin locks </I>which effectively stall the processor until a lock is
achieved for a critical section.</FONT>
<DIV ALIGN=right>&nbsp;<A HREF="./flower/schedule.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/timers.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;

<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Process Image</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>

<P><FONT SIZE=+1>&nbsp;Executable files are stored in a defined format
on the disk, different operating systems may have different definitions
for the actual format but there are generally common elements in the way
they are stored. A format commonly used on Unix systems such as Linux is
called Extensible Linked Format (ELF). An ELF programme consists of an
ELF header, a program header table, a number of sections and an optional
section header table. The header contains all the information the kernel
needs to create a process image (i.e. load the programme into memory and
allocate resources to prepare it for execution).</FONT>

<P><FONT SIZE=+1>Programme code on a multitasking operating system must
be re-entrant. This means it can be shared by multiple processes. To be
re-entrant the code must not modify itself at any time and the data must
be stored separately from the instruction text (such that each independent
process can maintain its own data space).</FONT>

<P><FONT SIZE=+1>&nbsp;When a programme is loaded as a process it is allocated
a section of virtual memory which forms its useable address space. Within
this process image there are typically at least four elements :</FONT>
<BR>&nbsp;
<CENTER><TABLE BORDER CELLPADDING=7 WIDTH="453" BORDERCOLOR="#000000" >
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Program code (or text)</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>The program instructions to be
executed. Note that it is not necessary for the processor to read the totality
of a process into physical memory when a program is run, instead by a procedure
known as ?dynamic paging? the next block of instructions is loaded as required
and may be shared between processes.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Program data</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>May be distinguished as initialised
variables including external global and static variables, uninitialised
variables (known as a bss area on Unix derivative systems). Data blocks
are not shared between processes by default.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Stack</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>A process will commonly have at
least two last-in, first-out (LIFO) stacks, including a user stack for
user mode and a kernel stack for kernel mode<FONT FACE="Courier New">.</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Process Control Block</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Information needed by the operating
system to control the process.</FONT></TD>
</TR>
</TABLE></CENTER>
&nbsp;
<DIV ALIGN=right>&nbsp;<A HREF="./flower/vmem.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/groups.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
&nbsp;<FONT COLOR="#3366FF"><FONT SIZE=+3>Scheduling</FONT></FONT>

<P><FONT SIZE=+1>A scheduler is responsible for the coordination of the
running of processes to manage their access to the system resources such
that each candidate process gets a fair share of the available process
time, with the utilisation of the CPU being maximised. The scheduler (dispatcher)
must ensure that processes gain access to the CPU for a time relative to
its designated priority and process class and that no process is starved
of access to the CPU, no matter if it is the lowest priority task available.</FONT>

<P><FONT SIZE=+1>&nbsp;A process may choose to voluntarily give up it's
use of the microprocessor when it must wait, usually for some system resource
or for synchronisation with another process. Alternatively the scheduler
may pre-emptively remove the thread or process from the CPU at the expiry
of it's allocated time quantum. The scheduler chooses which is the most
appropriate process to run next.</FONT>

<P><FONT SIZE=+1>&nbsp;Scheduling is an operation of the kernel, which
defines the following process states :</FONT>

<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows
NT</FONT></FONT></B></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Running
:</FONT> The process is the current system process and is on the CPU carrying
out it's execution.&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Running
: </FONT>The process (thread) is the currently active process on the CPU.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Running
: </FONT><FONT COLOR="#009900">Ready to Run :</FONT> The process is in
a run queue ready to use the CPU when available.</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Standby
: </FONT>The thread has been selected to run next by the processor, only
one thread can be in this state.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Waiting
: </FONT><FONT COLOR="#008080">interruptable</FONT><FONT COLOR="#FFFF00">
:</FONT><FONT COLOR="#00FF00"> </FONT>The process is waiting for a resource
or event but signals are not blocked and it may be interrupted.</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Ready :
</FONT>The thread is simply waiting to execute and is a candidate for selection
by the scheduler for entering standby at the next scheduling cycle<FONT COLOR="#00FF00">.</FONT></FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Waiting
: </FONT><FONT COLOR="#008080">uninterruptable</FONT><FONT COLOR="#FFFF00">
:</FONT> The process is waiting for a resource or event but has disable
signals such that it cannot be interrupted.</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Waiting
:</FONT> The thread is waiting for synchronisation events, it has been
directed to suspend by the environment subsystem or is waiting on I/O.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Stopped
:</FONT> The process has been stopped, usually by a SIGSTOP signal such
as when performing debugging.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Transition
:</FONT> The thread is ready to execute but the resources it needs are
not available. (e.g. the thread's kernel stack is paged out of memory).</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Zombie :</FONT>
The process has completed and is ready to die, the scheduler has not yet
detected this so it?s task_struct structure is still present.</FONT></TD>

<TD VALIGN=TOP WIDTH="4%"><FONT SIZE=+1>&nbsp;</FONT></TD>

<TD VALIGN=TOP WIDTH="48%"><FONT SIZE=+1><FONT COLOR="#00FF00">Terminated
:</FONT> The thread has finished executing and the object manager decides
whether the thread is deleted. If the executive has a pointer to the thread
it may be reinitialised and reused.&nbsp;</FONT></TD>
</TR>
</TABLE>
<FONT SIZE=+1>&nbsp;</FONT>

<P><FONT SIZE=+1>The scheduling of tasks on the different operating systems
is similar, but each OS solves the problem in it's own way :</FONT>

<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="490" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Tasks have a priority which ranges from a setting of
-20 to +20. The default priority of a task is 0 with -20 being the highest.
Only the administrator can reset a process's priority to be less than 0,
but normal users can adjust priorities in the positive range. This is done
using the 'renice' command, though internally Linux uses a time quantum
counter (in 'jiffies') to record this in the task_struct.</FONT>&nbsp;

<P><FONT SIZE=+1>New processes inherit the priority of their parent.</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Threads have a priority which ranges from 1 to 31 with
8 being the user default and 31 being the highest. Priority 0 is reserved
for system use. Only the administrator can set a processes priority to
be above 15, normal users can set a process's priority in the 1 to 15 range
in a two step process by first setting the process class and then setting
the relative priority within the class. This is done using the Task Manager.</FONT>&nbsp;

<P><FONT SIZE=+1>New processes inherit the priority of their creating process.</FONT></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>&nbsp;Real time processes are supported. Any real time
process will have higher priority than all non real-time processes.&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Processes having priorities between 16 and 31 are real-time
processes which are members of the realtime class.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;<I>time-critical</I> and <I>idle</I> modifiers may
move a dynamic thread's priority to the top or bottom of it's dynamic range
respectively.</FONT></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Threads that have already received some CPU time will
have lower priority than other of the same priority which have not.</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Non real-time threads may be boosted in priority should
(e.g.) a blocked thread receive an event if was waiting for. This boost
decays over time as the thread receives CPU time.</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<UL><FONT SIZE=+1>&nbsp;The following diagram shows the state machine used
for the Windows NT scheduler. From the above tables it can be seen that
although the corresponding state for machine for Linux will be different
it will be similar. Linux also has kernel mechanisms called <I>bottom half
handlers</I> which are not covered here.</FONT></UL>
<FONT SIZE=+1>&nbsp;</FONT>
<DIR>
<DIR><IMG SRC="./gx/flower/schedule.gif" HEIGHT=350 WIDTH=400>
<BR>&nbsp;
<BR>&nbsp;
<BR>&nbsp;
<DIV ALIGN=right><A HREF="./flower/threads.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/mutex.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>
&nbsp;
<BR>&nbsp;</DIR>
</DIR>

<CENTER>&nbsp;</CENTER>
&nbsp;<FONT COLOR="#3366FF"><FONT SIZE=+3>Threads</FONT></FONT>

<P><FONT SIZE=+1>&nbsp;The majority of processes seen on operating systems
today are single threaded, meaning there is a single path of execution
within the process. Should a process have to perform many sub tasks during
it's operation then a single threaded process would sequence these tasks
in a serial manner, with each sub task being required to wait for the completion
of the previous sub task before commencement. Such an arrangement can lead
to great inefficiency in the use of the processor and in the apparent responsiveness
of the computer.</FONT>

<P><FONT SIZE=+1>An example can illustrate the advantages of having multiple
threads of execution as shown in the figure. Suppose a user wants to print
a document, a user process can be initiated to accept input from the operator
to select the print action and start the printing action. Should the user
process be required to check for further user commands subsequent to initiating
the print there are two options :</FONT>

<P><FONT SIZE=+1>(i) the process can stop the printing periodically, poll
for user input, then continue printing, or</FONT>

<P><FONT SIZE=+1>(ii) wait until printing has completed before accepting
user input.</FONT>

<P><FONT SIZE=+1>Either of these alternatives slow down printing and/or
decrease responsiveness. By contrast a <I>multi-threaded </I>process can
have many paths of execution. A multi-threaded application can delegate
the print operation to a different thread of execution. The input thread
and print thread then run in parallel until printing is completed.</FONT>

<P><FONT SIZE=+1>&nbsp;</FONT>
<DIR>
<DIR><IMG SRC="./gx/flower/threads.gif" HEIGHT=300 WIDTH=400></DIR>
</DIR>
<FONT SIZE=+1>&nbsp;Each thread has access to the allocated resources within
the process and can access global variables available to all threads. In
a multi-threaded process each thread 'believes' it has independent access
to its own 'virtual machine' with the <A HREF="./flower/schedule.html">scheduler</A>
being responsible for allocation of CPU quanta to threads to optimise throughput
efficiency.</FONT>

<P><FONT SIZE=+1>&nbsp;Threads within the same task share resources such
as file pointers and code segments. Swapping between threads within a process
presents a much smaller overhead to the scheduler than swapping between
processes. This is because less context related data must be saved to enable
successful restoration of that context later. For this reason threads are
often known as 'light weight processes' (LWPs) with normal processes being
correspondingly known as heavyweight processes.<FONT FACE="Courier New">
</FONT>Typically, when a thread context switch is performed, only the program
counter and register set need to be saved in the PCB. Heavy-weight processes
typically don?t share such resources so when heavy-weight processes context
switch, all this additional info must be saved.</FONT>

<P><FONT SIZE=+1>&nbsp;Although threads have many advantages as described
above, they also have disadvantages, one of these being that any single
'rogue' thread within the process can cause the whole process to fail.
Programming threads is also more complex than for simple processes as kernel
code and libraries must have 100% re-entrant code. Special care must be
taken to ensure that pre-emption cannot occur within critical sections
of code within which inconsistencies could occur should another thread
gain access at the wrong time. Other such problem is "what happens if a
thread forks another process ?", it must be defined how threads within
a process are affected in this case.</FONT>

<P><FONT SIZE=+1>&nbsp;</FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>There are two types of threads: user-space and kernel-space.</FONT>&nbsp;

<P><FONT SIZE=+1>User space threads consist of internal cooperative multitasking
switches between sub tasks defined with a process.&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>A thread may send a signal, perform it?s own switch or
be invoked by a timer to give up the thread of execution. The user stack
is then manipulated to save the thread context Switching is typically faster
for user threads than kernel threads.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>User threads have disadvantages in that starvation can
occur if one thread does not give up the CPU. Also should a thread become
blocked waiting on a resource, all other threads will be blocked as well.
User threads cannot take advantage of SMP systems should such a multi processor
environment be available.</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP ROWSPAN="2" WIDTH="48%">
<UL><FONT SIZE=+1>Similarly to its implementation of processes, Windows
NT threads are implemented as Objects.&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>Certain attributes of a thread may restrict or qualify
the attributes applicable to the overall process.</FONT>&nbsp;

<P><FONT SIZE=+1>The thread has a context attribute which allows the operating
system to correctly perform context switching as required.</FONT>&nbsp;

<P><FONT SIZE=+1>&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>The Windows NT Posix subsystem does not support multi-threading,
though the OS/2 and Win 32 subsystems do.</FONT>&nbsp;

<P><FONT SIZE=+1>All threads are subject to manipulation by the kernel,
which will schedule their priority for access to the CPU. The kernel is
concerned with its own view of a thread called a <I>kernel thread object</I>.
The kernel does not use thread handles but instead accesses threads directly
from it's kernel process object.</FONT>&nbsp;

<P><FONT SIZE=+1>Windows NT threads support SMP, with individual threads
(and processes for that matter) having a defined <I>processor affinity
</I>which can define on which of a selection of available processors the
thread may be run.</FONT></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Kernel-space threads may be implemented in the kernel
by allocation of a thread table to a process. The kernel schedules threads
within the time quantum allocated to the process.&nbsp;</FONT>&nbsp;

<P><FONT SIZE=+1>This method requires slightly more overhead for context
switching but advantages include true pre-emption of tasks, thus overcoming
the starvation problem. I/O blocking is also no longer a problem. Threads
can automatically take advantage of SMPs with run time efficiency improving
linearly as CPUs are added.</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<UL>
<DIV ALIGN=right>&nbsp;<A HREF="./flower/context.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/schedule.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>


<P>&nbsp;
<BR>&nbsp;
<BR>&nbsp;</UL>


<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Timers</B></FONT></FONT>
<BR><FONT COLOR="#3366FF"><FONT SIZE=+3>&nbsp;</FONT></FONT>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="491" >
<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Linux</FONT></FONT></B></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><B><FONT COLOR="#FF0000"><FONT SIZE=+1>Windows NT</FONT></FONT></B></UL>
</TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>The kernel records a process's creation time and the
CPU time it has consumed including the time spent in user mode and time
spent in system mode.</FONT>&nbsp;

<P><FONT SIZE=+1>Processes may also have their own interval timers, which
may be single shot or periodic. These can use signals to notify the process
when timers expire.</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="4%">
<UL><FONT SIZE=+1>&nbsp;</FONT></UL>
</TD>

<TD VALIGN=TOP WIDTH="48%">
<UL><FONT SIZE=+1>Timer objects exist as an Executive support service which
will record the passage of time. After a set time or on expiry of a time
interval the object becomes 'signalled' which will release all waiting
threads.</FONT></UL>
</TD>
</TR>
</TABLE>
&nbsp;
<BR>&nbsp;
<DIV ALIGN=right>&nbsp;<A HREF="./flower/mutex.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/ipc.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>


<DIV ALIGN=right>&nbsp;</DIV>
<FONT COLOR="#3366FF"><FONT SIZE=+3><B>Virtual Memory</B></FONT></FONT><FONT COLOR="#3366FF"><FONT SIZE=+3></FONT></FONT>

<P><FONT SIZE=+1>&nbsp;Virtual memory provides a way of running more processes
than can physically fit within a computer's physical address space.</FONT>

<P><FONT SIZE=+1>&nbsp;Each process that is a candidate for running on
a processor is allocated it's own virtual memory area which defines the
logical set of addresses that a process can access to carry out it's required
task. As this total virtual memory area&nbsp; is very large (typically
constrained by the number of address bits the processor has and the maximum
number of processes it supports), each process can be allocated a large
logical address space (typically 3Gb) in which to operate.</FONT>

<P><FONT SIZE=+1>&nbsp;It is the job of a virtual memory manager to ensure
that active processes and the areas they wish to access are remapped to
physical memory as required. This is achieved by a method of swapping or
paging the required sections (pages) into and out of physical memory as
required.&nbsp;&nbsp; Swapping involves replacing a complete process with
another in memory whereas paging involves removal of a 'page' (typically
2-4kbytes) of the process's mapped memory and replacing it with a page
from another process.&nbsp; As this may be a computer intensive and time
consuming task, care is taken to minimise the overhead that it has. This
is done by usage of a number of algorithms designed to take advantage of
the common locality of related sections of code and also&nbsp; only carrying
out some operations such as memory duplication or reading when absolutely
required ( techniques known as <I>copy on write, lazy paging</I> and <I>demand
paging</I>).</FONT>

<P><FONT SIZE=+1>The virtual memory owned by a process may contain code
and data from many sources. Executable code may be shared between processes
in the form of shared libraries, as these areas are read-only there is
little chance of them becoming corrupted. Processes can allocate and link
virtual memory to use during their processing,</FONT>

<P><FONT SIZE=+1>&nbsp;Some of the memory management techniques used by
many operating systems, including Linux and Windows NT include :</FONT>
<CENTER><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=7 WIDTH="453" >
<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Page based protection mechanism</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Each virtual page has a set of
flags which determine the types of access allowed in user mode or kernel
mode.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Demand paging / lazy reading</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>the virtual memory of a process
is brought into physical memory only when a process attempts to use it.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Kernel and User modes of operation</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Unrestricted access to process's
memory in kernel mode but access only to it's own memory for a process
in user mode.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Mapped files</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>Memory is extended by allowing
disk files to be used as a staging area for pages swapped out of physical
memory.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Copy on write memory</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>When two processes require access
to a common area of code the virtual memory manager does not copy the section
immediately as if only read access is required the section may be used
safely by both processes. Only when a write is requested does the copy
take place.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Shared memory</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>An area of memory may be mapped
into the address space of more than one process by the calling of privileged
operations.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>Memory Locking</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>To ensure a critical page can
never be swapped out of memory it may be locked in, the vritual memory
manager will not then remove it.</FONT></TD>
</TR>

<TR>
<TD VALIGN=TOP WIDTH="27%"><FONT SIZE=+1>For Windows NT : Object based
Memory Protection</FONT></TD>

<TD VALIGN=TOP WIDTH="73%"><FONT SIZE=+1>The NT security reference checks
access permissions for any process attempting to open a handle to that
memory section or map a view of it.</FONT>&nbsp;
<BR>&nbsp;</TD>
</TR>
</TABLE></CENTER>
&nbsp;
<CENTER></CENTER>

<CENTER>&nbsp;</CENTER>

<DIV ALIGN=right><FONT SIZE=+1>&nbsp;</FONT><A HREF="./flower/intro.html"><IMG SRC="./gx/flower/cyan_lef.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/page1.html"><IMG SRC="./gx/flower/cyan_up.gif" BORDER=0 HEIGHT=31 WIDTH=31></A><A HREF="./flower/psimage.html"><IMG SRC="./gx/flower/cyan_rig.gif" BORDER=0 HEIGHT=31 WIDTH=31></A></DIV>

<!--endcut ============================================================-->

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P>
<!--===================================================================-->

<center>
<H2>Build your own DBMS!!</H2>
<H4>By Idan Shoham, <a href="mailto:idan@m-tech.ab.ca">idan@m-tech.ab.ca</a></H4>
</center>
<P> <HR> <P>

 <A NAME="tex2html18" HREF="./shoham/node1.html"><IMG WIDTH=37 HEIGHT=24
ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"> <IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif">   <BR>
<B> Next:</B> <A NAME="tex2html19" HREF="./shoham/node1.html">Introduction</A>
<BR> <P>
 <B>Roll your own DBMS?!?</B>
<P>
Author: Idan Shoham
<P>
Document release date: May 28, 1997
<P>
<BR> <HR>
<UL><A NAME="CHILD_LINKS">&#160;</A>
<LI> <A NAME="tex2html20" HREF="./shoham/node1.html#SECTION00010000000000000000">Introduction</A>
<LI> <A NAME="tex2html21" HREF="./shoham/node2.html#SECTION00020000000000000000">A little history</A>
<LI> <A NAME="tex2html22" HREF="./shoham/node3.html#SECTION00030000000000000000">Problems with off-the-shelf technology</A>
<LI> <A NAME="tex2html23" HREF="./shoham/node4.html#SECTION00040000000000000000">Summary of design requirements</A>
<LI> <A NAME="tex2html24" HREF="./shoham/node5.html#SECTION00050000000000000000">Architectural answers to design questions</A>
<LI> <A NAME="tex2html25" HREF="./shoham/node6.html#SECTION00060000000000000000">The components</A>
<UL>
<LI> <A NAME="tex2html26" HREF="./shoham/node7.html#SECTION00061000000000000000">Client software</A>
<LI> <A NAME="tex2html27" HREF="./shoham/node8.html#SECTION00062000000000000000">Database and network protocols</A>
<LI> <A NAME="tex2html28" HREF="./shoham/node9.html#SECTION00063000000000000000">Server software</A>
</UL> 
<LI> <A NAME="tex2html29" HREF="./shoham/node10.html#SECTION00070000000000000000">Bonus features</A>
<LI> <A NAME="tex2html30" HREF="./shoham/node11.html#SECTION00080000000000000000">A working system!</A>
<LI> <A NAME="tex2html31" HREF="./shoham/node12.html#SECTION00090000000000000000">A solution looking for new problems</A>
<LI> <A NAME="tex2html32" HREF="./shoham/node13.html#SECTION000100000000000000000">References</A>
<LI> <A NAME="tex2html33" HREF="./shoham/node14.html#SECTION000110000000000000000">  About this document ... </A>
</UL>
<HR><A NAME="tex2html18" HREF="./shoham/node1.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motifr.gif"> <IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif">   <BR>
<B> Next:</B> <A NAME="tex2html19" HREF="./shoham/node1.html">Introduction</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>

<!--===================================================================-->
<P> <hr> <P>
<center><H5>Copyright &copy; 1997, Idan Shoham <BR>
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P>
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif"
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./flower/page1.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./successtory.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
 <A NAME="tex2html42" HREF="./shoham/node2.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html40" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html34" HREF="./shoham/drafth.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html43" HREF="./shoham/node2.html">A little history</A>
<B>Up:</B> <A NAME="tex2html41" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html35" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<BR> <P>
<H1><A NAME="SECTION00010000000000000000">Introduction</A></H1>
<P>
This article describes a project, recently completed at M-Tech,
for which we constructed a client/server database management system (DBMS),
from the ground up. This DBMS was built using off-the-shelf components,
some tools recycled from previous projects and a modest amount of new code.
<P>
You might ask why we developed a new DBMS, considering the diversity
and quality of commercial DBMS-s already on the market.  The answer
lies in the stringent demands of a project we had contracted for.
This project required an inexpensive, fast, reliable DBMS that
could support <EM>highly secure</EM> transactions over a slow public
network.  There are commercial DBMS products that are inexpensive, fast,
or secure, but we are not aware of any that combine all of these
merits, as well as responsive performance over something as slow
as a modem.
<P>
This article is of particular interest because the technology we
developed for this project can be utilized to construct systems that carry
<EM>any</EM> of the stringent demands of our original project, such as:
<P>
<UL>
<LI> Responsive DBMS performance over a slow TCP/IP network.
<LI> Strong security, based on public-key cryptographic technology.
<LI> Inexpensive system implementation, component licensing and
   ongoing maintenance.
</UL><HR><A NAME="tex2html42" HREF="./shoham/node2.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html40" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html34" HREF="./shoham/drafth.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html43" HREF="./shoham/node2.html">A little history</A>
<B>Up:</B> <A NAME="tex2html41" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html35" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html133" HREF="./shoham/node11.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html131" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html125" HREF="./shoham/node9.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html134" HREF="./shoham/node11.html">A working system!</A>
<B>Up:</B> <A NAME="tex2html132" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html126" HREF="./shoham/node9.html">Server software</A>
<BR> <P>
<H1><A NAME="SECTION00070000000000000000">Bonus features</A></H1>
<P>
Over the course of about six months, we implemented the entire
client/server architecture.  With all the building blocks in place,
we could implement some extra features with relative ease:
<P>
<UL>
<LI> We needed a report writer; preferably one that could run on the server.
   By creating reports on the server, the client PCs would require
   minimal software and infrequent upgrades.  Furthermore, reports could
   be produced very quickly, since no data would travel across any
   network, no matter how fast.
<P>
   We already had a system (from a previous project) that could convert
   a high-level description of a report into C source code, to be linked
   against <A NAME="tex2html13" HREF="http://www.sequiter.com">CodeBase</A>.  We integrated stand-alone executable reports
   written using this tool into the server, so that a client could request
   a report and the server would deliver only the output.
<LI> Every Unix system is configured with a mailer.  In our case, the mailer
   was just <TT>sendmail</TT>.  We wanted to give the end-users access to e-mail,
   but over the encrypted SSL connection rather than directly.  To do this,
   we added a rudimentary e-mail user interface to the client and a thin
   server, that just talks to <TT>sendmail</TT> over a local SMTP socket.
<LI> The client/server database, along with the server's ability to 
   regularly execute tasks, allowed us to implement a simple bulletin
   system, where any user could post announcements and the server would
   automatically delete them after a period of time.  The bulletins are 
   stored using a regular table in the database, so access to them
   is controlled by the same mechanism that controls access to data
   elsewhere in the system.
</UL><HR><A NAME="tex2html133" HREF="./shoham/node11.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html131" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html125" HREF="./shoham/node9.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html134" HREF="./shoham/node11.html">A working system!</A>
<B>Up:</B> <A NAME="tex2html132" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html126" HREF="./shoham/node9.html">Server software</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html143" HREF="./shoham/node12.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html141" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html135" HREF="./shoham/node10.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html144" HREF="./shoham/node12.html">A solution looking for </A>
<B>Up:</B> <A NAME="tex2html142" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html136" HREF="./shoham/node10.html">Bonus features</A>
<BR> <P>
<H1><A NAME="SECTION00080000000000000000">A working system!</A></H1>
<P>
We built the infrastructure and used it to build a mental health
clinical information database - which is now used by qualified,
authorized clinicians throughout Calgary to share clinical data
about patients.  The system is ``live,'' the feedback from users
has been positive and there are already hundreds of trained,
active users.
<P>
The MHCID system as currently implemented allows
users to enter data about new patients, find clinical records about
existing patients, send each other e-mail as well as read and post bulletins.
There is a friendly interface by which an authorized user can add and
delete users, update lookup tables and change the access control
model.
<P>
<HR><A NAME="tex2html143" HREF="./shoham/node12.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html141" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html135" HREF="./shoham/node10.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html144" HREF="./shoham/node12.html">A solution looking for </A>
<B>Up:</B> <A NAME="tex2html142" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html136" HREF="./shoham/node10.html">Bonus features</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html153" HREF="./shoham/node13.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html151" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html145" HREF="./shoham/node11.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html154" HREF="./shoham/node13.html">References</A>
<B>Up:</B> <A NAME="tex2html152" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html146" HREF="./shoham/node11.html">A working system!</A>
<BR> <P>
<H1><A NAME="SECTION00090000000000000000">A solution looking for new problems</A></H1>
<P>
All these tools .. all this infrastructure .. just one application?
We are already using the same infrastructure to develop two additional
applications - one in a mental health outcomes measurement study,
and another for a palliative care system.
<P>
There is nothing specific to health applications about the technology,
though!  Any system that requires one or more of the key features
of the technology: fast response over a low-bandwidth, high-latency network;
strong security; low licensing cost; low administration / support
costs can benefit from this architecture.
<P>
<HR><A NAME="tex2html153" HREF="./shoham/node13.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html151" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html145" HREF="./shoham/node11.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html154" HREF="./shoham/node13.html">References</A>
<B>Up:</B> <A NAME="tex2html152" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html146" HREF="./shoham/node11.html">A working system!</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html163" HREF="./shoham/node14.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html161" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html155" HREF="./shoham/node12.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html164" HREF="./shoham/node14.html">  About this document </A>
<B>Up:</B> <A NAME="tex2html162" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html156" HREF="./shoham/node12.html">A solution looking for </A>
<BR> <P>
<H1><A NAME="SECTION000100000000000000000">References</A></H1>
<P>
<UL>
<LI> To find out more about SSLeay: <A NAME="tex2html14"
HREF="ftp://psych.psy.uq.oz.au/pub/Crypto/SSL">SSLeay</A>
<P>
<LI> To find out more about Zinc: <A NAME="tex2html15"
HREF="http://www.zinc.com">Zinc</A>
<P>
<LI> To find out more about CodeBase: <A NAME="tex2html16"
HREF="http://www.sequiter.com">CodeBase</A>
<P>
<LI> To find out more about M-Tech: <A NAME="tex2html17"
HREF="http://www.m-tech.ab.ca">M-Tech</A>
<P>
</UL><HR><A NAME="tex2html163" HREF="./shoham/node14.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html161" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html155" HREF="./shoham/node12.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html164" HREF="./shoham/node14.html">  About this document </A>
<B>Up:</B> <A NAME="tex2html162" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html156" HREF="./shoham/node12.html">A solution looking for </A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"> <A NAME="tex2html169" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html165" HREF="./shoham/node13.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B>Up:</B> <A NAME="tex2html170" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html166" HREF="./shoham/node13.html">References</A>
<BR> <P>
<H1><A NAME="SECTION000110000000000000000">  About this document ... </A></H1>
<P>
 (c) 1996,7 M-Tech Mercury Information Technology, Inc.<HR><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"> <A NAME="tex2html169" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html165" HREF="./shoham/node13.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B>Up:</B> <A NAME="tex2html170" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html166" HREF="./shoham/node13.html">References</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html52" HREF="./shoham/node3.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html50" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html44" HREF="./shoham/node1.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html53" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<B>Up:</B> <A NAME="tex2html51" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html45" HREF="./shoham/node1.html">Introduction</A>
<BR> <P>
<H1><A NAME="SECTION00020000000000000000">A little history</A></H1>
<P>
As mentioned earlier, the DBMS architecture described in this 
article grew out of the demanding requirements for a system we
were contracted to develop.  That system is now the Mental Health 
Clinical Integrated Database (MHCID).  It allows clinicians
in the mental health sector in Calgary to share clinical data
about patients throughout all CRHA-sanctioned mental health clinics
and hospitals in the city.
<P>
The MHCID system presented us with these difficult requirements:
<UL>
<LI> Communication between the sites must be supported using modems, so 
   bandwidth was low (less than 30kb/s) and packet latency was high.
<LI> Patient clinical data is very confidential, so must be encrypted
   when transmitted across the telephone system.
<LI> User access to data must be strictly controlled, to support 
   ethical and organizational requirements.
<LI> The system must log all access to patient data.
<LI> There are hundreds of users - up to 15 simultaneously connected to the server.
<LI> Client workstations were already deployed before we started development
   (from a previous pilot project).  There was only a minimal
   budget for hardware upgrades.
<LI> The combined budget for software licenses, server equipment and
   development was relatively small.
</UL><HR><A NAME="tex2html52" HREF="./shoham/node3.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html50" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html44" HREF="./shoham/node1.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html53" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<B>Up:</B> <A NAME="tex2html51" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html45" HREF="./shoham/node1.html">Introduction</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html62" HREF="./shoham/node4.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html60" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html54" HREF="./shoham/node2.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html63" HREF="./shoham/node4.html">Summary of design requirements</A>
<B>Up:</B> <A NAME="tex2html61" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html55" HREF="./shoham/node2.html">A little history</A>
<BR> <P>
<H1><A NAME="SECTION00030000000000000000">Problems with off-the-shelf technology</A></H1>
<P>
In order to minimize the development and debugging efforts, a project
like this would ideally use as much ``off-the-shelf'' technology as
possible.
<P>
We first considered using a commercial DBMS, due to the many available options:
file/server systems such as FoxPro or MS-Access and client/server
systems such as Oracle, Sybase or SQL-Server.  However, it soon became apparent
that a file-server solution would not perform adequately in a modem-based
network.  Also, of the client/server technologies, only Oracle offered
a cryptographically secured solution (Secure Oracle).  While this
appeared to be a sound technology, the licensing costs alone would have
exceeded the total project budget.
<P>
Not only was price a significant problem, but we were also unsure of the
performance implications of running Oracle's SQL*Net protocol over
a 30kbps link.  SQL*Net is designed for a LAN environment, where
1Mbps can usually be sustained for the life of a transaction.
<P>
There had to be a better way!
<P>
<HR><A NAME="tex2html62" HREF="./shoham/node4.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html60" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html54" HREF="./shoham/node2.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html63" HREF="./shoham/node4.html">Summary of design requirements</A>
<B>Up:</B> <A NAME="tex2html61" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html55" HREF="./shoham/node2.html">A little history</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html72" HREF="./shoham/node5.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html70" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html64" HREF="./shoham/node3.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html73" HREF="./shoham/node5.html">Architectural answers to design </A>
<B>Up:</B> <A NAME="tex2html71" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html65" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<BR> <P>
<H1><A NAME="SECTION00040000000000000000">Summary of design requirements</A></H1>
<P>
To summarize, we had to build a system that met the following
requirements.  To succeed, every criteria had to be met in full:
<P>
<UL>
<LI> The system had to operate in real-time.  Data entered at one site
   must be immediately available at all other sites.
<LI> The system had to be secured against eavesdropping, wire-taps, etc.
<LI> The system had to be responsive to users even when communication latency
   was high (on the order of 1-3 seconds) and the bandwidth was low
   (at most 30kbps).
<LI> All administration had to be handled by a trained end-user.
<LI> Access to the data had to be strictly controlled and the rules for
   access control were subject to modification by the 
   user-administrator.
<LI> Access to data had to be logged and the detail with which logs were 
   made had to be subject to run-time control by the user-administrator.
<LI> The client user interface had to be very intuitive - users with no
   computer experience (literally: where's the on-switch?) had to be able
   to use the system after a 1/2 hour of training.
<LI> The system had to be inexpensive to develop, deploy, administer and
   maintain.
</UL>
<P>
The last criterion makes the preceding ones even harder to achieve!
<P>
<HR><A NAME="tex2html72" HREF="./shoham/node5.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html70" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html64" HREF="./shoham/node3.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html73" HREF="./shoham/node5.html">Architectural answers to design </A>
<B>Up:</B> <A NAME="tex2html71" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html65" HREF="./shoham/node3.html">Problems with off-the-shelf technology</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html82" HREF="./shoham/node6.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html80" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html74" HREF="./shoham/node4.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html83" HREF="./shoham/node6.html">The components</A>
<B>Up:</B> <A NAME="tex2html81" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html75" HREF="./shoham/node4.html">Summary of design requirements</A>
<BR> <P>
<H1><A NAME="SECTION00050000000000000000">Architectural answers to design questions</A></H1>
<P>
To address the aforementioned requirements, we clearly had to use a client/server
database technology.  To defend against eavesdropping, we had to encrypt
all communications.
<P>
At the time, IPsec and virtual private networks were not available.
Even today, these are young technologies and VPNs are not yet suitable
for implementation on client workstations.  The solution had to be
encryption in the DBMS protocol.  To do this, we could either buy Secure
Oracle (which would put the project over budget), or roll our own
solution.
<P>
We had to write a DBMS engine which would encrypt all communication,
be responsive when the bandwidth was low and the latency high, support
strong authentication, access controls and auditing features.  On
the bright side, we really didn't need an SQL engine, or a generalized
query engine at all.  (More on queries and reports later, though!)
<P>
<HR><A NAME="tex2html82" HREF="./shoham/node6.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html80" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html74" HREF="./shoham/node4.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html83" HREF="./shoham/node6.html">The components</A>
<B>Up:</B> <A NAME="tex2html81" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html75" HREF="./shoham/node4.html">Summary of design requirements</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html92" HREF="./shoham/node7.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html90" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html84" HREF="./shoham/node5.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html93" HREF="./shoham/node7.html">Client software</A>
<B>Up:</B> <A NAME="tex2html91" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html85" HREF="./shoham/node5.html">Architectural answers to design </A>
<BR> <P>
<H1><A NAME="SECTION00060000000000000000">The components</A></H1>
<P>
A client/server architecture consists of several parts:
<P>
<UL>
<LI> A client:
   <UL>
<LI> A (graphical) user interface.
<LI> A DBMS communication package.
<LI> A network communication package.
<LI> An operating system.
   </UL>
<LI> A network, which connects the client to the server.
<LI> A server:
   <UL>
<LI> A package for physically accessing a database, including record
      locking, read/write, etc.
<LI> An access control / logging module.
<LI> An authentication module.
<LI> A database protocol and code to support it.
<LI> A network communication package.
<LI> An operating system.
   </UL></UL>
<P>
To implement a client/server database, each of the components above
must be implemented; either using existing software or by writing
new code.  We designed a new client/server system primarily in order
to implement our own secure protocol.  Accordingly, we wrote our
own code to handle the database communication protocol.  The other components
are off-the-shelf, in order to reduce the programming work.
<P>
The following are the components used in our system:
<P>
<TABLE COLS=3 BORDER FRAME=BOX RULES=GROUPS>
<COLGROUP><COL ALIGN=LEFT><COLGROUP><COL ALIGN=LEFT><COLGROUP><COL ALIGN=LEFT>
<TBODY>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP>
<B>Location</B> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <B>Component</B> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <B>Technology</B> </TD></TR>
</TBODY><TBODY>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP><B>Client</B> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> operating system			</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Win32 </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> network communication package	</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> TCP/IP + SSL </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> client DBMS communication package	</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> graphical user interface		</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <A NAME="tex2html1" HREF="http://www.zinc.com">Zinc</A> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
<B>Network</B>
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> protocol				</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> TCP/IP </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
<B>Server</B>
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> operating system			</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <A NAME="tex2html2" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A> </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> network communication package	</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> TCP/IP + SSL </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> database protocol + support code	</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> authentication module		</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> access control / logging module	</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> Our own code </TD></TR>
<TR><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> 
   </TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> package for physical DBMS access	</TD><TD VALIGN=BASELINE ALIGN=LEFT NOWRAP> <A NAME="tex2html3" HREF="http://www.sequiter.com">CodeBase</A> </TD></TR>
</TBODY>
</TABLE>


<P>
The architecture is illustrated in Figure&nbsp;<A HREF="./shoham/node6.html#figarch">1</A>.
<P>
<P><A NAME="46">&#160;</A><A NAME="figarch">&#160;</A><IMG WIDTH=640
HEIGHT=769 ALIGN=BOTTOM ALT="figure44" SRC="./gx/shoham/img1.gif"><BR>
<STRONG>Figure 1:</STRONG> System architecture<BR>
<P><BR> <HR>
<UL><A NAME="CHILD_LINKS">&#160;</A>
<LI> <A NAME="tex2html94" HREF="./shoham/node7.html#SECTION00061000000000000000">Client software</A>
<LI> <A NAME="tex2html95" HREF="./shoham/node8.html#SECTION00062000000000000000">Database and network protocols</A>
<LI> <A NAME="tex2html96" HREF="./shoham/node9.html#SECTION00063000000000000000">Server software</A>
</UL>
<HR><A NAME="tex2html92" HREF="./shoham/node7.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html90" HREF="./shoham/drafth.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html84" HREF="./shoham/node5.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html93" HREF="./shoham/node7.html">Client software</A>
<B>Up:</B> <A NAME="tex2html91" HREF="./shoham/drafth.html">Build your own DBMS!!</A>
<B> Previous:</B> <A NAME="tex2html85" HREF="./shoham/node5.html">Architectural answers to design </A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html105" HREF="./shoham/node8.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html103" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html97" HREF="./shoham/node6.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html106" HREF="./shoham/node8.html">Database and network protocols</A>
<B>Up:</B> <A NAME="tex2html104" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html98" HREF="./shoham/node6.html">The components</A>
<BR> <P>
<H2><A NAME="SECTION00061000000000000000">Client software</A></H2>
<P>
We chose Win32 for the client interface because it is common,
well-accepted and friendly.
<P>
We used the <A NAME="tex2html5" HREF="http://www.zinc.com">Zinc</A> platform-independent graphical user interface library
to develop the user interface of the client software.  <A NAME="tex2html6" HREF="http://www.zinc.com">Zinc</A> allowed us
to save time writing Windows screen code and be sure that future
versions of the software could easily be ported to other operating
systems (e.g., Motif, Curses, NextStep, MacOS, OS/2 PM).
<P>
<HR><A NAME="tex2html105" HREF="./shoham/node8.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html103" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html97" HREF="./shoham/node6.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html106" HREF="./shoham/node8.html">Database and network protocols</A>
<B>Up:</B> <A NAME="tex2html104" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html98" HREF="./shoham/node6.html">The components</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html115" HREF="./shoham/node9.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html113" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html107" HREF="./shoham/node7.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html116" HREF="./shoham/node9.html">Server software</A>
<B>Up:</B> <A NAME="tex2html114" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html108" HREF="./shoham/node7.html">Client software</A>
<BR> <P>
<H2><A NAME="SECTION00062000000000000000">Database and network protocols</A></H2>
<P>
We used TCP/IP as the communication
protocol because it is also common, well supported and 
independent of physical media.  Although modems are used in
the MHCID system today, we anticipate other media in the future.
<P>
In order to secure the database communications, we needed an
efficient, robust and <EM>proven</EM> encryption protocol.  Developing
encryption algorithms and secure protocols is a complex task,
fraught with danger.  Rather than invent our own, it was preferable
to use something ``tried and true.''  SSL, developed by Netscape,
is just such a protocol.  It can use public-key cryptography
to authenticate the server and to exchange a secret session key
in a secure fashion.
<P>
Fortunately, an efficient implementation of
SSL is available on the Internet, courtesy the hard work of
Eric Young and Tim Hudson - <A NAME="tex2html7" HREF="ftp://psych.psy.uq.oz.au/pub/Crypto/SSL">SSLeay</A>.
<P>
We developed our own DBMS protocol using a simple syntax,
on top of SSL sockets.  A set of three-letter commands was defined,
which supports everything from logging in, to multi-record read and
write operations.  The client sends commands to the server,
and the server replies with any relevant data, plus a status code.
The protocol was designed to be terse, simple and to support
every operation required by our client software in a single
operation.
<P>
Some examples of how the protocol speeds up the client/server
interaction are:
<UL>
<LI> The client can open every table it needs for a given operation with
   one command.
<LI> The client GUI frequently needs to validate a data entry field.  
   Only one command is needed to check whether ``value X appears in
   column Y in some row of table Z.''
<LI> The client can read many records from one or more related tables on
   the server with a single command.
</UL><HR><A NAME="tex2html115" HREF="./shoham/node9.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html113" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html107" HREF="./shoham/node7.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html116" HREF="./shoham/node9.html">Server software</A>
<B>Up:</B> <A NAME="tex2html114" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html108" HREF="./shoham/node7.html">Client software</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>
 <A NAME="tex2html123" HREF="./shoham/node10.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html121" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html117" HREF="./shoham/node8.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html124" HREF="./shoham/node10.html">Bonus features</A>
<B>Up:</B> <A NAME="tex2html122" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html118" HREF="./shoham/node8.html">Database and network protocols</A>
<BR> <P>
<H2><A NAME="SECTION00063000000000000000">Server software</A></H2>
<P>
We chose to implement the server on <A NAME="tex2html10" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A> for a number of reasons:
<UL>
<LI> It's a lot easier to write Unix software than Windows software.
   This is particularly true of network communications code and 
   server processes.
<LI> In our experience, <A NAME="tex2html8" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A> is a very fast, very reliable operating
   system.  It's also very well supported by the Internet community.
<LI> The price is right!
<LI> We were already very familiar with <A NAME="tex2html9" HREF="http://www.m-tech.ab.ca/linux-biz">Linux</A>.
</UL>
<P>
Once the operating system and database protocol design were fixed,
all we needed was a physical database access system.  Rather than
write our own, we used <A NAME="tex2html11" HREF="http://www.sequiter.com">CodeBase</A>, which allows programs written in C
to manipulate xBase-compatible database files.  We used <A NAME="tex2html12" HREF="http://www.sequiter.com">CodeBase</A> because
we were familiar with it from previous projects and have found
it to be fast and reliable.
<P>
<HR><A NAME="tex2html123" HREF="./shoham/node10.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./gx/shoham/next_motif.gif"></A> <A NAME="tex2html121" HREF="./shoham/node6.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./gx/shoham/up_motif.gif"></A> <A NAME="tex2html117" HREF="./shoham/node8.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./gx/shoham/previous_motif.gif"></A>   <BR>
<B> Next:</B> <A NAME="tex2html124" HREF="./shoham/node10.html">Bonus features</A>
<B>Up:</B> <A NAME="tex2html122" HREF="./shoham/node6.html">The components</A>
<B> Previous:</B> <A NAME="tex2html118" HREF="./shoham/node8.html">Database and network protocols</A>
<P><ADDRESS>
idan@m-tech.ab.ca
</ADDRESS>

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H2>Unioncamere Emilia-Romagna: an Italian Public Administration Using Linux
</H2>
<H4>By 
<A HREF="mailto:monty@rer.camcom.it">Giampaolo Montaletti</a></H4>
</center>

<P> <HR> <P> 

<P>Two year ago the Internet was exploding in Italy. A lot of newspaper
reported wishfull informations about it:</P>
<P>the Net is over 40 million of people looking for your information;</P>
<P>the Net is cheap and fast</P>
<P>the Net is growing so fast that you can't keep up.</P>
<P><A HREF="http://www.rer.camcom.it/istituzionale/">Unioncamere</A> is the
regional association of Chamber of Commerce of The italian region
Emilia-Romagna (Bologna is the capital, but <A HREF="http://www.iper.net/rimini-vrml/">Rimini
</A> is the well-world-wide-know city). Chambers of Commerce in Italy are
public bodies, and all the firm must be associated to the Chamber of Commerce
and have to pay an annual tax.</P>
<P>As you can easily understand firms are not so happy to pay tax, so we are
always under a big pressure from them. They want to have a lot of data about
economy, markets and financial tools in a fast and viable way and without a
lot of cost of maintenance. </P>
<P>Internet was the choiche and Linux was the system of choiche! At the
beginning of september 1995 we was starting the project of establishing a
server , at the end of october we was on line with the www server.</P>
<P>To give a fast stratup has been very important the contribution of Massimo
Poli, and indipendent consultant running a lot of sites and using Linux only;
you che reach him at <A HREF="http://www.sextant.it">www.sextant.it</A>, the
little firm he is managing. </P>
<P>When you pay a consultant using Linux you are sure to pay his work only,
and not a bogus &quot;assistance service&quot; or &quot;online help&quot;.
This is very important in establishing a good and clear contract.</P>
<P>When we started whith the site we was using   a coax-ethernet  based LAN
with 30 users about. The 2 internal servers was (and they are working too)
Novell 3.12 based. Novell is IMHO a good NOS for two tasks: printing and
sharing disks. Novell tecnology is quite stable: our server BOSS is up and
running without shutdown from 6 of january 1997. But we was needing a good
e-mail server and a workgroup solution.</P>
<P>We decided to move to Linux for internal E-mail as for Internet E-mail. In
this way you have an affordable solution with low costs and no standard
problems.  </P>
<P>The site is growing fast. Using Apache solution and virtual server
capacibility we are hosting two Chamber of Commerce and we are going to host
the other 7 in the region in the next future. Mailing lists, restricted users
areas, on-line database with www interfaces and other usefull instruments are
all in use in our server box. Security was another big problem, but not so big
using Linux firewalls. In 1996 we have installed a second server cruncing the
Lan in two segments. </P>
<P>Whit Linux we have solved a lot of problem at low cost, but Linux is
excellent in networking and network management. Now I'm administrating the
full network (SMB servers included) with my Linux box. I'm now mounting
volumes from Novell and fron NT  4 workstations, I'm already printing from
Novell printer server. Because I'm not a full time administrator (I'm really
working here as Chief of the Research and develpment office, and I'm not an
hacker, but a Senior Economist) I use Linux for Office work too. <A HREF="http://www.redhat.com/products/product-details.phtml?id=apx">Applixware
</A>  is the solution I prefer, the only 200 $ I've spent for software whith
Linux. The solution  provided by Applixware is good because I share my work
with Microsoft maniac in my office, and I need the filters for Word and Excel
that Applixware is providing with version 4.3.</P>
<P>Workgroup solutions are now provided by a linux box with <A HREF="http://bscw.gmd.de/">BSCW
</A> software, a not well know piece of software in the linux world, but a
vary usefull one if  you plan to establish  an intranet whit workgroup solutions.
</P>
<P>For all the 4 linux boxex running in our network we use standard pc's. 2 of
the four machines running are old Pentium 90 and 133 Mhz that people with
Win95 wants no more, because those are &quot;weak machines&quot;.</P>
<P>As you have already understood reading this article, we are not
linux-religious or linux-maniac or linux-fanatic. In our offices we run Novell
and Os/2 and Win* machines  as well. But we use linux because for some tasks
is the best solution, only the best solution. Is stable, well supported and
documented. If you want to run a new project where the Internet or the
Intranet is involved and your boss is not able to understand or you have no
more money, go to the room were the old-and-disrupted-pc's are and set-up a
linux box.  </P>
<P><A HREF="mailto:monty@rer.camcom.it">Giampaolo.Montaletti@rer.camcom.it
</A> AKA <A HREF="http://www.rer.camcom.it/people/monty/">Monty</A></P>

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Giampaolo Montaletti<BR> 
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./shoham/drafth.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./wkndmech_dec97/wkndmech.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<CENTER>
<H1>An Introduction to the Midnight Commander</H1>

<B><FONT SIZE=-1>
by John M. Fisk &lt;fiskjm@ctrvax.vanderbilt.edu&gt;<BR>
October, 1997<BR>
Nashville, TN
</FONT></B>
</CENTER>

<BLOCKQUOTE>

<CENTER><P><B>Abstract</B></CENTER>

<P>
The <B>Midnight Commander</B> is a directory browsing and file manipulation
program that provides a flexible, powerful, and convenient set of file
and directory operations.  It is capable of running in either a console or
an xterm under X11; mouse support is native under X11 and is provided by
the <B>gpm</B> mouse server when used in a Linux console.  A sophisticated
Virtual File System (VFS) supports directory-like browsing and file operations
for a variety of common archive formats as well as FTP and network connections.
Its basic operation is easily mastered by the novice while providing a rich 
feature set and extensive customization.

</BLOCKQUOTE>

<H2>Introduction</H2>

<P>
The last couple years has seen the release of a bevy of well designed, X based
file managers including FileMan, FileRunner, Linux Explorer, TkDesk, X-Files,
and Xplorer to name a few.  Some of these are &quot;works in progress&quot;
but all show promise and are well worth having a look at.

<P>
Despite this, one of my favorites, and now old enough in the &quot;Linux
Epoch&quot; to be called venerable, is Miguel de Icaza's Midnight Commander
(mc).  The README describes mc as:

<BLOCKQUOTE>
<P>
a free Norton Commander Clone with many useful features...  The Midnight
Commander is a directory browsing tool which bears a certain remote
resemblance to John Socha's Norton Commander for DOS.
</BLOCKQUOTE>

Its stability, ease of use, flexibility, and rich feature set make it quite a
powerful tool.  Its simplicity makes it easy for novices to quickly master the
basics.  Among the capacities it boasts are:

<UL>
	<LI>support for all basic file operations including move, copy, rename,
		delete, chown, link, view, and edit
	<LI>a built in Virtual File System that allows browsing of archives such
		as tar, compressed tar, rpm, deb, zip, cpio, lha, rar, and zoo files
		as well as remote files via FTP or the Midnight Commander's own mcfs
		protocol 
	<LI>mouse support in xterms under X or at the Linux console via the gpm
		mouse server
	<LI>built in text and hex viewer/editor as well as support for external
		viewer and editors
	<LI>subshell support for the bash, tcsh, and zsh shells
	<LI>built in Find File capacity
	<LI>background copy or move operations
	<LI>online help system
	<LI>and much more...
</UL>

<P>
The manual page for mc is well over 50 pages in length, giving some indication
of its complexity.  In this short article I won't be able to cover mc in this
depth, but will try to touch on the basics:  getting the sources, compiling
and installation, and basic use and features.  This is probably best read
while sitting at your computer and experimenting with the various features as
you go.  Let's start by compiling and installing mc.

<H2>Going To The Source</H2>

<P>
Sources and precompiled binaries are available at a number of locations
including the canonical GNU FTP archive prep.ai.mit.edu/pub/gnu/ and the
sunsite FTP archive at sunsite.unc.edu/pub/Linux/utils/file/managers/mc/.  The
official web page is http://mc.blackdown.org/mc/ where the most recent public
and development releases may also be found.  There are, additionally, mailing
lists for both users and developers to which you can subscribe from this site.

<P>
In addition, most Linux distributions including Debian, RedHat, Slackware, and
their derivatives provide precompiled packages in *.deb, *.rpm, or *.tgz
formats.  If you feel a bit shaky at the prospect of compiling your own
programs, or are in a hurry to get going, then these provide an easy means of
obtaining and installing mc.  Check the documentation that came with your
distribution as to the specifics of using the package management system they
provide.  At a minimum you could try:

<PRE>
	$ installpkg mc-xxx.tgz
	-OR-
	$ rpm -i mc-xxx.rpm
</PRE>

for Slackware or RedHat based systems in which &quot;mc-xxx.{tgz,rpm}&quot; is
the name of the package.

<P>
In the pioneering spirit of Linux's &quot;Do It Yourself And Learn&quot;, I'd
like to suggest that you compile and install mc from its sources.  It's not
that difficult and if you've not done much of this then mc is an ideal program
on which to start since it is quite well behaved.

<P>
For the purposes of this article I'll be using mc version 4.1.5 which is the
most current at the time of this writing.  If you ftp the sources from sunsite
or one of its mirrors then you might also want to retrieve a couple other
useful packages that support mc:  the rxvt X window terminal, Allesandro
Rubini's gpm mouse server, and Theodore T'so and Remy Card's e2fsprogs package
which allows file undelete capacity to be compiled into mc.  All of these are
available at sunsite or its mirrors in the /pub/Linux/utils/file/managers/mc/
directory.

<H2>Compiling and Installing Midnight Commander</H2>

<P>
In this section, I'll assume that you've gotten the *.tar.gz source file, that
you'll unarchive the sources into /usr/src, and that you'll install mc and its
support files under /usr/local.  You can obvious compile and install mc in
any directory you wish:  just change the pathnames to suit your preferences. 
To unarchive the sources do:

<PRE>
	$ cd /usr/src
	$ tar -xvzf /path/to/mc-4.1.5.tar.gz
</PRE>

in which &quot;/path/to/mc-4.1.5.tar.g&quot; is the path to the source file --
<I>i.e.,</I> if you downloaded the file to your home directory you'd use:

<PRE>
	$ tar -xvzf ~/mc-4.1.5.tar.gz
</PRE>

This assumes that you're using the GNU version of tar which handles gzipped
files using the &quot;-z&quot; option.  If you are using a different version
of tar you can also do:

<PRE>
	$ gzip -dc /path/to/mc-4.1.5.tar.gz | tar -xvf -
</PRE>

<P>
After unarchiving the file change to the mc-4.1.5 directory where you'll find
both the sources and program documentation.  The mc distribution comes with
two files outlining the installation process:  INSTALL and INSTALL.FAST.  If
you're not used to compiling programs from source then read INSTALL.FAST which
gives a concise explanation of the process as well as options that you can use
to customize where mc gets installed and what features it includes.  If you're
a bit more adventurous, then have a look at the INSTALL document which goes
into a good deal more detail.  For our purposes, I'll go through the process
of compiling mc with Virtual File System, SLang, and gpm mouse support (which
is very little work since these are the defaults).  We'll install the mc
executable under /usr/local/bin and its support files under /usr/local/lib/mc.
You should log in as root in order to compile and install mc.

<P>
As with many other GNU programs, mc uses an autoconf script to detect the
various features of your system and then create the needed makefiles.
This greatly simplifies the build process.  An additional feature that
this supports is the ability to declare compilation options such as what
features to include and where the program will be installed.  Both INSTALL
and INSTALL.FAST give a listing of these features.  We'll use:

<PRE>
	$ ./configure --prefix=/usr/local --with-slang &gt; configure.log 2&gt;&amp;1 &amp;
	$ tail -f configure.log
</PRE>

The mc configure script defaults to compiling in SLang, mouse, and X Window
support (so the --with-slang option wasn't really necessary).  So as to have a
record of what happened use <KBD> &gt; configure.log 2&gt;&amp;1</KBD> which
saves all the output to configure.log.  Use <KBD>tail -f configure.log</KBD>
to view the log file as the configure script progresses.  When configure is
finished it prints a summary of the features and compile options that will be
used.  Use Control-C to exit out of tail.

<P>
If there were no error messages (and there should be none) then compiling and
installing is as simple as:

<PRE>
	$ make
	$ make install
</PRE>

If you want to create a log file of the build and installation process you can
use:

<PRE>
	$ make &gt; make.log 2&gt;&amp;1 &amp;
	$ tail -f make.log
	$ make install &gt; install.log 2&gt;&amp;1 &amp;
	$ tail -f install.log
</PRE>

<P>
And that should do it!  To ensure that mc was installed properly type:

<PRE>
	$ mc -V

	Midnight Commander 4.1.5
	with mouse support on xterm and the Linux console.
	Edition: text mode
	Virtual File System: tarfs, extfs, ftpfs, mcfs, undelfs.
	With built in Editor
	Using system-installed S-lang library with an unknown terminal database
	With subshell support: as default
	With DUSUM command
	With support for background operations
</PRE>

This returns version and compilation information.  If you've compiled and
installed the 4.1.5 version but <KBD>mc -V</KBD> returns a previous version
then you'll need to find and uninstall or rename the previous version.  If
you use the bash shell, type:

<PRE>
	$ type -a mc
</PRE>

This should return the paths to all mc executables.  At this point, you can
either use your distribution's package manager to uninstall the previous
version or temporarily rename it to something like <KBD>mc.old</KBD>.
You should now be ready to start exploring mc!

<H2>The Midnight Commander Tour</H2>

<P>
Without trying to be exhaustive I'd like to touch on the following topics:

<UL>
	<LI>the mc interface
	<LI>directory navigation
	<LI>file selection
	<LI>basic file operations
	<LI>viewing and editing files
	<LI>using mc's panels
	<LI>VFS coolness
	<LI>popups, shortcuts, and a few more tricks
</UL>

and we'll finish with some closing remarks and suggestions.  My aim is to
cover the salient features and give you a feel for what mc is able to do.

<H3>The mc Interface</H3>

While mc has a number of command line options, in normal use simply type
<KBD>mc</KBD> at the command prompt to start it.  You can run mc either at the
console or in an xterm.  If you use mc under X then I'd strongly suggest that
you rxvt instead of an xterm as both the colors and line drawing characters
are well supported under rxvt.  As a side note, if you find that the line
drawing characters are not drawn correctly, then make sure that the TERM
environment variable has been set to &quot;xterm&quot;:

<PRE>
	$ echo $TERM
	linux

	(if this returns &quot;linux&quot; as above, then do the following:)
	
	$ export TERM=xterm
	$ echo $TERM
	xterm
	$ mc
</PRE>

At this point, you should see something like:

<P>
<IMG SRC="./gx/fisk/mc_main.gif" WIDTH=744 HEIGHT=394 ALIGN=BOTTOM>

<P>
This main screen is similar to what you'd see at the console (the window has
been sized to 80x24).  It's main components are:

<UL>
	<LI>menubar at the top which contains drop-down menus
	<LI>directory panels which contain file listings
	<LI>a &quot;hint line&quot;
	<LI>a command line
	<LI>function key labels at the bottom
</UL>

<P>
If you move the mouse around you should also see a pointer on the screen.
If you don't see a cursor when using mc at the console then make sure that the
gpm mouse server is running:

<PRE>
	$ ps -ax | grep gpm
   73  S0 S    0:00 /usr/bin/gpm -t ms 
  104  ?  SW   0:00 (gpm-root)
 5465  ?  D    0:00 grep gpm 
</PRE>

If it isn't then (assuming you're using a Microsoft-compatible serial mouse)
start it using <KBD>gpm -t ms</KBD>.  The &quot;-t&quot; option specifies the
type of mouse; if you're using a different kind of mouse then consult the gpm
manual page for the command line option to use.

<P>
To activate one of the menus you can either click on it with the mouse or hit
the F9 key and use the arrow keys to move the desired menu item.  This brings
up one of the important features of mc:  almost all operations can be
performed using either the mouse or via keystrokes.  Which method you use is a
matter of personal style and preference although, as we'll see in a bit, using
keystrokes can be a considerable time saver especially if you are a touch
typist.

<P>
The directory panels are where most of the action takes place.  mc is normally
run in this two-panel mode although single panel mode is also supported.
The panels provide a view of two directories at once with one of them being the
&quot;current directory.&quot;  Most all file operations are performed on files
in this current directory (although copy, rename, and move operations default
to using the non-current directory as the &quot;target&quot; directory).
To select one directory panel simply click the mouse anywhere in the panel.
You can also use the TAB key to switch the current directory from one panel
to the other.

<P>
The command line at the bottom functions just as you'd expect:  simply type
the command to execute and mc runs it just as if you'd entered it at the shell
prompt.  Just above the command line is the hint line (at the console; in an
xterm it uses the title bar) which displays a series of hints and suggestions.

<P>
Finally, the bottom line of the window display the function key mappings.
Pressing F1 brings up the Help menu, F2 brings up the User Menu, F3 let's you
view a file, and so forth.  Note that clicking on any of these with the mouse
results in the same action.

<P>
In addition to this main window there are a number of popup dialog boxes which
are used for specific operations.  I'll cover several of these shortly.  For
now, let's turn to issues of navigation.

<H3>Directory Navigation</H3>

Moving from one directory to another is quite simple:  in the current
directory panel you can either:

<UL>
	<LI>select a directory, by clicking on it with the mouse or moving to it
		using the arrow keys, and then hit RETURN
	<LI>double clicking on a directory using the mouse
	<LI>use the <KBD>cd</KBD> command in the command line
</UL>

Any of these methods will cause the directory you've selected to be listed
in the current directory panel.  Note that the <KBD>cd</KBD> command
understands &quot;tilde expansion&quot; which is a shortcut for referring
to your home directory -- <I>i.e.,</I> entering <KBD>cd ~/bin</KBD> would
change to the bin directory in your home directory.  Also, clicking on the
&quot;..&quot; entry will move to the current directory's parent as will
entering <KBD>cd ..</KBD> on the command line.  There is also a Directory
Hotlist which we'll look at shortly that helps speed directory navigation.

<P>
One other navigation aid to keep in mind is that movement within the directory
panels can be accomplished using a variety of keystrokes, many of which are
modeled after the emacs text editor.  These include:

<UL>
	<LI>down arrow, Ctrl-n - move forward one line
	<LI>up arrow, Ctrl-p - move backward one line
	<LI>Page Down, Ctrl-v - move back one screen
	<LI>Page Up, Alt-v - move backward one screen
	<LI>Home, Alt-&lt; - move to the top of the directory listing
	<LI>End, Alt-&gt; - move to the end of the directory listing
</UL>

Note that <I>Ctrl-n</I> means &quot;hold down the control key and hit the
letter n.&quot; There are a few other movement keystrokes available, but
these are the most commonly used.

<P>
Once you know how to move from one directory to another the next thing to do
is learn how to perform basic file operations.  But before doing that we'll
need to take a quick detour.

<H3>File Selection Mechanisms</H3>

Most of the time you'll be copying, renaming, deleting, or moving single files
and doing so is quite straightforward.  However, there will assuredly be times
which you'll want to do something to several files or a group of related
files.  Maybe you'll want to find an delete all the *.rej files after you've
run the patch program; or you want to find and move all *.tar.gz files to a
separate directory; or you want to copy selected documentation from a source
distribution to a /usr/doc directory for future reference.  All of these
require selection of a group of files.

<P>
First, we need to make a distinction between the currently selected file or
directory and <I>marked or tagged</I> files.  The currently selected file is
simply the one that is highlighted in the current directory panel.  If you
want to delete <KBD>foo.txt</KBD> simply move the highlight bar to that file
and hit F8 to delete it.  However, if you want to delete a group of files then
you'll need to <I>tag</I> them.

<P>
Tagging can be done in a couple ways.  The simplest is to either click on the
file or directory using the right mouse button or move the highlight bar to
the file and hit Ctrl-t (that is, hold down the control key and hit t).  In
this way you can tag any number of files for copy, deletion, moving, and so
forth.

<P>
If the files you want can be specified by a shell pattern (such as
<KBD>*.tar.gz</KBD> for all the gzipped tar files or <KBD>foo_??.txt</KBD> for
foo_01.txt, foo_02.txt, foo_03.txt, etc., then you can use the following
shortcuts:

<DL>
	<DT><B>To select a group of files by pattern hit the &quot;+&quot; key</B>
	<DD>This will cause a dialog box to appear in which you can enter the
		search pattern.  Note that entering the &quot;*&quot; wildcard will
		select all the files in the directory.
		<P>

	<DT><B>To select all the files in the directory hit the &quot;*&quot;
		key</B>
	<DD>This has the same effect as using the + key and then entering
		&quot;*&quot;
		<P>

	<DT><B>To unselect a group of files hit the &quot;\&quot; key or the
		&quot;-&quot; key</B>
	<DD>A dialog box similar to that with the + key will appear; if you want
		to unselect all files then enter &quot;*&quot;
		<P>
</DL>

<P>
Using pathname expansion (also known as filename globbing) is a fast and
powerful way to select a group of similar files.  Having now selected your
files, let's see what you can do with them.

<H3>Basic File Operations</H3>

The Midnight Commander provides all of the basic UNIX file system operations
including copy, delete, move, rename, link, symbolic link, chown, view,
and edit.  One of the nice features of mc is that it defaults to asking
for confirmation before taking destructive actions such as file deletion
or overwriting.This feature alone can save you a good deal of agony.

<P>
Below is a short summary of the file operations.  In the next section we'll
look specifically at file viewing and editing.  Keep in mind that while the
summary below indicates the keystrokes for the various operations, all of
these can be accessed using the &quot;File&quot; menu.

<DL>
	<DT><B>copy: F5</B>
	<DD>Normally, to copy a file from one directory to another select or tag
		the file(s) to copy in the current directory panel and change to the
		target directory in the other directory panel.  Hit F5 or click on the
		Copy function at the bottom.  Doing so brings up a dialog box:
		<P>

		<IMG SRC="./gx/fisk/mc_copy.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>
		
		<P>
		If you want to use a different directory than the one in the other
		panel or if you want to change the file name then you can use the
		to: entry box to do so.
		<P>

		Also, when you perform a copy (and move or delete) operation mc
		displays a dialog box with a progress meter indicating the progress on
		the current file as well as the overall progress if a set of files has
		been selected.
		<P>

	<DT><B>delete: F8</B>
	<DD>After selecting or tagging a file or set of files hit F8 to delete
		them.  Note that you'll be asked for confirmation.  Also, mc is able
		to recursively delete a directory, but this, too, requires
		confirmation.  If you're having to clean out a directory then I'd
		strongly suggest your using mc.  It makes selecting files very easy
		and helps prevent costly accidental deletions.
		<P>

		Note that at any time you can cancel an operation by hitting the
		Escape key twice.
		<P>

	<DT><B>move/rename: F6</B>
	<DD>These are very similar to the copy operation described above in that
		the destination directory defaults to the non-current directory in the
		case of the move operation.  Note that renaming a file entails
		&quot;moving&quot; it to another filename.  In this case, use the to:
		entry field in the dialog box to enter the new filename.
		<P>

	<DT><B>(hard) link: Ctrl-x l</B>
	<DD>To create a hard link to a file, select that file and enter Ctrl-x
		followed by the letter &quot;l&quot;.  A dialog box will prompt you
		for the filename for the newly created link.
		<P>

	<DT><B>symbolic link: Ctrl-x s</B>
	<DD>This is the same as that for a hard link except Ctrl-x is followed by
		the letter &quot;s&quot;.
		<P>

	<DT><B>chown: Ctrl-x o</B>
	<DD>To change the owner or group of a file hit Ctrl-x followed by an
		&quot;o&quot;.  A dialog box is presented that will allow you to select
		owner and group from a list of valid values.
		<P>

		Note that an &quot;Advanced Chown&quot; facility is available under
		the &quot;File&quot; menu.  Until you're rather sure of what you're
		doing, this is probably best left alone.
		<P>

	<DT><B>mkdir: F7</B>
	<DD>While not a file operation <I>per se</I>, the MkDir command allows you
		to create a new directory in the currently active directory.  A dialog
		box is presented that will prompt you for the new directory name.
		<P>
</DL>

<P>
With these basic facilities you'll be able to do a good deal of day to day
file system maintenance.  To round things out, though, we'll need to add a
couple other features.

<H3>File Viewing and Editing</H3>

The Midnight Commander comes with a very functional built in file viewer and
text/hex editor.  To view or edit a file hit the F3 or F4 key respectively.
Of particular note is the fact that mc provides formatting support for
several common file formats including manual pages, HTML, and mail file.  That
is, that rather than viewing the raw file, mc will format the file according
to the file format.

<P>
For example, to view a manual page (even a gzipped page!) simply select the
file and hit F3.  If you have the mc source distribution handy, change to the
doc directory and select the mc.1 file.  Hit F3 to see:

<P>
<IMG SRC="./gx/fisk/mc_view.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>

<P>
You can do similar things with HTML or mail files.  In the case of HTML files
it is worth noting that &quot;viewing&quot; the file is probably not what you
expect as mc will strip out the hypertext tags leaving just the text.  If you
want to view an HTML file it is best to select the file and hit the RETURN key.
Doing so &quot;opens&quot; the file and automatically executes (by default)
lynx if you are at a console or netscape if you are running under X.

<P>
The internal file view allows you to view files in one of two modes:  ASCII or
hex.  When using the file viewer you'll notice that the function keys at the
bottom change to a new set which are specific to the viewer.  These include:

<UL>
	<LI><B>F2</B> toggles line wrapping
	<LI><B>F3</B> exit the viewer
	<LI><B>F4</B> toggle hex view mode
	<LI><B>F5</B> goto line; a dialog box appears which will prompt you for a
				line number
	<LI><B>F6</B> regular expression search
	<LI><B>F7</B> normal search
	<LI><B>F8</B> toggle raw or parsed mode
	<LI><B>F9</B> toggle formated or unformatted mode: this affects attributes
		such as bold or underline which are displayed using various colors
	<LI><B>F10</B> exit the viewer
</UL>

<P>
In addition <B>Ctrl-s</B> and <B>Ctrl-r</B> can be used for normal or reverse
searches.  Once you've started a search, hit the letter <B>n</B> to find the
next match.  <B>Ctrl-l</B> will repaint the screen; <B>Alt-r</B> will toggle
the display of a ruler.

<P>
In terms of moving around the viewer, mc has a rather egalitarian attitude
and will accommodate almost any set of movement keystrokes that you've gotten
used including those for emacs, less, and even some vi.  Some of these are:

<UL>
	<LI><B>Home, Alt-&lt;</B> - move to head of file
	<LI><B>End, G, Alt-&gt;</B> - move to end of file
	<LI><B>up/down arrows</B> - move forward or backward a single line
	<LI><B>Ctrl-n, Ctrl-p</B> - move forward or backward a single line
	<LI><B>left/right arrows</B> - scroll horizontally
	<LI><B>Space, Page Down</B> - move forward one page
	<LI><B>b, Page Up</B> - move back one page
</UL>

<P>
One very handy feature is that, if you are in View mode and hit <B>Ctrl-f</B>
then the viewer will move to the next file in the directory and display it.
In this way you can easily move through a set of files, viewing one right
after the other.

<P>
The internal file editor provides a full set of editing features and can be
used to edit both text and binary files up to a size of 16 megabytes.  As with
the Viewer, function keys have been remapped to provide common file editing
functions.  In addition, a popup menubar provides extensive editing
operations including file insertion, save, copy, and load; block operations
(copy, move, etc); search/replace functions; command macro recording and
execution; and the capacity to pipe selected text through various shell
commands such as indent or fmt.  When not active, the menubar is hidden and
file information is displayed in the topmost line.  Here's a screen dump of
the editor in action:

<P>
<IMG SRC="./gx/fisk/mc_editor.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>

<P>
Both the internal Viewer and Editor are designed to be fast and easy to use.
You may, however, wish to use an external viewer (such as <I>more</I>,
<I>less</I>, or <I>most</I>) or editor.  To do so, you'll need to set your
PAGER and EDITOR environment variables to the appropriate program and then use
the Options->Configuration menu to unselect &quot;use internal edit&quot; or
&quot;use internal view&quot;.  If you were using the bash shell and wanted
to set the pager to &quot;less&quot; and the editor to &quot;emacs&quot;,
then use something like:

<PRE>
	$ export PAGER=less
	$ export EDITOR=emacs
</PRE>

<P>
To make this change permanent you'd probably want to add these lines to your
~/.bashrc or ~/.bash_profile file.  Having looked at the basic file operations
let's return to mc itself and take a look at some of its other features.

<H3>Using mc's Panels</H3>

We've already noted that the directory panels are where most of the
action takes place in terms of file operations.  Accordingly there are a
number of keystroke (and mouse) shortcuts that quickly let you change the
panel view.  In addition to directory listings, the panels can be quickly
changed to display directory trees, quick file views, or extensive
file information.  If you spend much time at all working with files these
features are invaluable.

<H4>Basic Panel Operations</H4>

<P>
As previously noted, you can quickly switch from one panel to the other
using the <B>TAB</B> key (or <B>Ctrl-i</I>).  You can also <I>swap</I>
panels using <B>Ctrl-u</I>; note that the currently active directory panel
does not change.  Use <B>Ctrl-r</B> to refresh the directory display.

<P>
To change the sort order of the files being displayed, use the
<B>(Left|Right)-&gt;Sort Order...</B> menu item.  This allows you to sort
files by name, size, various time stamps, inode number, and so forth.
You can also specify whether sorting should be case (in)sensitive or
reversed.  Sorting by size is very useful when trying to cull out files to
recover disk space; sorting by date is useful when you are searching for a
recently installed, created, or modified file in a directory with many files
or are looking for ancient files that can safely be warehoused.

<P>
As with sorting, use the <B>(Left|Right)-&gt;Filter...</B> menu item to
filter the directory listing using shell patterns.  For instance, suppose
that you wanted a listing containing only files with a .c extension.
In the Filter dialog simply enter &quot;*.c&quot; and all other files
are removed from the listing.  This is very useful when you wish to
work with only a subset of files in a directory in an uncluttered setting.

<P>
You can also cycle from two-panel to single-panel modes using <B>Alt-t</B>.
This is particularly useful when you need to see the full directory
information for a particular file.  Note that you can also use the
<B>(Left|Right)-&gt;Listing Mode...</B> menu item to customize what file
information the panel lists.  In addition, resize the panels using the
<B>Options-&gt;Layout...</B> menu item.  This allows you to split the panels
either vertically or horizontally as well as set the number of columns for
each panel using the &quot;&gt;&quot; and &quot;&lt;&quot; keys.

<H4>Panel Modes</H4>

Here's where the power of mc becomes apparent.  The panels can be used in one
of four modes which can be switched using the <B>(Left|Right)</B> menus:

<DL>
	<DT><B>Listing Mode...</B>
	<DD>This is the default directory listing mode.  As noted above, you can
		customize what file information (name, permissions, time stamps, etc)
		is displayed
		<P>

	<DT><B>Quick View...</B>
	<DD>Provides a quick file viewer; it displays the file which has been
		selected in the other panel.  This is very handy if you need a quick
		preview of a set of files.  Note that the function key mappings at the
		bottom of the window display the usual viewer operations:  all of the
		viewer features and keystrokes are available here.  When previewing a
		set of files try increasing the size of the viewing panel using the
		<B>Options-&gt;Layout...</B> menu item.
		<P>

	<DT><B>Info</B>
	<DD>This works in a manner similar to Quick View:  it displays a wealth of
		file or directory information.
		<P>

	<DT><B>Tree</B>
	<DD>As with Quick View and Info, the Tree view works with the other panel:
		it allows you to quickly navigate through the entire directory tree.
		By double clicking on a directory (or selecting it and hitting RETURN)
		its contents are displayed in the other panel
		<P>
</DL>

<P>
One final shortcut to be aware of is <B>Alt-o</B> which makes use of both
panels:  by selecting a directory in the active panel and hitting Alt-o, its
directory listing is displayed in the other panel.  Hitting Alt-o repeatedly
lets you quickly preview through a series of directories.

<P>
Another powerful feature of mc is its ability to handle a multitude of archive
types:  this feature alone makes it a &quot;must have&quot; utility!

<H3>VFS Coolness!</H3>

<P>
VFS refers to the &quot;Virtual File System&quot; which mc implements.  It is
a powerful abstraction that allows you to view archives as though they were a
directory:  all the basic file manipulation operations can then be applied.
The VFS file system handles an extraordinary number of archive types including
<B>tar</B>, <B>gzipped or compressed tar</B>, <B>RedHat's rpm package
archives</B>, <B>Debian's deb package archives</B>, <B>gzip</B>, <B>zip</B>,
<B>zoo</B>, <B>cpio</B>, <B>rar</B>, and <B>lha</B>.

<P>
To use it either select the file and hit RETURN or double click on the file.
It's contents are then displayed as a directory listing.  Navigation through
the archive is the same as you'd use for a directory.  This is a very useful
feature when you need a single file or set of files from an archive.  Note
that if the archive is a compressed single file -- <I>i.e.,</I> a gzip, zip,
zoo, or lha compressed file -- then it is uncompressed and displayed.

<P>
The VFS also supports its own FTP capacity which allows you to transparently
manipulate files via FTP as though they were local to your machine.  To log
into an FTP server use the <B>(Left|Right)-&gt;FTP Link...</B> menu item and
enter the URL or simply enter <KBD>cd ftp://&quot;URL&quot;</KBD> at the command line.
For example, to ftp to the Linux Incoming directory at sunsite you would
enter:

<PRE>
	$ cd ftp://sunsite.unc.edu/pub/Linux/Incoming/
</PRE>

The hintbar at the console or the title bar under X will display progress
information (<I>e.g.,</I> logging in, retrieving directory listings, and so
forth).  You can now view and copy files just as you would using ftp.  On file
transfer (use F5 to &quot;Copy&quot; the file to your local machine) a
progress meter displays percent transfer completed, ETA (estimated time of
arrival), transfer rate, and the now commonplace &quot;stalled&quot; flag.
Use the <B>Options-&gt;Virtual FS...</B> menu item to customize the VFS
features such as anonymous login name and so forth.

<P>
<IMG SRC="./gx/fisk/mc_ftp.gif" ALIGN=BOTTOM WIDTH=744 HEIGHT=394>

<P>
Note that mc also provides FTP service via a proxy server as well as network
VFS.  Having no experience with either of these I'll defer comment and simply
refer you to mc's manual page if you are interested.

<H3>Popups, Shortcuts, and a Few More Tricks...</H3>

<P>
In this last section let's look at a few more shortcuts and suggestions for
using mc effectively.

<P>
A number of popups are built into mc that considerably speed up various
operations.  These include:

<DL>
	<DT><B>Directory Hotlist: Ctrl-\</B>
	<DD>Use this to create a popup hotlist of frequently accessed directories.
		The hotlist keeps a list of &quot;alias-directory path&quot; pairs.
		For example, if you use /usr/local/projects/C++/personal/ to store your
		personal programming projects then you could create an entry using the 
		&quot;New Entry&quot; option and alias it to something like &quot;Personal
		C++ Projects&quot;.
		<P>

		If you use mc as an ftp client then you can use the directory hotlist
		to keep the URL's for your frequented sites!  To edit (add, modify, or
		delete entries) the list type in <B>Ctrl-\</B> and then use &quot;New
		Entry&quot; to create a new entry:  enter the URL for the site,
		including the path to the directory that you're interested in and then
		fill in the alias.  Now, anytime that you need to ftp just popup the
		hotlist and select the site!
		<P>

	<DT><B>Filename Search: Ctrl-s, Alt-s</B>
	<DD>At the bottom of each directory panel is a mini-status box which lists
		the currently selected file or directory name.  By hitting Ctrl-s or
		Alt-s the status box becomes an entry box in which you type in a file
		or directory name to search for.  As you type, mc does an incremental
		search and automatically selects the file which matches the search.
		This is very handy when searching for a particular file in a large
		directory.
		<P>

	<DT><B>Find File: Alt-?</B>
	<DD>Find File provides an exceptionally fast and useful means of searching
		for a particular file based on a filename pattern, its contents, or
		both!  For example, suppose that you kept a directory with USENET
		postings that you wanted to save and you're now looking for
		information on <I>mysql</I>.  Use Find File with the &quot;*&quot;
		pattern for the filename and &quot;mysql&quot; for its content.  It
		will then grep through the files and create a list of files containing
		&quot;mysql&quot;.  Clicking on one of the files in the list selects
		that file.
		<P>

		Alternatively, if you were looking for all files with
		&quot;announce&quot; in the filename simply enter
		&quot;*announce*&quot; in Filename: (and leave the Content:
		entry box empty).
		<P>

	<DT><B>Active VFS Directories: Ctrl-x a</B>
	<DD>This pops up a dialog box listing all of the active VFS directories
		including those associated with FTP, archives, and so forth.  When mc
		creates a VFS directory for an archive, network, or ftp connection,
		when you leave the directory the connection or resources are not
		immediately freed.  So, for example, if you created an ftp connection
		to some host, you &quot;close&quot; it simply by changing back to a
		local directory.  Until the connection times out (which you can set
		using the <B>Options-&gt;Virtual FS...-&gt;Timeout for freeing VFS's</B>
		menu item) you can reestablish the connection once again.  This also
		works for archives (in this case, after the timeout, the memory
		resources are deallocated).
		<P>

	<DT><B>Background Jobs: Ctrl-x j</B>
	<DD>mc allows you to put copy and move operations into the background
		(select this option from the Copy or Move dialog box) which allows you
		to immediately return to mc.  This is useful when you are
		copying/moving a large number of files or for ftp.  Use the Background
		Jobs popup to quickly see what jobs are running and stop, restart, or
		kill them
		<P>
</DL>

<P>
Another very handy feature which mc provides is subshell support.  The way
this works is by hitting <B>Ctrl-o</B> which creates a non-login interactive
shell.  This works for bash, tcsh, and zsh shells.  Use this shell just as you
would any ordinary shell.  To immediately switch back to mc hit Ctrl-o once
again, which allows you to toggle back and forth easily.

<P>
If you are using the bash shell, keep in mind that non-login interactive
shells only source your ~/.bashrc file (and not the ~/.bash_profile file)
which means that if you have aliases or other customizations that you want to
use then you should put these in ~/.bashrc.  For example, if you use color-ls
and find that file listings are not colorized, then you'll need to add
<KBD>alias ls='ls --color=tty'</KBD> to your ~/.bashrc.

<P>
One way to quickly create the &quot;all-in-one-command-center&quot; is execute
mc and then start a subshell.  From here, you can execute your favorite editor
(emacs, xemacs, vim, etc.) and hit <B>Ctrl-z</B> to stop its execution and put
it in the background.  This returns you to the shell.  Now, if you need to run
mc then hit Ctrl-o; if you need to use your editor, type in <KBD>fg</KBD>
which will resume the stopped program; and if you need to run any other
program then use the shell as normal.  This is a powerful means of keeping
productivity tools readily available.

<P>
One last feature I'd like to mention is mc's ability to help you sync
the contents of two directories.  This is particularly useful if you are
keeping a backup set of files on another partition, a floppy, zip drive,
etc.  To use this list the &quot;source&quot; directory in one panel and the
&quot;target&quot; directory in the other then hit <B>Ctrl-x d</B>.  This will
pop up a dialog box that allows you to select the type of directory comparison:
<B>Size</B> simply compares files by size; <B>Quick</B> compares files by size
and date; and <B>Thorough</B> does an exhaustive byte-by-byte comparison.
After the comparison operation is complete (and after ensuring that the
<I>source</I> directory is in the active directory panel) hit F5 (Copy)
to copy files from your source directory to the target (backup) directory.

<H3>Closing Comments and Suggestions</H3>

I'd be remiss if I did not mention that mc comes with a very complete online
help system which is accessed using <B>F1</B>.  All of the information
presented above, and a good deal more, can be accessed at any time from within
mc using the help facility.  Additional information can be found in the source
distribution for mc: read the README, FAQ, and documents in the /doc
directory.

<P>
While I've attempted to cover most of the important features which mc offers
there are many more that I've not had time to cover that I'll leave for you to
discover!  One suggestion would be to print out a copy of the mc manual page:

<PRE>
	man mc | col -b | lpr -

	-OR-

	man mc | col -b > mc.txt
</PRE>

will print a copy of the manual page or save it to a text file which can be
further processed.  Since the manual is quite long you might want to use a
program such as <B>a2ps</B> which converts ASCII files into Postscript.  As
with most UNIX-type programs, a2ps has a slew of command line options
including the <KBD>-f</KBD> option which lets you specify the font size:
select something in the range of 7.0 to 9.0 to get a small font which cuts
down on the number of pages and leaves large margins in the sides for you to
scrawl notes in.

<P>
Also, while you are exploring, look through the <B>Options</B> menu for
various items which will let you customize mc.  Menus are a great place to
poke around and see what facilities mc offers:  most of the shortcut keystrokes
I've mentioned are menu items (so you don't have to memorize the entire list
of keystrokes!).  For the adventurous:

<UL>
	<LI>Have a look at the undelete file system if you are using ext2 under
		Linux.  You'll need the ext2progs distribution and libext2fs.a to
		compile this support into mc.
		<P>
	<LI>Read about customizing the User Menu (this requires some knowledge of
		shell programming and so was skipped in this introduction).
		<P>
	<LI>Read about customizing the Extension file which associates a file
		extension with various actions (such as &quot;viewing&quot; or
		&quot;opening&quot;).
</UL>

<P>
Finally, enjoy mc!  As with many powerful programs, you'll most likely learn
it incrementally, often just through the process of exploration and
&quot;playing with it.&quot;  I've found mc to be indispensable and, with a
bit of experience, I suspect that you will as well.  Have fun!

<P>
<FONT SIZE=-1>
Date Last Modified: $Date: 2002/10/09 22:24:22 $
</FONT>

<H4>
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<CENTER>
<IMG ALT="Linux Weekend Mechanic" SRC="../gx/fisk/wkndMech.gif" ALIGN=BOTTOM 
WIDTH=397 HEIGHT=150>
<H1>Welcome to The Linux Weekend Mechanic!</H1>
<H2>Published in the December, 1997 Edition of the Linux Gazette</H2>
<FONT SIZE="2"><B>
Copyright &#169; 1997 John M. Fisk &lt;fiskjm@ctrvax.vanderbilt.edu&gt;<BR>
The Linux Gazette (tm) is Copyright &#169; 1997 <A HREF="http://www.ssc.com/">
Specialized Systems Consultants Inc.</A>
</B></FONT>
</CENTER>

<P><HR><P>

<!-- WELCOME SECTION ================================================== -->
<CENTER>
<A NAME="welcome">
<IMG SRC="../gx/fisk/welcome2.gif" WIDTH=555 HEIGHT=131 ALIGN=TOP 
	ALT="Welcome to the WM"></A>
</CENTER>

<P>
Hello y'all!  Thanks for dropping in.  I'm afraid that this month's weekend
mechanic is going to be a bit sparser that usual.  This semester has been a
good deal more challenging than previous.  I've been taking Compiler Design,
Database Design, Computer Graphics (X Window based course), and Differential
Equations and I'm really starting to &quot;suck wind&quot; about now (and I
see <I>lots</I> of knowing smiles and folks waving white hankies out in the
audience :-).  To all of you in school, my sincerest best wishes!

<P>
And once again, my 'ol Linux box has pulled though in the clutch.  I've been
leaning on it pretty heavily this semester and it's shown what a fantastic
work horse it really is.

<P>
In the compiler class we're building a &quot;baby Pascal-like&quot; compiler
using C++ and while others sit for endless hours in the computer lab hacking
away on the HP system at school, I've been sitting for endless hours hacking
comfortably at home on my Linux box!  It doesn't make the hours fewer, but
it sure makes them more enjoyable!  I've also been playing around with <A
HREF="http://www.postgresql.org/">PostgreSQL 6.2</A> and 
<A HREF="http://www.tcx.se/">MySQL</A> RDBMS's and they have been a HUGE
amount of fun and a great means of learning SQL and database design.  When
things here settle down a bit I'll be writing a bit about these.

<P>
For my DiffEq class I finally broke down and purchased the venerable
<A HREF="http://www.wolfram.com/">Mathematica 3.0 for Linux</A> from the
good folks at Wolfram Research.  This has been a godsend and a wonderful toy
to tinker with!  I'll refrain from getting on the soap box about this one, but
will say that it is a fantastic program and would HIGHLY encourage anyone in a
mathematics-oriented discipline to invest in it.  For the curious, here's a
&quot;hot off the press&quot; screen-shot of what I've been up to this weekend:
plowing through a DE take-home exam (and don't worry, our instructor, who's a
delightful and brilliant guy, gave us the OK to use &quot;whatever technology
you have at your disposal...&quot; :-)

<P>
Here's the obligatory thumbnail: click on it to get the full (~88K) 1024x768
effect - kinda like being there...!

<P>
<A HREF="./gx/fisk/mathematica.gif">
<IMG SRC="./gx/fisk/mathematica_icon.gif" WIDTH=100 HEIGHT=75>
</A>

<P>
For the curious, this was the question about a damped oscillator whose angle
of deflection was given by the equation:

<PRE>
	&Oslash;'' + 0.25 &Oslash;' + sin&Oslash; = 0
</PRE>

In which &Oslash; is meant to be theta, the angle of deflection.  The graph is
the time series plot of the corresponding system of non-linear differential
equations with starting values at (0,2), (0,3), and (0,4).  Mathematica has
been fantastic and, more to the point, they provide a Linux Student Version.
If you're serious about wanting to see high quality software for Linux, then
&quot;speak with your feet&quot; (or rather, your wallet :-).  If I were doing
the <I>Tucows</I> thing, these guys would get the whole herd!

<P>
And finally, I've been doing a slew of X window based programming using Xlib
and now Motif for my Computer Graphics course.  Once again, Linux has meant
being home at night rather than 40 miles away sitting in the student lab
hacking on the X system at school.  I've mentioned it before but it's worth
repeating good praise:  I bought <A HREF="http://www.redhat.com/">RedHat</A>
Motif 2.0 a couple years ago at the Linux Expo and haven't had a single problem
with it despite a good deal of use.  If you're shopping for Motif then I'd
definitely have a look at this product.  On the other hand, I've heard reports
that the &quot;Hungry Programmers&quot; have been making serious strides in
bringing the LessTif product to maturity.  Here's a quote from a recent 0.81
distribution:

<PRE>

LessTif 0.81 has just been released.  LessTif is a freely available Motif
clone.  It is going to be source level compatible with Motif 1.2. It is
distributed under the terms of the GNU Library General Public License (LGPL).
LessTif is available from the following URL's

<A HREF="http://www.hungry.com/products/lesstif/">
http://www.hungry.com/products/lesstif/</A>
<A HREF="ftp://ftp.hungry.com/pub/hungry/lesstif/">
ftp://ftp.hungry.com/pub/hungry/lesstif/</A>
or
<A HREF="http://www.lesstif.org/products/lesstif/">
http://www.lesstif.org/products/lesstif/</A>
<A HREF="ftp://ftp.lesstif.org/pub/hungry/lesstif/">
ftp://ftp.lesstif.org/pub/hungry/lesstif/</A>
</PRE> 

I haven't had a chance yet to compile and install it but a number of programs,
such as the latest DDD debugger, claim to be compilable using Lesstif.

<H3>And Now For Our Feature Presentation...</H3>

<P>
As I mentioned above, time has been a bit short here recently although over a
short Fall Break a couple weeks ago I did manage to write up a short article
for the <A HREF="http://www.ssc.com/lj/">Linux Journal</A> on the <B>Midnight
Commander</B> file manager.  They have very graciously allowed me to include
the full text of this here.  This is the unedited, first-draft copy that was
sent to them, so all the typos and other egregiosities are solely mine.  I
have long wanted to write about this fantastic file manager which, in my book,
is a definite &quot;must have&quot; app on every Linux system.  This is geared
towards an introduction/overview, and while admittedly not encyclopedic, it
does cover most of the highlights (I think... :-)  Here it is:

<H3><A HREF="./wkndmech_dec97/mc_article.html">An Introduction to the Midnight
Commander</A></H3>

<P><HR><P>

<!-- CLOSE UP SHOP ================================================ -->
<CENTER>
<A NAME="closeup">
<IMG SRC="../gx/fisk/closing.gif" WIDTH=555 HEIGHT=95 ALIGN=BOTTOM 
	ALT="Closing Up Shop">
</A></CENTER>

<P>
Again, I apologize for such a short column after so long a hiatus.  As all
of the graduating seniors will attest, the final semester usually packs quite
a wallop and mine has been no different.  Good news is, by the time you read
this I'll be nearly done:  GRE Comp Sci Subjects are on December 13th at 2:00
PM.

<P>
And then... sleep :-)

<P>
I'll be working with the good folks in
<A HREF="http://www.mc.vanderbilt.edu/">Biomedical Informatics at the
Vanderbilt University Medical Center</A> here in Nashville for the following
six months or so and then, hopefully, I'll be starting a Medical Informatics
fellowship or MS program in Comp Sci somewhere.  In the interim, I have a
large and growing list of backlogged projects and things I'd like to read
up on, tinker with, and learn about.  By January, I'm hoping to have the
Weekend Mechanic column back up to speed.

<P>
My deepest and sincerest thanks to <B>Marjorie Richardson</B> and the rest of
the crew at <A HREF="http://www.ssc.com/">Specialize Systems Consulting</A>
who have worked extraordinarily hard at providing the Linux Gazette.  Special
thanks are also deserving to <B>Mr. Richardson</B>, who has shouldered the
burden of &quot;Linux Gazette Editor&quot; this month!

<P>
Finally, from our home to yours, we want to wish y'all a very wonderful and
joyous Christmas Season.

<P>
John &amp; Faith Fisk<BR>
Nashville, TN<BR>

<!-- END CLOSE UP SHOP ================================================ -->

<P><HR><P>
<CENTER>
<IMG SRC="../gx/fisk/mailme2.gif" ALT="Mail Me a Note" ALIGN=BOTTOM WIDTH=398 
HEIGHT=54><BR>
</CENTER>

<P>
Got any comments, suggestions, criticisms or ideas?<BR>
Feel free to drop me a note at:<BR>
<ADDRESS> John M. Fisk 
<A HREF="mailto: fiskjm@ctrvax.vanderbilt.edu">
&lt;fiskjm@ctrvax.vanderbilt.edu&gt;</A>
</ADDRESS>

<P>
<FONT SIZE=-1>
Document Information:<BR><B>
$Id: issue23.html,v 1.2 2002/10/09 22:24:22 lg Exp $
</B>
</FONT>

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, John M. Fisk <BR> 
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./successtory.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./x3270.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 

<H4>
&quot;Linux Gazette...<I>making Linux just a little more fun!</I>&quot;
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H2>x3270 and Linux</H2>
<H4>By Chris Mason,
<a href="mailto:h.c.mason@lmco.com">h.c.mason@lmco.com</a></H4>
</center>

<P> <HR> <P> 
Everyday I have to logon to The MVS (Multiple Virtual Storage) Operating
System and edit COBOL (Common Business Oriented Language) program source code.
When I first started being a COBOL programmer in 1985, we all used dumb
terminals such as the IBM 3278.  As time passed, people starting getting
IBM PC compatibles and such things as IRMA cards were used to connect 
the IBM PC to the Mainframe and make it look like a dumb terminal.

<P>After receiving an IBM PC compatible myself, I added an extra SCSI
harddisk and installed Linux.  Using Linux's TCP/IP capability,
and the driver for the 3COM ethernet card in the computer, I was
able to connect Linux to the network.

<P>I began to try to logon to the IBM Mainframe.  I found that there
were several differences between the standard Telnet VT100 terminal
model and the IBM 3270 terminals.  I needed a new tool so that I
could use the features of the IBM 3270 such as function keys.

<P>Fortunately, there are two tools to emulate the IBM 3270 type
terminal.  One is known as tn3270, and the other is x3270.

<P>X3270 is a program that is available with man Linux distributions
and is available on ftp.x.org and other mirror sites.

<P>As a mainframe programmer, I have noticed the following advantages
over a dumb terminal:
<OL>
<LI>x3270 can print the screen contents on a network printer and
is easily configurable.
<LI>Key strokes can be mapped to the 3270 keys.
<LI>x3270 can operate under a script, or run a script, allowing
automated logons and data entry tasks.
<LI>There is a type-ahead feature.  The dumb terminal won't accept
extra characters, but linux will.
</OL>
<P>X3270 comes with various resources that can be configured by
the user.  Here is contents of my .Xdefaults file apropos x3270:

<pre>! Set the font used in the x3270 screen:
x3270.emulatorFont:    3270-12
! Set the model of 3270 family terminal
x3270.model:   3
! Set the default print command:
x3270.printTextCommand: lpr -Psmb
! Set the keymap translation to use.  I found hp-pc to be the most
! compatible:
x3270.keymap:     hp-pc
! The below is a user keymap which allows me to override the
! default keymapping.  This way I can set the previous (page up)
! key to PF7 which is set to PREV on most ISPF edit panels,
! and page down to PF8 which is DOWN on edit
! EraseEOF is a function to erase a field to end of field
! here I map both ctrl delete and alt delete to this function.
x3270.keymap.hp-pc.user: \
   &lt;Key&gt;Prior:     PF(7)\n\
   &lt;Key&gt;Next:      PF(8)\n\
   Ctrl&lt;Key&gt;Delete:    EraseEOF()\n\
   Meta&lt;Key&gt;Delete:    EraseEOF()\n
</pre>
<P>X3270 has several other features.  One nice feature is the file
/usr/lib/X11/x3270/ibm_hosts which contains a list of IBM hosts
to appear on a logon menu.

<P>I would say that this is a great program and makes logining on to
an IBM Mainframe a breeze.

<P>X3270 comes with manual pages and some documentation.  Here are the
copyrights from the x3270 manual page:

<P><B>COPYRIGHTS</B>
<P>Modifications Copyright 1993, 1994, 1995, 1996, 1997 by Paul Mattes.
Original X11 Port Copyright 1990 by Jeff Sparkes.
Permission to use, copy, modify and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in supporting
documentation.
<P>Copyright 1989 by Georgia Tech Research Corporation, Atlanta, GA 30332.
All rights Reserved.  GTRC hereby grants public use of this software.
Derivative works based on this software must incorporate this copyright
notice.

<!--===================================================================-->
<P> <hr> <P> 
<center><H5>Copyright &copy; 1997, Chris Mason<BR> 
Published in Issue 23 of the Linux Gazette, December 1997</H5></center>

<!--===================================================================-->
<P> <hr> <P> 
<A HREF="./index.html"><IMG ALIGN=BOTTOM SRC="../gx/indexnew.gif" 
ALT="[ TABLE OF CONTENTS ]"></A>
<A HREF="../index.html"><IMG ALIGN=BOTTOM SRC="../gx/homenew.gif"
ALT="[ FRONT PAGE ]"></A>
<A HREF="./wkndmech_dec97/wkndmech.html"><IMG SRC="../gx/back2.gif"
ALT=" Back "></A>
<A HREF="./lg_backpage23.html"><IMG SRC="../gx/fwd.gif" ALT=" Next "></A>
<P> <hr> <P> 
<center>
<H1><IMG SRC="../gx/backpage.gif" alt="Linux Gazette Back Page"></H1>

<H5>Copyright &copy; 1997 Specialized Systems Consultants, Inc.<br>
For information regarding copying and distribution of this material see the
<A HREF="../copying.html">Copying License</A>.</H5>
</center>

<P> <hr> <P> 

<H3>Contents:</H3>
<ul>
<li><a HREF="./lg_backpage23.html#authors">About This Month's Authors</a>
<li><a HREF="./lg_backpage23.html#notlinux">Not Linux</a>
</ul>

<a name="authors"></a>
<P> <HR> <P> 
<!--======================================================================-->

<center><H3> About This Month's Authors </H3></center>

<P> <HR> <P> 
<!--======================================================================-->

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Wayde Allen</H4>
Wayde Allen is an Electrical Engineer involved with the maintenance and
development of the U.S. primary rf power standards at the National
Institute of Standards and Technology (NIST).  He has been using Linux
as his primary computing platform for about three years, and was
instrumental in the formation of the Boulder Linux Users Group. 

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Larry Ayers</H4>
Larry Ayers lives on a small farm
in northern Missouri, where he is currently engaged in building a
timber-frame house for his family. He operates a portable band-saw mill,
does general woodworking, plays the fiddle and searches for rare
prairie plants, as well as growing shiitake mushrooms. He is also
struggling with configuring a Usenet news server for his local ISP.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Andr&eacute; D. Balsa</H4>
Andr&eacute; Balsa lives in France, 80 miles south of Lyon. He currently runs
a small Internet consulting business. When not busy exploring Linux
performance issues, Andrew likes to spend his time with his 1-year old
daughter, or else try different French recipes on his friends.
He also helped set up the Linux Benchmarking Project pages at
<A HREF="http://www.tux.org/bench/">http://www.tux.org/bench/</A>.
and a web site at <A HREF="http://www.tux.org/~balsa/linux/cyrix">
http://www.tux.org/~balsa/linux/cyrix</A>,
about the use of Cyrix 6x86 processors with Linux,
which has had more than 9,000 visitors in less than two months uptime.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Chris Baron</H4>
Chris is employeed as IBM Mainframe COBOL Programmer at Lockheed-Martin
in Sunnyvale, California.  His e-mail is <a
href="mailto:h.c.mason@lmco.com">h.c.mason@lmco.com</a>. 
He works as an IBM Mainframe COBOL Programmer and use an Application
under linux called x3270.  Perhaps others might be interested
in using this program because IBM 3270 terminals are hard to come by.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Jim Dennis</H4>
Jim Dennis 
is the proprietor of <A href="http://www.starshine.org">
Starshine Technical Services</A>.
His professional experience includes work in the technical 
support, quality assurance, and information services (MIS)
departments of software companies like 
<A href="http://www.quarterdeck.com"> Quarterdeck</A>, 
<A href="http://www.symantec.com"> Symantec/
Peter Norton Group</A>, and 
<A href="http://www.mcafee.com"> McAfee Associates</A> -- as well as 
positions (field service rep) with smaller VAR's.
He's been using Linux since version 0.99p10 and is an active
participant on an ever-changing list of mailing lists and 
newsgroups.  He's just started collaborating on the 2nd Edition
for a book on Unix systems administration.
Jim is an avid science fiction fan -- and was
married at the World Science Fiction Convention in Anaheim.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Carlie Fairchild</H4>
Carlie Fairchild is an Advertising Representative and Marketing expert for
<I>Linux Journal</I>.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">John M. Fisk</H4>
John Fisk is most noteworthy as the former editor of the <I>Linux Gazette</I>.
After three years as a General Surgery resident and
Research Fellow at the Vanderbilt University Medical Center,
John decided to &quot:hang up the stethoscope&quot:, and pursue a
career in Medical Information Management. He's currently a full
time student at the Middle Tennessee State University and hopes
to complete a graduate degree in Computer Science before
entering a Medical Informatics Fellowship. In his dwindling
free time he and his wife Faith enjoy hiking and camping in
Tennessee's beautiful Great Smoky Mountains. He has been an avid Linux fan,
since his first Slackware 2.0.0 installation a year and a half
ago.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Michael J. Hammel</H4>
Michael J. Hammel,
is a transient software engineer with a background in
everything from data communications to GUI development to Interactive Cable
systems--all based in Unix. His interests outside of computers
include 5K/10K races, skiing, Thai food and gardening. He suggests if you
have any serious interest in finding out more about him, you visit his home
pages at http://www.csn.net/~mjhammel. You'll find out more
there than you really wanted to know. 

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Mike List </H4>
Mike List is a father of four teenagers, musician, printer (not
laserjet), and recently reformed technophobe, who has been into computers
since April,1996, and Linux since July.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Giampaolo Montaletti</H4>
The old Monty is living in Italy and is a 36 years old guy, working as an
economist at the <a href="http://www.rer.camcom.it">Regional association
of the Chamber of Commerce</a> in Bologna (do you know Rimini?).
The old Monty is  manager for many projects involving networks,
intranets, electronic commerce and so on, many of them granted by European
and national foundations. He like to eat, drink red wine and apple
distilled calvados.

<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Jesper Pedersen</H4>
Jesper Pedersen lives in Odense, Denmark, where he has studied computer science
at Odense University since 1990. He expects to obtain his degree in a year and
a half. He has a great job as a system manager at the
university, and also teaches computer science two hours a week. He is very 
proud of his &quot;child,&quot; The Dotfile Generator, which he wrote as part of his
job at the university. The idea for it came a year and a half ago, when he had
to learn how to configure Emacs by reading about 700 pages of the lisp manual.
It started small, but as time went by, it expanded into a huge project.
In his spare time, he does Yiu-Yitsu, listens to music, drinks beer and has fun with
his girl friend. He loves pets, and has a 200 litre aquarium and two very cute
rabbits.

<a name="notlinux"></a>
<P> <hr> <P> 
<!--====================================================================-->

<center><H3> Not Linux </H3></center>

<P> <HR> <P> 
<!--======================================================================-->
<P>
Thanks to all our authors, not just the ones above, but also those who wrote
giving us their tips and tricks and making suggestions. Thanks also to our
new mirror sites.
<P>
<IMG ALIGN=bottom ALT="" SRC="../gx/rose.gif">
While I'm passing out thanks I must include Amy Kukuk and Margie
Richardson,
who have done much of the work to get this issue out. Margie has been
working hard to get me up to speed on this task, but I've still a ways to
go. My professional background has been in the oil business as a
geophysicist, where I usually worked on dumb terminals connected to IBM
mainframes or Digital minicomputers. At home I've been a Macintosh man for
many years, so learning Linux/Unix, vi and HTML all at once has been, shall
we say, exciting.
<p>
As Margie has indicated in the past, we share a passion for the outdoors
which we satisfy via camping and motorcycling. With winter close upon us now my
adult son, Keith, and I will likely turn to cross country skiing in favor
of motorcycling. Although I've not done so lately, I also fly as a private
pilot and am rated for both single engine land and sea planes.
<p>
<IMG ALIGN=right ALT="Turkey" SRC="./gx/turkey.gif">
This last week of the month of November Margie and I indulged in that most American of
pastimes--eating too much at the Thanksgiving table. We split cooking duties
with my sister, Roxanne, who also hosted. The afternoon was grand, the
food great, and we even came home with enough leftover turkey meat
for several days worth of sandwiches. 
<p>
As a final note, Margie and I will be out of town for the Christmas
holidays, so expect the next issue of <i>Linux Gazette</i> to be a little
late coming out.
<p>
Have fun!

<P> <hr> <P> 
Riley P. Richardson<br>
Editor, <i>Linux Gazette</i> <A HREF="mailto:gazette@ssc.com">gazette@ssc.com</a>

<P> <HR> <P>
<!--====================================================================-->
<A HREF="./index.html"><IMG SRC="../gx/indexnew.gif" ALT="[ TABLE OF 
CONTENTS ]"></A>
<A HREF="../index.html"><IMG SRC="../gx/homenew.gif" ALT="[ FRONT 
PAGE ]"></A> 
<A HREF="./x3270.html"><IMG SRC="../gx/back2.gif" ALT=" Back "></A>
<p><hr><p>
<I>Linux Gazette</I> Issue 23, December 1997, <A
HREF="http://www.linuxgazette.com/">http://www.linuxgazette.com/</A><BR> 
This page written and maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<P> 
</BODY>
</HTML>