mrose@cheetah.ca.psi.com (Marshall Rose) (05/26/91)
Archive-name: internet/snmp/unix-mib/1991-05-24 Archive: venera.isi.edu:/mib/unix [128.9.0.32] Original-posting-by: mrose@cheetah.ca.psi.com (Marshall Rose) Original-subject: We can name that tune in 26 objects... system management Reposted-by: emv@msen.com (Edward Vielmetti, MSEN) Several of the SNMP principals were discussing the OSF DME at the recent IFIP 6.6 Symposium on network management and were considering how difficult it would be to accomplish the OSF goals for DME using the SNMP. The emminent Prof. Case observed that "it's just more MIB variables" which piqued my curiosity. Since the SNMP modus operandi has always tempered all proposals through implementation experience, I created an implementation which will be found in the next beta release of ISODE. The implementation goes beyond proof of concept and may be useful to managers of Unix systems--it will let them use the same friendly and powerful tools for monitoring and controlling their Unix hosts that they are already successfully using for monitoring and controlling their network devices. Of course, I did not implement all of the possible objects only those which are most important to me: 26 objects to deal with user administration and printing queues. When defining new objects, the trick is to be able to define the minimal set of objects for useful management. The current system management objects have been aded to the UNIX MIB which is available on venera.isi.edu in the public mib/ area. On the agent side: The agent supports the MIB, with full read/write access, depending on the authorization permissions associated with the manager's community. This means you can: - examine/add/lock/remove users and groups - examine/start/stop/enable/disable/abort/clean printer queues - examine/remove/reschedule printer jobs The particular linkage to the agent is achieved via a SMUX peer. (For people in the past who've asked questions about how to write SMUX peers that do sets, the code supplied provides an good example.) The agent-side support for the MIB is for BSD UNIX systems. SysV people will have to roll their own (but this is pretty straight-forward). On the manager side: You can either use a command line interface like snmpi. In addition, two snmp-capable gawk scripts have been written, so you can do s-netstat -u to look at users, and s-netstat -p to look at print queues. An example is below. Further, fans of snmp-capable gawk will be happy to know that it now supports the SNMP set operation. So you can get full read/write access to SNMP via a gawk script. All of this stuff is running now (of course), and will be in the next ISODE beta release, due out in a few weeks. So, system management via SNMP is openly-available, if you so choose! /mtr ps: Here's that example I promised: % s-netstat -p Name Status Jobs Remarks ps Q+P+D+ 1 status: busy; source: AppleTalk Rank Owner Job Files Total Size active mrose 711 comments.ps 81959 bytes pps: here's a portion of the gawk script that got invoked: ... BEGIN { ... didone = 0; for (i in printQName) { if (didone) printf "\n"; else { printf "%-8s %-6s %-4s %s\n", "Name", "Status", "Jobs", "Remarks"; didone = 1; } printf "%-8s %-6s %4d %s\n", printQName, pq_flags(printQStatus), printQEntries, printQDisplay; x = split (i, instance, ".") + 1; didentries = 0; for (j in printJRank, i) { if (split (j, instance, ".") != x) break; if (didentries == 0) { printf "%-6s %-10s %-3s %-37s %s\n", "Rank", "Owner", "Job", "Files", "Total Size"; didentries = 1; } printf "%-6s %-10s %-3s %-37s %d bytes\n", pj_rank(printJRank), pj_owner(printJOwner), substr(printJName, 4, 3), printJDescription, printJSize; } } if (!didone && DIAGNOSTIC) printf "print: %s\n", DIAGNOSTIC; } -- comp.archives file verification venera.isi.edu -rw-rw-r-- 1 1216 104 23747 May 23 23:16 /mib/unix found unix-mib ok venera.isi.edu:/mib/unix