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
|
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename scli.info
@settitle SNMP Command Line Interface
@finalout
@setchapternewpage odd
@c %**end of header
@set VERSION 0.3.1
@ifinfo
@format
@dircategory Net Utilities:
@direntry
* scli: (scli). SNMP Command Line Interface
@end direntry
@end format
This file documents the @code{scli} SNMP command line interface.
Copyright (C) 2001-2004 J@"urgen Sch@"onw@"alder
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
by the Foundation.
@end ifinfo
@titlepage
@title SNMP Command Line Interface
@subtitle for @code{scli} Version @value{VERSION}
@author by J@"urgen Sch@"onw@"alder
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 2001-2002 J@"urgen Sch@"onw@"alder
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation approved
by the Foundation.
@end titlepage
@c All the nodes can be updated using the EMACS command
@c texinfo-every-node-update, which is normally bound to C-c C-u C-e.
@node Top, Instructions, (dir), (dir)
@c node-name, next, previous, up
@ifinfo
This file documents the @code{scli} SNMP command line interface.
@end ifinfo
@c All the menus can be updated with the EMACS command
@c texinfo-all-menus-update, which is normally bound to C-c C-u C-a.
@menu
* Instructions:: How to read this manual.
* Copying:: The GNU General Public License.
* Overview:: Overview, history and software design.
* Modes and Commands:: SCLI modes and their commands.
* Extending:: Extending SCLI with new modes and commands.
* Problems:: Reporting bugs.
* Concept Index:: Index of concepts.
@end menu
@node Instructions, Copying, Top, Top
@chapter How to Read This Manual
@cindex reading
@cindex manual, how to read
@cindex how to read
This document contains two parts. The first part explains the design
and the history of the @code{scli} tool. The second part provides a
description of the modes and commands provided by @code{scli}. The
third part contains a step by step instructions how @code{scli} can be
extended with new modes and commands
@node Copying, Overview, Instructions, Top
@include gpl.texinfo
@node Overview, Modes and Commands, Copying, Top
@chapter Overview
@cindex greetings
@cindex overview
The GNU @code{scli} program implements a network management program
that provides a command line interface to browse, monitor, and
configure network devices. It uses the Simple Network Management
Protocol (SNMP) to communicate with the devices and supports several
standardized and some proprietary Management Information Base (MIB)
modules.
Most SNMP management tools try to be very generic and they often fail
to be useful. A good example are generic MIB browsers that display raw
MIB data structures. These browsers tend to be of little use for
actual management because MIB data structures are designed to be read
and undertstood by programs rather than humans and thus difficult to
deal with. Furthermore, the SNMP way of accessing MIB data is often
simplistic and not optimized for humans. For example, humans usually
prefer to refer to access objects via names rather than numbers while
a machine oriented protocol such as SNMP generally prefers numbers
over names.
The SNMP command line interface (@code{scli}) was designed to be
specific rather than generic. In particular, @code{scli} understands
the data it manipulates and it presents data in a way which is
optimized for a human interface. It is not uncommon that @code{scli}
uses information from different MIB modules in order to display data
in a format which is easy to understand for human beings.
@section History
@cindex history
The @code{scli} package was written because of continued frustration
how complex it is to configure and troubleshoot SNMP manageable
devices with commonly used SNMP tools. The observation that better
tools are needed to support SNMP management is nothing new. The author
tried several approaches to tackle this problem before. In the 1990's,
work was done on scripting language API extensions to simplify the
interaction with networked devices. The result of these efforts was
the Tnm [] extension for Tcl [], which is widely deployed these days,
especially for testing and device emulation purposes.
In the 1990's, the author also experimented with concepts of network
management platform, which resulted in @code{tkined}, a kind of a
light-weight management platform. The @code{tkined} platform provides
generic services and is highly extensible. In order to extend
@code{tkined} with new management functionalities, all you need to do
is to write a Tcl script. Although this sounds nice in theory, the
reality is that most people who were interested in @code{tkined} did
not want to write management scripts. Although the package has been
openly available for many years, only few script contributions went
back into the source distribution.
The author also wrote several generic MIB browsers. A very old one is
still running on our Web server and being used regularly by people to
browse MIBs and agents. But such Web-based solutions do not fit into
into the preferred work style of the author. Firing up a complex Web
browser just to retrieve and display a (potentially big) HTML page
which shows management data at the abstraction level of an API between
network elements in a distributed system just does not seem to be
right and efficient.
In recent years, the @code{scli} author was involved in the
specification and implementation of MIBs for the delegation of
management functions. Very early in the project, it became clear that
we need to have a good front-end. Again, we tried several
approaches. The first one was a Java based applet running in a Web
browser. This was usable for demos, but nothing for everyday work. The
second front-end was a Java stand-alone program. It provides a better
user interface, but it eats up so many resources (and refuses to run
on my 256 color display) so that people again used the old Web-based
MIB browser which was written several years ago.
The conclusion one can derive from all these observations is that the
approach to build generic tools is fundamentally flawed. Instead, it
is necessary to build very specific tools which understand the
management data they manipulate and which generate output which is
optimized for humans. Furthermore, many people accept command line
interface as a natural human interface for interacting with network
elements.
@section Project Design
@cindex invoking
@cindex version
@cindex options
@cindex usage
@cindex help
@cindex getting help
It is time consuming to build specific tools rather than generic
tools. Someone who understands specific MIBs must design easy to use
human management interfaces on top of them. The only reasonable way to
tackle this problem with limited resources is to start an open source
project and to get lots of programmers involved. This leads to the
requirement that the source code must be modular so that specific
extensions for e.g. modem management can be easily integrated.
The experience with past projects shows that the number of SNMP
programmers is really not that huge. So this leads to another
important requirement: It must be possible to invoke SNMP operations
without any intimidate knowledge of the SNMP protocol and SNMP
specific APIs. The technical mechanism to address this requirement is
to use a MIB compiler which generates stub code for management
applications from MIB modules. The stub code should export simple C
structures that every programmer can easily understand and handle.
@section Software Architecture
@c I started to work on the framework of two tools. The first program
@c called stop displays monitoring data on a character terminal which is
@c regularly updated, similar to the well known Unix top. The second
@c program called scli provides an SNMP based command line interface.
@c stop is based on curses/ncurses while scli uses the GNU readline
@c library to provide command line editing and history capabilities.
@c
@c
@c - why gxsnmp and not netsnmp?
@c
@c - why glib?
@c
@c - why not tcl?
@c
@c
@c MIB Stub Generator
@node Modes and Commands, Extending, Overview, Top
@chapter Modes and Commands
The following sections describe the @code{scli} modes together with
their commands.
100-scli version (c) 2001-2007 Juergen Schoenwaelder
3COM MODE
The 3com scli mode allows to manipulate virtual lans (vlans)
on 3com bridges. It is based on the PRODUCTMIB which is
implemented at least on 3Com SuperStack II switches.
@example
@command{create 3com bridge vlan <vlanid> <name>}
@command{delete 3com bridge vlan <regexp>}
@command{set 3com bridge vlan name <vlanid> <name>}
@command{set 3com bridge vlan ports <regexp> <ports>}
@command{show 3com bridge vlan info [<regexp>]}
@command{dump 3com bridge vlan}
@end example
The @command{create 3com bridge vlan} command is used to create a
new virtual LAN with the given <vlanid> and <name>.
The @command{delete 3com bridge vlan} command deletes all selected
virtual LANs. The regular expression <regexp> is matched
against the virtual LAN names to select the vlans that should
be deleted.
The @command{set 3com bridge vlan name} command changes the name of
a virtual LAN.
The @command{set 3com bridge vlan ports} command allows to assign ports
to port-based virtual LANs. The regular expression <regexp>
is matched against the virtual LAN names to select the vlans that
should be modified. The <ports> argument contains a comma
separated list of port numbers or port number ranges, e.g.
1,5,7-8.
The @command{show 3com bridge vlan info} command shows summary
information about all selected virtual LANs. The optional
regular expression <regexp> is matched against the virtual
LAN names to select the virtual LANs of interest. The
command generates a table with the following columns:
@verbatim
VLAN virtual LAN number
STATUS status of the virutal LAN (see below)
NAME name of the virutal LAN
INTERFCE virtual LAN interface number
PORTS ports assigned to the virtual LAN
@end verbatim
The status is encoded in two characters. The first character
indicates the status of the row (A=active, S=not in service,
R=not ready). The second character indicates virutal LAN type
(P=port, I=IP-subnet, O=protocol, S=src address, D=dst address).
The @command{dump 3com bridge vlan} command generates a sequence of scli
commands which can be used to restore the virtual LAN configuration.
@section ATM MODE
The atm scli mode is based on the ATM-MIB as published in RFC 2515.
This mode is intended to display and configure ATM parameters.
@example
@command{show atm interface info <regexp>}
@command{show atm interface details <regexp>}
@end example
The @command{show atm interface info} command displays summary
information for all selected ATM interfaces. The optional
regular expression <regexp> is matched against the interface
descriptions to select the interfaces of interest. The command
generates a table with the following columns:
@verbatim
INTERFACE network interface number
DESCRIPTION description of the network interface
@end verbatim
The @command{show atm interface details} command describes the selected
ATM interfaces in more detail. The optional regular expression
<regexp> is matched against the interface descriptions to
select the interfaces of interest.
@section BRIDGE MODE
The scli bridge mode is based on the BRIDGE-MIB as published in
RFC 4188 and the Q-BRIDGE-MIB as published in RFC 4363.
It provides commands to browse information specific
to IEEE 802.1 LAN bridges (also known as layer two switches).
@example
@command{show bridge info}
@command{show bridge ports}
@command{show bridge stp ports}
@command{show bridge forwarding}
@command{show bridge filter}
@command{show bridge stats}
@command{monitor bridge stats}
@command{show bridge vlan info [<regexp>]}
@command{show bridge vlan details [<regexp>]}
@end example
The @command{show bridge info} command displays summary information about
a bridge, such as the number of ports and the supported bridging
functions and associated parameters.
The @command{show bridge ports} command displays information about the
bridge ports.
The @command{show bridge stp ports} command displays information about
the bridge ports which participate in the spanning tree protocol.
The command generates a table with the following columns:
@verbatim
PORT port number
PRIO spanning tree priority of the port
STATE spanning tree status of the port
P-COST path costs for this port
D-ROOT designated root port
D-COST designated costs
D-BRIDGE designated bridge
D-PORT designated port
@end verbatim
The status is encoded in two characters. The first character
indicates whether STP on the port is enabled (E) or disabled
(D). The second character indicates the current status
(D=disabled, B=blocking, I=listening, L=learning, F=forwarding,
X=broken).
The @command{show bridge forwarding} command displays the forwarding
data base used by transparent bridges. The command generates
a table with the following columns:
@verbatim
PORT port number
STATUS status of the forwarding entry
ADDRESS address associated with the port
NAME name of the address (where known)
VENDOR vendor info derived from the address
@end verbatim
The @command{show bridge filter} command shows filtering information.
The @command{show bridge stats} command displays per port statistics for
transparent bridges. The command generates a table with the
following columns:
@verbatim
PORT port number
I-FPS input frames per second
O-FPS output frames per second
D-FPS discarded frames per second
DESCRIPTION description of the port
@end verbatim
The @command{monitor bridge stats} command shows the same
information as the show bridge stats command. The
information is updated periodically.
The @command{show bridge vlan info} command shows summary information
about configured VLANs. The command generates a
table with the following columns:
@verbatim
VLAN VLAN number (between 1 and 4094)
STATUS status of the VLAN
NAME name of the VLAN
PORTS ports assigned the the VLAN
@end verbatim
The @command{show bridge vlan details} command describes the selected
VLANs in detail. The optional regular expression <regexp>
is matched against the VLAN names to select the VLANs
of interest.
@section CISCO MODE
The cisco scli mode is used to display and configure cisco
parameters. It also supports retrieval of accounting data
from devices that support the old cisco accounting mib. This
mode is based on the OLD-CISCO-IP-MIB published in May 1994.
@example
@command{show cisco processes}
@command{show cisco ip accounting info}
@command{show cisco ip accounting current sorted}
@command{show cisco ip accounting current raw}
@command{show cisco ip accounting snapshot sorted}
@command{show cisco ip accounting snapshot raw}
@command{monitor cisco ip accounting current}
@command{monitor cisco ip accounting snapshot sorted}
@command{set cisco ip accounting checkpoint}
@command{show cisco dot11 interface info}
@command{show cisco dot11 clients stats}
@command{monitor cisco dot11 clients stats}
@end example
The @command{show cisco processes} command displays information about
all processes running on a CISCO device. The command generates
a table with the following columns:
@verbatim
CPU processor executing a given process
PID process indentification number on a CPU
P priority of the process
MEMORY memory used by the process
TIME CPU time used by the process
COMMAND command executed by the process
@end verbatim
The @command{show cisco ip accounting info} command displays general
status information concerning the simple cisco IPv4 accounting
mechanism supported by many older cisco devices. In particular,
it displays the starting point of the current and snapshot data
tables, information about the available accounting capacity,
and statistics about lost bytes and packets.
cisco IP current accounting data
The @command{show cisco ip accounting current raw} command displays
the raw accounting data retrieved from the current table. The
command generates a table with the following columns:
@verbatim
SOURCE source IPv4 address in dotted notation
DESTINATION destination IPv4 address in dotted notation
PACKETS packets sent from source to destination
BYTES bytes sent from source to destination
@end verbatim
cisco IP snapshot accounting data
The @command{show cisco ip accounting snapshot raw} command displays
the raw accounting data retrieved from the snapshot table. The
command generates a table with the following columns:
@verbatim
SOURCE source IPv4 address in dotted notation
DESTINATION destination IPv4 address in dotted notation
PACKETS packets sent from source to destination
BYTES bytes sent from source to destination
@end verbatim
cisco IP current accounting data
cisco IP snapshot accounting data
The @command{set cisco ip accounting checkpoint} command takes a
snapshot of the current accounting table by copying it to
the snapshot accounting table. The current accounting table
is reinitialized before it is updated again. The command
returns the serial number of the snapshot.
The @command{show cisco dot11 interface info} command displays information
about all IEEE 802.11 interfaces on a CISCO device. The command
generates a table with the following columns:
@verbatim
IFACE network interface number
SPEED speed in bits per second
NAME name of the network interface
CLNT number of associated clients
BRDG number of assiciated bridges
RPRT number of assiciated repeaters
ASSCI total number of associated stations
ASSCO total number of deassociated stations
ROAMI total number of roamed-in stations
ROAMO total number of roamed-away stations
AUTHI total number of authenticated stations
AUTHO total number of deauthenticated stations
@end verbatim
The @command{show cisco dot11 clients stats} command displays information
about all IEEE 802.11 clients associated with a CISCO device. The
command generates a table with the following columns:
@verbatim
IF network interface number
SSID SSID to which client is associated
ADDRESS client MAC address
IPv4-ADDRESS client}s IPv4 address (if supplied)
SGNL client}s signal strength
UPTIME lifetime of client}s association
I-BPS input bytes per second
O-BPS output bytes per second
ERR errors per second
@end verbatim
The @command{monitor cisco dot11 clients stats} command shows the same
information as the show cisco dot11 clients stats command. The
information is updated periodically.
@section DISMAN MODE
The scli disman mode is based on the DISMAN-SCRIPT-MIB as
published in RFC 3165 and the DISMAN-SCHEDULE-MIB as
published in RFC 3231. It allows to browse and configure
distributed managers.
@example
@command{create disman script <owner> <name> <description>}
@command{create disman run <owner> <name> <args>}
@command{show disman languages}
@command{show disman script info}
@command{show disman script details}
@command{show disman launch info}
@command{show disman launch details}
@command{show disman run info}
@command{show disman run details}
@command{show schedule info}
@command{show schedule details}
@command{create schedule <owner> <name> <expression>}
@command{delete schedule <owner> <name>}
@command{dump schedule}
@command{monitor schedule info}
@command{monitor disman run}
@end example
...
...
languages supported by the distributed manager
script summary information
scripts installed at the distributed manager
launch summary information
launch buttons installed on the distributed manager
summary information about running scripts
running scripts on the distributed manager
The @command{show schedule info} command displays summary
information about the scheduled actions.
schedules on the distributed manager
...
...
The @command{dump schedule} command generates a sequence of scli
commands which can be used to restore the schedule configuration.
scheduler information
monitor running scripts
@section ENTITY MODE
The entity scli mode is based on the ENTITY-MIB as published in
RFC 2737. It provides commands to browse the physical entities
or physical components that make up a managed system.
@example
@command{show entity info}
@command{show entity details}
@command{show entity containment}
@command{show entity sensors}
@end example
The @command{show entity info} command displays summary information about
the physical entities that compose the system. The command
generates a table with the following columns:
@verbatim
ENTITY entity number
CLASS class of the entity (see below)
NAME name of the entity
DESCRIPTION description of the entity
@end verbatim
The @command{show entity details} command describes the physical entities
in more detail.
The @command{show entity containment} command displays the physical entity
containment hierarchy.
The @command{show entity sensors} command describes the physical sensor
entities in more detail.
@section ETHERNET MODE
The ethernet scli mode is based on the EtherLike-MIB as published
in RFC 2665 and the MAU-MIB as published in RFC 2668.
@example
@command{show ethernet mau}
@command{show ethernet stats}
@command{show ethernet history}
@command{monitor ethernet stats}
@end example
The @command{show ethernet mau} command displays information about the
medium attachment units (MAUs) for each ethernet port. The
command generates a table which has the following columns:
@verbatim
INTERFACE network interface number
MAU medium attachment unit number per interface
STATUS status of the medium attachment unit
MEDIA media availability
JABBER jabber state of the medium attachment unit
AUTONEG autonegation capabilities
TYPE type of the medium attachment unit
@end verbatim
The @command{show ethernet stats} command displays ethernet specific
statistics for each ethernet interface. The command outputs
a table which has the following columns:
@verbatim
INTERFACE network interface number
ALIGN alignement errors per second
FCS frame check sequence errors per second
RCV MAC receive errors per second
LONG frames exceeding maximum frame size per second
DEFER deferred transmission per second
SCOL single collisions per second
MCOLR multiple collisions per second
XCOL excessive collisions per second
LCOL late collisions per second
XMIT MAC transmit errors per second
CARR carrier sense errors per second
@end verbatim
...
The @command{monitor ethernet stats} command shows the same information
as the show ethernet stats command. The information is updated
periodically.
@section HP MODE
The hp scli mode is used to display and configure hp
parameters.
@example
@command{show hp fault log}
@end example
@section XXX
@section INTERFACE MODE
The scli interface mode is based on the IF-MIB as published in
RFC 2863. It provides commands to browse, monitor and configure
arbitrary network interfaces.
@example
@command{create interface stack <lower-regexp> <higher-regexp>}
@command{delete interface stack <lower-regexp> <higher-regexp>}
@command{set interface status <regexp> <status>}
@command{set interface alias <regexp> <string>}
@command{set interface notifications <regexp> <value>}
@command{set interface promiscuous <regexp> <bool>}
@command{show interface info [<regexp>]}
@command{show interface details [<regexp>]}
@command{show interface stack [<regexp>]}
@command{show interface stats [<regexp>]}
@command{monitor interface stats [<regexp>]}
@command{loop interface stats [<regexp>]}
@command{check interface status [<regexp>]}
@command{dump interface}
@end example
The @command{set interface status} command modifies the administrative
status of all selected interfaces. The regular expression
<regexp> is matched against the interface descriptions to
select the interfaces of interest. The <value> parameter must
be one of the strings "up", "down", or "testing".
The @command{set interface alias} command assigns the alias name
<string> to the selected interfaces. The alias name provies
a non-volatile handle which can be used by management
applications to better identify interfaces. The regular
expression <regexp> is matched against the interface
descriptions to select the interfaces.
The @command{set interface notifications} command controls whether the
selected interfaces generate linkUp and linkDown notifications.
The regular expression <regexp> is matched against the interface
descriptions to select the interfaces. The <value> parameter
must be one of the strings "enabled" or "disabled".
The @command{set interface promiscuous} command controls whether the
selected interfaces operate in promiscuous mode or not. The
regular expression <regexp> is matched against the interface
descriptions to select the interfaces. The <bool> parameter
must be one of the strings "true" or "false".
The @command{show interface info} command displays summary information
for all selected interfaces. The optional regular expression
<regexp> is matched against the interface descriptions to
select the interfaces of interest. The command generates a
table with the following columns:
@verbatim
INTERFACE network interface number
STATUS interface status (see below)
MTU maximum transfer unit
TYPE type of the network interface
SPEED speed in bits per second
NAME name of the network interface
DESCRIPTION description of the network interface
@end verbatim
The status is encoded in four characters. The first character
indicates the administrative status (U=up, D=down, T=testing).
The second character indicates the operational status (U=up,
D=down, T=testing, ?=unknown, O=dormant, N=not-present,
L=lower-layer-down). The third character indicates whether a
connector is present (C=connector, N=none) and the fourth
character indicates whether the interface is in promiscuous
mode (P=promiscuous, N=normal).
The @command{show interface details} command describes the selected
interfaces in detail. The optional regular expression
<regexp> is matched against the interface descriptions to
select the interfaces of interest.
The @command{show interface stack} command shows the stacking order
of the interfaces. The command generates a table with the
following columns:
@verbatim
INTERFACE network interface number
STACK indication of the stacking order
TYPE type of the network interface
DESCRIPTION description of the network interface
@end verbatim
The @command{show interface stats} command displays network
interface statistics for all selected interfaces.
The optional regular expression <regexp> is matched
against the interface description to select the
interfaces. The command outputs a table which has
the following columns:
@verbatim
INTERFACE network interface number
STATUS interface status (see above)
I-BPS input bytes per second
O-BPS output bytes per second
I-PPS input packets per second
O-PPS output packets per second
I-ERR input errors per second
O-ERR output errors per second
I-DIS input packets discarded per second
O-DIS output packets discarded per second
I-UNK input packets with unknown protocols per second
DESCRIPTION description of the network interface
@end verbatim
The @command{monitor interface stats} command shows the same
information as the show interface stats command. The
information is updated periodically.
The @command{loop interface stats} command shows the same
information as the show interface stats command. The
information is updated periodically.
The @command{check interface status} command checks the status of
interfaces. The optional regular expression <regexp> is matched
against the interface description to select the interfaces
In particular, the check interface status commands detects
fault conditions if (a) ifAdminStatus is not down and
ifOperStatus is down or (b) ifAdminStatus is down and
ifOperStatus is not down and not notPresent
The @command{dump interface} command generates a sequence of scli
commands which can be used to restore the interface
configuration.
@section IP MODE
The ip scli mode is based on the IP-MIB as published in
RFC 2011, the IP-FORWARD-MIB as published in RFC 2096, the
IP-TUNNEL-MIB as published in RFC 2667 and the RFC1213-MIB
as published in RFC 1213. It provides commands to browse,
monitor and configure IP protocol engines.
@example
@command{set ip forwarding <value>}
@command{set ip ttl <number>}
@command{show ip info}
@command{show ip forwarding}
@command{show ip addresses}
@command{show ip tunnel}
@command{show ip mapping}
@command{dump ip}
@end example
The @command{set ip forwarding} command controls whether the IP protocol
engine forwards IP datagrams or not. The <value> parameter must
be one of the strings "enabled" or "disabled".
The @command{set ip ttl} command can be used to change the default
time to live (TTL) value used by the IP protocol engine. The
<number> parameter must be a number between 1 and 255 inclusive.
The @command{show ip info} command displays parameters of the IP
protocol engine, such as the default TTL or whether the
node is forwarding IP packets.
The @command{show ip forwarding} command displays the IP forwarding data
base. The command generates a table with the following columns:
@verbatim
DESTINATION destination address and prefix
NEXT-HOP next hop towards the destination
TOS type of service selector
TYPE type (direct/indirect) of the entry
PROTO protocol which created the entry
INTERFACE interface used for forwarding
@end verbatim
The @command{show ip addresses} command displays the IP addresses
assigned to network interfaces. The command generates a table
with the following columns:
@verbatim
ADDRESS IP address
PREFIX IP address prefix length
NAME name of the IP address
INTERFACE network interface number
DESCRIPTION description of the network interface
@end verbatim
The @command{show ip tunnel} command displays information about existing
IP tunnels.
The @command{show ip mapping} command displays the mapping of IP address
to lower layer address (e.g., IEEE 802 addresses). The command
generates a table with the following columns:
@verbatim
INTERFACE network interface number
STATUS status of the mapping entry
ADDRESS IP address
ADDRESS lower layer address
@end verbatim
The @command{dump ip} command generates a sequence of scli commands
which can be used to restore the IP configuration.
@section ISDN MODE
The scli isdn mode is based on the ISDN-MIB as published
in RFC 2127.
@example
@command{show isdn bri [<regexp>]}
@command{show isdn bearer}
@command{show isdn endpoints}
@end example
The @command{show isdn bri} command shows information about
the ISDN basic rate interfaces. The command outputs
a table which has the following columns:
@verbatim
INTERFACE network interface number
TYPE type of the ISDN interface
TOPOLOGY line topology
MODE interface mode (te/nt)
SIGNALING signaling mode (active/inactive)
DESCRIPTION description of the network interface
@end verbatim
The @command{show isdn bearer} command shows information about
the ISDN B (bearer) channels.
The @command{show isdn endpoints} command shows information about
the ISDN endpoints.
@section NETSNMP MODE
The netsnmp scli mode is used to display and configure netsnmp
specific parameters. It is based on the UCD-SNMP-MIB.
@example
@command{set netsnmp debugging <value>}
@command{set netsnmp restart}
@command{show netsnmp info}
@command{show netsnmp load}
@command{show netsnmp exec}
@command{show netsnmp proc}
@command{dump netsnmp}
@end example
The @command{set netsnmp debugging} command controls whether the agent
generates debug messages or not. The <value> parameter must
be one of the strings "enabled" or "disabled".
The @command{set netsnmp restart} command restarts the agent.
The @command{show netsnmp info} command shows general information about
the netsnmp/ucdsnmp agent such as the version number and the
software configuration.
The @command{show netsnmp load} command shows the load indices of the
system. This is usually the length of the queue in front of
the processor(s) averaged over some time interval.
The @command{show netsnmp exec} command shows information about
pre-configured commands that can be invoked.
The @command{show netsnmp proc} command shows information about
which processes netsnmp watches.
The @command{dump netsnmp} command generates a sequence of scli commands
which can be used to restore the netsnmp specific configuration.
@section NORTEL MODE
The nortel scli mode allows to manipulate virtual LANs (vlans)
on nortel bridges. It is based on the RAPID-CITY MIB which
is implemented at least on the baystack bridges.
@example
@command{create nortel bridge vlan <vlanid> <name>}
@command{delete nortel bridge vlan <regexp>}
@command{set nortel bridge vlan name <vlanid> <name>}
@command{set nortel bridge vlan ports <regexp> <ports>}
@command{set nortel bridge vlan default <string> <ports>}
@command{show nortel bridge vlan info [<regexp>]}
@command{show nortel bridge vlan details [<regexp>]}
@command{show nortel bridge vlan ports}
@command{dump nortel bridge vlan}
@end example
The @command{create nortel bridge vlan} command is used to create a
new virtual LAN with the given <vlanid> and <name>.
The @command{delete nortel bridge vlan} command deletes all selected
virtual LANs. The regular expression <regexp> is matched
against the virtual LAN names to select the vlans that should
be deleted.
The @command{set nortel bridge vlan name} command changes the name of
a virtual LAN.
The @command{set nortel bridge vlan ports} command allows to assign
ports to port-based vlans. The regular expression <regexp>
is matched against the vlan names to select the vlans that
should be modified. The <ports> argument contains a comma
separated list of port numbers or port number ranges, e.g.
1,5,7-8.
The @command{set nortel bridge vlan default} command allows to assign
ports to a default vlan. The <string> argument is matched
against the vlan names to select the vlan. The <ports> argument
contains a comma separated list of port numbers or port number
ranges, e.g. 1,5,7-8.
The @command{show nortel bridge vlan info} command shows summary
information about all selected virtual LANs. The optional
regular expression <regexp> is matched against the virtual
LAN names to select the virtual LANs of interest. The
command generates a table with the following columns:
@verbatim
VLAN number of the virtual LAN
STATUS status of the virtual LAN (see below)
NAME name of the virtual LAN
PORTS ports assigned to the virtual LAN
@end verbatim
The status is encoded in four characters. The first character
indicates the status of the row (A=active, S=not in service,
R=not ready). The second character indicates virtual LAN type
(P=port, I=IP-subnet, O=protocol, S=src address, D=dst address).
The third character indicates the priority of the virtual LAN
(H=high, N=normal) and the fourth character indicates whether
routing is enabled (R=routing, N=no routing).
The @command{show nortel bridge vlan details} command describes the
selected vlans in more detail. The optional regular expression
<regexp> is matched against the vlan names to select the vlans
of interest.
The @command{show nortel bridge vlan ports} command shows information
for each vlan port. The command generates a table with the
following columns:
@verbatim
PORT port number
FLAGS port vlan flags (see below)
DEFAULT default vlan number
VLANS vlan numbers the port is member of
@end verbatim
The flags are encoded in four characters. The first character
indicates the port type (A=access, T=trunk). The second character
indicates whether the port tags frames (T=tagging, N=none). The
third character indicates whether the port discards tagged frames
(D=discard, N=none) and the fourth character indicates whether
the port discards untagged frames (D=discard, N=none).
The @command{dump nortel bridge vlan} command generates a sequence of scli
commands which can be used to restore the virtual LAN configuration.
@section OSPF MODE
The scli ospf mode is used to display and configure OSPF
parameters.
@example
@command{show ospf area}
@command{show ospf info}
@command{show ospf interface}
@command{show ospf lsdb}
@end example
show OSPF areas
general OSPF information
show OSPF interfaces
show OSPF lsdb
@section PRINTER MODE
The scli printer mode is based on the Printer-MIB as published
in RFC 1759 and some updates currently being worked on in the
IETF Printer MIB working group.
@example
@command{set printer operator <string>}
@command{show printer info}
@command{show printer paths}
@command{show printer inputs}
@command{show printer outputs}
@command{show printer markers}
@command{show printer colorants}
@command{show printer supplies}
@command{show printer interpreters}
@command{show printer channels}
@command{show printer covers}
@command{show printer display}
@command{show printer lights}
@command{show printer alerts}
@command{monitor printer display}
@command{monitor printer lights}
@command{monitor printer alerts}
@command{run printer reboot}
@end example
The @command{set printer operator} command configures the name of the
person responsible for operating a printer. As a convention,
the phone number, fax number or email address should be
indicated by the tel:, fax: and mailto: URL schemes.
The @command{show printer info} command shows general information about
the printer including global status information.
The @command{show printer paths} command shows information about the
media paths of a printer.
The @command{show printer inputs} command shows information about the
input sub-units of a printer which provide media for input to
the printing process.
The @command{show printer output} command shows information about the
output sub-units of a printer capable of receiving media
delivered from the printing process.
The @command{show printer markers} command shows information about the
marker sub-units of a printer which produce marks on the print
media.
The @command{show printer colorants} command shows information about the
colorant sub-units of a printer which produce marks on the print
media.
The @command{show printer supplies} command shows information about the
supplies which are consumed and the waste produced by the
markers of a printer.
The @command{show printer interpreters} command shows information about
the page description language and control language interpreters
supported by the printer.
The @command{show printer channels} command shows information about
the channels which can be used to submit data to the printer.
The @command{show printer covers} command shows information about the
covers of a printer.
The @command{show printer display} command shows the current
contents of the display attached to the printer. The command
generates a table with the following columns:
@verbatim
PRINTER logical printer number
LINE display line number
TEXT contents of the display line
@end verbatim
The @command{show printer lights} command shows the current
status of the lights attached to the printer. The command
generates a table with the following columns:
@verbatim
PRINTER logical printer number
LIGHT number identifying the light/led
DESCRIPTION description of the light/led
STATUS current status (on, off, blink)
COLOR current color of the light
@end verbatim
The @command{show printer alerts} command displays the list of active
printer alerts including the alert code, the alert severity,
the alert description, the alert time, the alert location and
the personel required to handle the alert.
The @command{monitor printer display} command shows the same
information as the show printer display command. The
information is updated periodically.
The @command{monitor printer lights} command shows the same
information as the show printer lights command. The
information is updated periodically.
The @command{monitor printer alerts} command shows the same information
as the show printer alerts command. The information is updated
periodically.
The @command{run printer reboot} command resets the printed.
RS232 MODE
The rs232 scli mode is based on the RS-232-MIB as published
in RFC 1659.
@example
@command{show rs232 details}
@end example
The @command{show rs232 details} command describes the selected RS 232
interfaces in detail.
@section SCLI MODE
The scli mode provides commands that can be used to display and
manipulate the internal state of the scli interpreter.
@example
@command{open <nodename> [<community>]}
@command{close}
@command{run scli walk <oid> [<oid> ...]}
@command{run scli scan <network> [community]}
@command{create scli plugin <module>}
@command{delete scli plugin <module>}
@command{exit}
@command{help}
@command{history}
@command{create scli alias <name> <value>}
@command{delete scli alias <regexp>}
@command{create scli interp <name>}
@command{delete scli interp <regexp>}
@command{set scli regex [<regexp>]}
@command{set scli debugging [<regexp>]}
@command{set scli pager <pager>}
@command{set scli retries <retries>}
@command{set scli timeout <milliseconds>}
@command{set scli format <fmt>}
@command{set scli mode <mode>}
@command{show scli info}
@command{show scli command info [<regex]}
@command{show scli command details [<regex]}
@command{show scli command tree}
@command{show scli aliases}
@command{show scli modes [<regex>]}
@command{show scli schema [<regex>]}
@command{show scli alarm info}
@end example
The @command{open} command establishes an association to a remote SNMP
agent. The <nodename> argument is the DNS name or the IP
address of the remote node. Scli will try to talk to the SNMP
agent on this node by using the default port number (usually 161)
and the default transport mapping (usually SNMP over UDP).
The optional <community> argument is the community string
needed to communicate with the remote SNMP agent. The default
community string is "public". Opening an association while
an association is already established is not considered an
error. The existing established association will be closed
automatically before an attempt to create a new association
is started.
The @command{close} command closes an established association to a remote
SNMP agent. Invoking the close command when no association is
established is not considered an error and will do just nothing.
The @command{run scli walk} command is a debugging utility which simply
performs a MIB walk. Note that scli does not have general MIB
knowledge and hence the output requires some post-processing.
The @command{run scli scan} command is a utility which scans an IPv4
address space identified by the <network> argument. The <network>
must be specified in the format <ipv4address>/<prefix>.
The optional <community> argument is the community string
needed to communicate with the remote SNMP agent. The default
community string is "public".
The @command{create scli plugin} command dynamically loads an scli mode
into a running scli process. This can be used to dynamically
extend scli with modules coming from other sources. Dynamic
loadable modules also simplify the development and management
of site-specific modules.
The @command{delete scli plugin} command removes a previously loaded
modules from a running scli process.
The @command{exit} command terminates the scli interpreter. An end of file
in the standard input stream will also terminate the the scli
interpreter.
The @command{help} command displays some help information including a list
of all top-level scli commands.
The @command{history} command displays the scli command history list with
line numbers.
The @command{create scli alias} command creates the alias <name> for the
scli command (fragment) <value>. If the alias <name> already
exists, then the new <value> will be assigned to the existing
alias.
The @command{delete scli alias} command removes previously defined
aliases from the scli interpreter. The regular expression
<regexp> is matched against all alias names in order to
select the aliases that are deleted.
The @command{create scli interp} command creates a new internal scli
interpreter with the name <name>.
The @command{delete scli interp} command deletes previously defined
scli interpreters from the main scli interpreter. The regular
expression <regexp> is matched against all alias names in order
to select the interpreter(s) to be removed.
The @command{set scli regex} command controls how scli matches regular
expressions. The optional regular expression <regexp> is
matched against the regular expression options. A successful
match turns a regular expression option on while an unsuccessful
match turns a regular expression option off. Invoking the command
without the <regexp> argument will turn all regular expression
options off. The currently defined regular expression options
are "extended" for POSIX extended regular expressions and
"case-insensitive" for case insensitive matches.
The @command{set scli debugging} command sets the debugging level of
the SNMP engine. The optional regular expression <regexp> is
matched against the debugging levels. A successful match turns
a debugging level on while an unsuccessful match turns a
debugging level off. Invoking the command without the <regexp>
argument will turn all debugging levels off. The currently
defined debugging levels are "session" for the SNMP session
layer, "request" for the SNMP request handling layer,
"transport" for the SNMP transport layer, "packet" for
the SNMP packet layer, and "asn1" for the ASN.1 coding layer.
The @command{set scli pager} command defines the shell command which is
used as a pager if the output produced by an scli command does
not fit on a single screen. The output is passed to the <pager>
shell command via its standard input stream.
The @command{set scli retries} command defines the number of SNMP
request retries before giving up requesting a certain object.
The @command{set scli timeout} command defines the number milliseconds
between subsequent SNMP request retries.
The @command{set scli format} command defines the output format used by
subsequent scli commands. The currently supported formats are
"scli" and "xml". The "scli" format is the default output
format and described in this documentation. The "xml" output
format is experimental and therefore not described here.
The @command{set scli mode} command defines the scli mode used by
subsequent scli commands. Setting the mode to "protocol"
will force scli to work in protocol mode. Setting the mode to
"normal" causes scli to work in normal mode where certain
status messages are suppressed.
The @command{show scli info} command displays the current status of the
scli interpreter.
The @command{show scli command info} command displays summary information
about scli commands. The optional regular expression <regexp> is
matched against the command names to select the scli commands.
The @command{show scli command details} command displays detailed information
about scli commands. The optional regular expression <regexp> is
matched against the command names to select the scli commands.
The @command{show scli command tree} command displays the scli command
tree. The full command syntax is displayed for each leaf node.
The @command{show scli aliases} command lists all scli command aliases.
The first column in the generated table lists the aliase names
while the second column shows the alias values.
The @command{show scli modes} command shows information about the scli
modes. An scli mode is a logical grouping of related commands
(e.g., all commands that deal with printers). The optional
regular expression <regex> can be use to select a subset of
the available scli modes.
The @command{show scli schema} command produces xml schema definitions for
the selected scli modes. An scli mode is a logical grouping of
related commands (e.g., all commands that deal with printers).
The optional regular expression <regex> can be use to select a
subset of the available scli modes.
The @command{show scli alarm info} command displays summary information
about all known alarms.
@section SNMP MODE
The snmp scli mode is based on the SNMPv2-MIB as published
in RFC 1907, the SNMP-FRAMEWORK-MIB as published in RFC 3411,
the SNMP-USER-BASED-SM-MIB as published in RFC 3414, the
SNMP-VIEW-BASED-ACM-MIB as published in RFC 3415, the
SNMP-TARGET-MIB as published in RFC 3413, the
SNMP-NOTIFICATION-MIB as published in RFC 3413, and theNOTIFICATION-LOG-MIB as published in RFC 3014.
@example
@command{create snmp vacm member <name> <group> [<model>]}
@command{delete snmp vacm member <regex-name> <regex-group> [<model>]}
@command{create snmp usm user <name> <template>}
@command{set snmp authentication traps <status>}
@command{show snmp engine}
@command{show snmp resources}
@command{show snmp vacm member}
@command{show snmp vacm access}
@command{show snmp vacm views}
@command{show snmp usm users}
@command{show snmp target addresses}
@command{show snmp target parameters}
@command{show snmp notification targets}
@command{show snmp contexts}
@command{show snmp csm}
@command{show snmp notification log details}
@command{show snmp notification log info}
@command{monitor snmp notification log info}
@command{dump snmp}
@end example
The @command{create snmp vacm member} commands can be used to assign
new members (security names) to vacm groups. New groups are
created if they do not exist.
The @command{delete snmp vacm member} commands can be used to delete
members (security names) from vacm groups. Groups are deleted
if the last member is deleted.
The @command{create snmp usm user} commands can be used to create a
new user by cloning an existing template.
The @command{set snmp authentication traps} command controls whether the
SNMP engine generates authentication failure notifications.
The <value> parameter must be one of the strings "enabled"
or "disabled".
The @command{show snmp engine} command displays information about the
SNMP protocol engine such as the number of boots, the current
time relative to the last boot and the maximum message size.
The @command{show snmp resources} command displays information about the
MIB resources supported by the SNMP agent.
The @command{show snmp vacm member} command displays the mapping of
security names to group names. The command generates a table
with the following columns:
@verbatim
ROW row storage type and status
MOD security model
NAME member name (security name)
GROUP name of the vacm group
@end verbatim
The @command{show snmp vacm access} command display the access control
rules for the security groups. The command generates a table
with the following columns:
@verbatim
ROW row storage type and status
GROUP security group name
MOD security model
LVL security level (--, a-, ap)
CTX context name
MATCH match (exact or prefix)
READ view name for read access
WRITE view name for write access
NOTIFY view name for notification
@end verbatim
The @command{show snmp vacm views} command displays MIB view definitions.
The command generates a table with the following columns:
@verbatim
ROW row storage type and status
VIEW view name
TYPE access to the view subtree (incl/excl)
PREFIX object identifier wildcard prefix
@end verbatim
The @command{show snmp usm users} command displays the configured users.
The command generates a table with the following columns:
@verbatim
ROW row storage type and status
USER USM user name
NAME security name of the USM user
AUTH authentication protocol
PRIV privacy protocol
@end verbatim
The @command{show snmp target addresses} command displays information
about the configured SNMP target addresses. The command
generates a table with the following columns:
@verbatim
ROW row storage type and status
TARGET target name
DOMAIN transport domain
ADDRESS transport address
TMOUT timeout value in ms
RETRY number of retries
PARAMS associated parameters
TAGS tag list
@end verbatim
The @command{show snmp target parameters} command displays information
about the configured SNMP target parameters. The command
generates a table with the following columns:
@verbatim
ROW row storage type and status
PARAMS parameter name
NAME security name
@end verbatim
The @command{show snmp notification targets} command displays information
about the configured SNMP notification targets. The command
generates a table with the following columns:
@verbatim
ROW row storage type and status
NAME notification target name
TYPE notification type
TAG tag reference to targets
@end verbatim
The @command{show snmp contexts} command displays information
about the available SNMP contexts.
The @command{show snmp csm communities} command displays information
about the configured SNMP communities.
The @command{show snmp notification log details} command displays
detailed information about logged SNMP notifications.
The @command{show snmp notification log info} command displays
summary information about logged SNMP notifications.
The @command{monitor snmp notification log info} command displays
summary information about logged SNMP notifications.
The @command{dump snmp} command generates a sequence of scli commands
which can be used to restore the engine configuration.
@section SONET MODE
The sonet scli mode is based on the SONET-MIB as published
in RFC 2558. It provides commands to manage Synchronous Optical
Network/Synchronous Digital Hierarchy (SONET/SDH) interfaces.
@example
@command{show sonet media [<regexp>]}
@command{show sonet section stats [<regexp>]}
@command{show sonet section history [<regexp>]}
@command{monitor sonet section stats [<regexp>]}
@end example
The @command{show sonet media} command displays information about the
configuration of SONET/SDH interfaces. The command outputs a
table which has the following columns:
@verbatim
INTERFACE network interface number
SIGNAL type of the signal (SONET/SDH)
CODING line coding (B3ZS, CMI, NRZ, RZ)
LINE optical or electrical line type
DESCRIPTION description of the network interface
@end verbatim
The @command{show sonet section stats} command displays statistics
about SONET/SDH section errors. The command outputs a table
which has the following columns:
@verbatim
INTERFACE network interface number
INTERVAL measurement interval
ES errored seconds
SES severely errored seconds
SEFS severely errored framing seconds
CV coding violations
LOSS flags indicating loss of signal/frame
DESCRIPTION description of the network interface
@end verbatim
The @command{show sonet section history} command displays 15 minute
history statistics about SONET/SDH section errors. The command
outputs a table which has the following columns:
@verbatim
INTERFACE network interface number
INTERVAL measurement interval start offset
ES errored seconds
SES severely errored seconds
SEFS severely errored framing seconds
CV coding violations
DESCRIPTION description of the network interface
@end verbatim
The @command{monitor sonet section stats} command shows the same
information as the show sonet section stats command. The
information is updated periodically.
@section SYSTEM MODE
The system scli mode is primarily based on the SNMPv2-MIB as
published in RFC 1907 and the HOST-RESOURCES-MIB as publisched
in RFC 2790. It can be used to browse and configure system
parameters and characteristics.
@example
@command{set system contact <string>}
@command{set system name <string>}
@command{set system location <string>}
@command{show system info}
@command{show system devices}
@command{show system storage}
@command{show system mounts}
@command{show system processes [<regexp>]}
@command{show system software [<regexp>]}
@command{monitor system storage}
@command{loop system storage}
@command{monitor system processes [<regexp>]}
@command{check system contact}
@command{check system storage}
@command{check system process [<regexp>] [<n>*<m>]}
@command{dump system}
@end example
The @command{set system contact} command configures the system contact
information. The <string> argument should include information
on how to contact a person who is responsible for this system.
The @command{set system name} command configures the name of the system.
By convention, this is the fully-qualified domain name.
The @command{set system location} command configures the physical
location of the system.
The @command{show system info} command shows general information about the
system.
The @command{show system devices} command shows a list of system devices.
The command generates a table with the following columns:
@verbatim
INDEX device number
STATUS current status of the device
DESCRIPTION description of the device
@end verbatim
The @command{show system storage} command displays information about the
logical areas attached in the system. The command generates a
table with the following columns:
@verbatim
INDEX logical storage area number
DESCRIPTION description of the storage area
TYPE logical storage area type
SIZE total size of the storage area
USED amount of storage in use
FREE amount of storage available
USE% used storage in percent
@end verbatim
The @command{show system mounts} command shows the list of filesystems
mounted on the system. The command generates a table with the
following columns:
@verbatim
INDEX filesystem identification number
LOCAL local root path name of the filesystem
REMOTE remote server and root path name (if any)
TYPE filesytem type (if known)
OPTIONS access mode (ro/rw) and boot flag
@end verbatim
The @command{show system processes} command display information about the
processes currently running on the system. The regular expression
<regexp> is matched against the command executed by the process
to select the processes of interest. The command generates a table
with the following columns:
@verbatim
PID process identification number
S status of the process (see below)
T type of the process (see below)
MEMORY memory used by the process
TIME CPU time used by the process
COMMAND command executed by the process
@end verbatim
The process status values are C=running, R=runnable,
S=not runnable, and Z=invalid. The process types values are
?=unknown, O=operating system, D=device driver, and A=application.
The @command{show system software} command display information about the
software installed on the system. The regular expression <regexp>
is matched against the software name to select the software of
interest. The command generates a table with the following columns:
@verbatim
SID software identification number
T type of the software (see below)
DATE software installation date
NAME software name
@end verbatim
The software type values are ?=unknown, O=operating system,
D=device driver, and A=application.
The @command{monitor system storage} command shows the same
information as the show system storage command. The
information is updated periodically.
The @command{loop system storage} command shows the same
information as the show system storage command. The
information is updated periodically.
The @command{monitor system processes} command show the same
information as the show system processes command. The
information is updated periodically.
The @command{check system contact} command xxx.
The @command{check system storage} command checks xxx.
The @command{check system process} command checks xxx.
The @command{dump system} command generates a sequence of scli commands
which can be used to restore the system configuration.
@section TCP MODE
The scli tcp mode is based on the TCP-MIB as published in
RFC 2012. It provides commands to browse information specific
to the TCP transport protocol.
@example
@command{show tcp info}
@command{show tcp listener}
@command{show tcp connections}
@command{show tcp states}
@command{monitor tcp connections}
@command{monitor tcp states}
@end example
The @command{show tcp info} command displays parameters of the TCP
protocol engine.
The @command{show tcp listener} command displays the listening TCP
endpoints. The command generates a table with the following
columns:
@verbatim
LOCAL local TCP endpoint
STATE transmission control block state (listen)
@end verbatim
The @command{show tcp connections} command displays the connected TCP
endpoints including the current state of the connection as seen
by the remote SNMP agent. The command generates a table with
the following columns:
@verbatim
LOCAL local TCP endpoint
REMOTE remote TCP endpoint
STATE transmission control block state
@end verbatim
The transmission control block state is either closed, synSent,
synReceived, established, finWait1, finWait2, closeWait, lastAck,
closing, or timeWait.
The @command{show tcp states} command displays the distribution of TCP
transmission control block states together with a list of known
port names in each state. The command generates a table with
the following columns:
@verbatim
COUNT number of transmission control blocks per state
STATE transmission control block state
PORTS well-known ports associated with the state
@end verbatim
The command uses some heuristics to identify the interesting
port numbers. First, all local port numbers are considered
where the local port number matches one of the listening port
numbers. From the remaining connections, all local port numbers
are considered with a well known name. From the remaining
connections, all remote port numbers are considered with a
well known name. All remaining connections are aggregated
under the pseudo name - (hyphen). Unspecified port numbers
are show using the pseudo name * (star).
The @command{monitor tcp connections} command displays the connected TCP
endpoints including the current state of the connection as seen
by the remote SNMP agent. The information is updated periodically.
The @command{monitor tcp states} command displays the distribution of TCP
connection states. The information is updated periodically.
@section UDP MODE
The scli udp mode is based on the UDP-MIB as published in
RFC 2013. It provides commands to browse information specific
to the UDP transport protocol.
@example
@command{show udp listener}
@command{show udp stats}
@end example
The @command{show udp listener} command displays the listening UDP
endpoints.
The @command{show udp statistics} about datagrams received or sent.
@node Extending, Problems, Modes and Commands, Top
@chapter Writing Extensions
This chapter describes the process of extending scli with new
commands. This is relatively straight-forward and does not require
any SNMP programming skills. All you need is to be able to read and
understand MIB definitions and some C programming skills.
The first thing you need to do in order to extend scli is to select
the set of MIBs needed to implement the new commands. Once you know
the list of required MIBs, you need to check whether there are already
stubs for these MIBs in the @code{stub} directory. If some are
missing, you have to create them.
Once you have all the MIB stubs, you need to decide which scli mode
should contain your new commands. An scli mode is simply a logical
grouping of related commands (e.g. all commands that deal with layer 2
bridges). A mode is usually implemented by a single C file in the
@code{scli} directory which is named like the mode itself.
Now that you know the mode for you commands, you can start writing
commands. Every command is implemented by a C function which basically
has three parts: command syntax parsing, executing the command
(usually this requires calls to other internal functions), and finally
cleanup.
@section Creating Stubs
Compiler generated MIB stubs are used to do all the low-level SNMP
work for you. To generate MIB stubs, you need to install the
@code{smidump} MIB compiler which comes with the @code{libsmi}
distribution. You need to make sure that the @code{smidump} compiler
version fits with the @code{scli} version since there are sometimes
changes between the stub interface and the SNMP engine interface. The
easiest way to ensure that you have a suitable compiler is to check
that the compiler version number matches the scli version number
contained in comments in the stub files contained in the @code{scli}
distribution.
@section Implementing Modes
Every scli mode implementation has only one externally visible entry
point which is used to initialize the mode. This name of the entry
point is by convention derived from the mode name. If we want to
implement a mode "example", the function would look like this:
@example
void scli_init_example_mode(scli_interp_t *@var{interp})
@end example
The declaration of the function prototype goes into the file
@file{scli.h} and a call of the initialization function must be added
in the file @file{scli.c}.
The main purpose of the entry point is to register the mode. This is
accomplished by filling out an instance of type @code{scli_mode_t}
which describes the mode. The first member of the structure is the
unique name of the mode. The second member is a string describing the
purpose of the mode and which standards or proprietary MIB modules are
relevant for it. The third parameter is a NULL-terminated vector of
@code{scli_cmd_t} structures, one structure for each command.
@verbatim
void
scli_init_example_mode(scli_interp_t *interp)
{
static scli_mode_t example_mode = {
"example",
"The scli example mode is only used to demontrate how you can\n"
"extend the scli interpreter with new modes and commands.",
NULL
};
scli_register_mode(interp, &printer_mode);
}
@end verbatim
@c [xxx]
@section Implementing Commands
The function below implements a @command{show hello world} command. A
function implementing an @code{scli} command is usually referred to as
a @dfn{command procedure}. Every command procedure is called with three
arguments:
@example
int (*@var{func}) (scli_interp_t *@var{interp}, int @var{argc}, char **@var{argv});
@end example
@enumerate
@item A pointer to the scli interpreter in @var{interp}.
@item The number of arguments in @var{argc}.
@item The command arguments as a vector of C strings in @var{argv}.
@end enumerate
Command procedures return an @code{scli} status code. See the file
@file{scli.h} for a description of the various error codes supported
by the @code{scli} interpreter. Below is an example which implements a
@command{show hello world} command.
@verbatim
static int
show_hello_world(scli_interp_t *interp, int argc, char **argv)
{
if (argc > 1) {
return SCLI_SYNTAX_NUMARGS;
}
if (scli_interp_dry(interp)) {
return SCLI_OK;
}
g_string_sprintfa(interp->result, "hello world");
return SCLI_OK;
}
@end verbatim
The first thing we have to do in a command procedure is syntax
parsing. This is important to get this right to ensure stability. In
the example above, we simply check that no arguments are present. If
there are any arguments, the command procedure returns the @code{scli}
error code @code{SCLI_SYNTAX_NUMARGS}.
Once we have successfully parsed the command, we have to decide
whether we really have to execute it. If the interpreter is running in
dry mode, we just parse the commands but do not execute them. This is
a handy tool for validating the syntax of an @code{scli} script file
without actually touching any devices and can be used to test that
your syntax parsing code really works as it should.
The next part of every command procedure implements the functionality.
In this case, we just copy the string @code{"hello world"} into the
interpreter's result string. The result string is a @code{glib}
@code{GString} which can dynamically grow. You should study the
@code{glib} documentation on how to use @code{GString}s effectively.
The last part in our command procedure is responsible for freeing any
resources and to return the status code. Since the @command{show hello
world} command always succeeds, we simple return @code{SCLI_OK}.
Once we have written a command procedure, we need to register the
command in the interpreter. This is done by filling out a data
structure which describes our command and registering this data
structure as part of the mode registration.
@c [xxx]
@section Adding MIB Stubs
It might be necessary to add stubs for additional MIB modules. This
process is very straightforward.
@enumerate
@item
Edit @code{stub/Makefile.am}
@item
Run @code{make} in the @code{stub} directory. Note that you need
a version of @code{smidump} which is compatible with the @code{scli}
release you are using.
@item
Edit @file{scli/scli.h} by adding the new header file(s) to the
includes at the end of the file.
@end enumerate
@section Dynamic Loading (Plugins)
@c [xxx]
This chapter explains how you can add functionality to @code{scli}
programs.
@c Guidelines:
@c - carefully validate user data before sending SNMP sets
@c - avoid sending SNMP sets if the desired state is already there
@node Problems, Concept Index, Extending, Top
@chapter Problems
If you find a bug in @code{scli}, please send electronic mail to
@w{@samp{scli@@ibr.cs.tu-bs.de}}. Include the version number, which
you can find by running @w{@samp{scli --version}}. Also include in
your message the output that the program produced and the output you
expected.@refill
If you have other questions, comments or suggestions about
@code{scli}, contact the author via electronic mail to
@w{@samp{schoenw@@ibr.cs.tu-bs.de}}. The author will try to help you
out, although he may not have time to fix your problems.
@node Concept Index, , Problems, Top
@unnumbered Concept Index
@cindex tail recursion
@printindex cp
@shortcontents
@contents
@bye
|