V0.13 RBLandau 19960519
All SENSE API entry points return status codes of C data type 'int'. If the status return is non-zero, it represents an error, or at least a warning, as specified below.
Symbol | Value | Meaning |
SFERR_NOERROR | 0 | No error, success, normal return, okay, cool, copascetic. |
SFERR_ADDRNOTAVAIL | 1 | Network address not available: cannot bind to address |
SFERR_BADCONTEXT | 2 | Invalid server context |
SFERR_BADPARAM | 3 | Invalid parameter |
SFERR_CALLBACKSTOP | 4 | Callback function requested stop |
SFERR_COMMERROR | 5 | Communications error |
SFERR_DATATOOBIG | 6 | Data too big: resulting message could not be transmitted |
SFERR_INTERNALERROR | 7 | Internal error |
SFERR_INTERRUPTED | 8 | Process was interrupted |
SFERR_NOACCESS | 9 | Access not allowed |
SFERR_NOITERATOR | 10 | No GetFirst operation to begin iteration |
SFERR_NOMEMORY | 11 | Memory allocation failure |
SFERR_NOMOREROOM | 12 | No more room, Namelist full: too many publications, clients, subscriptions, etc. |
SFERR_NONEXT | 13 | No next item (end of list) |
SFERR_NOSERVER | 14 | Server not responding |
SFERR_NOTFOUND | 15 | Not found |
SFERR_SYSTEM | 16 | System level error; on POSIX-compliant system, see errno |
SFERR_TIMEOUT | 17 | Timeout |
SFERR_VARNAMETOOBIG | 18 | Variable name too big |
SFERR_VARNOTFOUND | 19 | Variable not found |
SFERR_VARVALTOOBIG | 20 | Variable value too big |
SFERR_PROTOERROR | 21 | Protocol error: missing mandatory property |
SFERR_DUPLICATE | 22 | Duplicate instance or operation |
SFERR_NOTYETIMPLEMENTED | 23 | Feature not yet implemented |
SFERR_MAX_ERR_NUMBER | 23 | |
To enable vendors to build interoperable Publisher and Subscriber applications, most of the standard SENSE objects have some special properties that should be present and shall be named according to the following conventions.
Reading any of the reserved property names will always return a value and never return an error (except in the case of an access control violation). If the property has not been declared and given a value in the Server, then the Client API shall return an appropriate null value, a zero-length string.
Some properties apply to many objects. The "Id" property group contains any property that might, arguably, apply to any SENSE object; that is, its name begins with the prefix "Id." Some properties may be specific to certain object types, and will be named appropriately.
In general, not all properties will be supplied for all objects. If a Client retrieves a property that is not defined, the result is, in general, a NULL pointer; in cases where the caller has already supplied memory for a value, the returned value is a zero-length (null-terminated or counted, depending on the interface) string.
Name | Object(s) | Type | Description |
Condition.Code | Publication, Edition, Event, Server | integer | One of the following, corresponding to the given named conditions. See Appendix J for a description of condition codes. |
Condition.Text | Publication, Edition, Event, Server | string | Textual description of the condition. This should include human-readable, explanatory information, especially in the case of warning and attention conditions. |
Condition.Timestamp | Publication, Edition, Event, Server | date | The time at which the Condition last changed, or the time that the Condition was first declared. Number represented as yyyymmddHHMMSS.uuuuuu-ooo, the DMI standard date format, including microseconds and GMT offset in minutes. |
Condition.Last.Code | Publication, Edition, Event, Server | integer | Previous value of Condition.Code. |
Condition.Last.Text | Publication, Edition, Event, Server | string | Previous value of Condition.Text. |
Condition.Last.Timestamp | Publication, Edition, Event, Server | date | Previous value of Condition.Timestamp. |
Edition.Idlist | Publication, Server | list of integers | Comma-separated list of the Id numbers of the extant Editions of a specific Publication, or of all Publications in the Server. |
Id.App.Name | Client, Server | string | Supporting software name. |
Id.App.Version | Client, Server | string | Supporting software version. |
Id.Class | Client, Publication | string | SENSE class id. See Appendix K for list of class id values. |
Id.Id | All | string | Client registration id, server-assigned. (Numeric) |
Id.Contact | Client, Publication | string | sysContact equivalent. |
Id.Created | Publication, Edition | date | Timestamp when Publication was created. |
Id.Description | Client, Publication | string | sysDescription equivalent. |
Id.Host.Address | Client, Publication | string | Local host address. - For IP host, IP address in (numeric) dotted octet notation. - For IPX host, tbs. - For AppleTalk host, tbs. |
Id.Host.Id | Client, Publication | string | Platform-specific host id. On platforms supporting a unique identifier for licensing, that identifier value. |
Id.Host.Name | Client, Server | string | Local host name. - for IP host, fully-qualified internet name in dotted form. - For IPX host, tbs. - For AppleTalk host, tbs. |
" | Publication | string | The Id.Host.Name value of the primary Publisher that registered the Publication. |
Id.Host.Platform | Client, Publication | string | Platform descriptor. [[rules tbs]] |
Id.Installed | Publication | date | Date when entity was installed, from Installed item in DMI ComponentID Group. |
" | Server, Client | date | Date when software was installed. |
Id.Location | Client, Publication | string | sysLocation (MIB-II) equivalent. |
Id.Manufacturer | Publication | string | Vendor/creator information, from DMI ComponentID Group. |
Id.Modified | Publication | date | When the Publication was last modified. |
Id.Name | Publication | string | Publication name. This name should be a short name, a given name suitable as an icon label, for instance. Generally not a fully-qualified, formal name (which is in Id.Host.Name). |
" | Edition | string | Registered name of Edition, defining syntax, additional properties, event subset, periodicity, etc. See Appendix xx. |
Id.ObjectId | Publication | string | sysObjectId (MIB-II) equivalent. |
Id.Product | Publication | string | Related product name. |
Id.SenseVersion | Client | string | Version of SENSE communication protocol being used between Client and Server. |
" | Server | string | Highest version of SENSE communication protocol supported by Server. |
Id.SerialNumber | Client, Server | string | From DMI ComponentID Group. |
Id.Signature | Publication, Client | string | Quasi-password for privileged Publication operations, such as registering a persistent Publication or modifying Publication properties. Such security features are Server implementation-dependent. |
Id.Started | Publication, Server | date | When the entity was most recently started (rebooted, power-cycled, etc.). |
Id.URL | Client, Publication | string | Top-level URL, supplied by the vendor. |
Id.Version | Publication | string | Version information, from DMI ComponentID Group. |
etc. tbs | |||
The Publishers for an managed object in the network may be inside the object or outside it, logically or physically.
Servers, like Publishers, can be located inside a device or external to it in the network, both logically and physically.
If a large number of devices in a network include Servers, then the large number of servers can cause management problems.
In any case, a site may wish to reduce the number of servers to simplify management, simplify configuring Subscriber Clients, and to simplify the process of discovery by Clients. Sites can tailor the number and location of Servers, and the availability of Publications and Editions, using the Replicator application, described below. System managers can trade off management effort, vulnerability, difficulty of installing new devices, difficulty of configuring clients, etc., to suit local preferences.
A managed device may or may not contain SENSE components.
The system manager can control, to a great extent, the configuration of SENSE Servers in the local network. The number and location of Servers can be controlled to trade off, for instance, the difficulty of installing new devices against the difficulty of installing new clients. (A tool for controlling the configuration is the Replicator Application, described below.) The SENSE network can be tuned to local needs, system management style, and network management style.
Below is a partial list of considerations in configuring a SENSE network.
Strategy: small number of servers; every Publication represented in every server. | |
Advantage | Disadvantage |
Clients easy to configure: each client has one primary server, maybe one backup. | Installing new device usually requires configuring Replicator as well as Publisher for device. |
Servers can be concentrated on high availability or fault-tolerant systems. | Concentrating all status information in a few servers requires thoughtful fault management. |
Strategy: large number of servers. Extreme case is one server per managed device (Publication). | |
Advantage | Disadvantage |
Easy to install new device. If device includes Publisher and Server, just plug in and run. If device includes Publisher only, then configure to publish in a specific Server. | Hard to configure clients: client may have to search many Servers to find particular Publication(s) and Edition(s) of interest. |
Failures have limited impact. | Large number of objects in the network that require some management. |
Discovery of network objects is not a simple problem, and no single strategy is likely to be suitable for all situations. Most implementations may combine several strategies for finding servers.
The list below includes several possible strategies, from high tech to low tech, that might be useful to SENSE clients. (This list is only suggestive, not exhaustive.)
High technology is nice to have, but it requires a lot of network support and management. If some high tech solutions are not available in some configurations, or if high tech solutions need to be supplemented with simpler solutions that require less management, one can fall back to lower-tech solutions.
Note that the information the clients seek can be either static or dynamic, that is, either the clients read statically defined information, or they actively solicit dynamic information from the network. Static information may come either from a central name service or from distributed configuration files. Dynamic information may come either from passively listening to the network or from actively asking the network.
A SENSE Client application can be a Subscriber and a Publisher simultaneously. This feature enables two applications that permit unusual flexibility in configuring a SENSE network: the Replicator and the Translator.
The Replicator subscribes to Editions in one Server and publishes them unchanged in another Server, or in several other Servers. In general, a Replicator should reproduce all Editions for a Publication that it is replicating, but in some special circumstances it may be desirable to configure a Replicator to eliminate some Editions.
A Replicator can be used in two very different ways:
Replicators can be used by system managers to configure the SENSE servers in the network in very general ways.
The Translator application subscribes to Editions in one Server and publishes them in a different form, in the same server, in another Server, or in several other Servers.
Translators can be used to produce specialized Editions for specialized monitoring applications, even though primary Publishers for those Editions may not be available for some devices.
They don't. A SENSE Server uses only one network discipline at a time. That is, a SENSE Server may be capable of using IP, or IPX, or AppleTalk, but any instance of the Server is statically configured to use one network stack.
Every SENSE Server contains a Publication that represents the Server itself, and publishes several Editions detailing events within the Server.
The Server Publication is distinguished by the following properties. See Appendix B for further details.
Property | Value |
Id.Class | /Sense/Server |
Id.Host.Name | The network name of the computer system on which the Server is running. |
Servers shall include the following properties in the Server Publication.
Property | Value |
Condition.Code | Current condition. See Appendix J. |
Condition.Text | Textual description of condition. |
Condition.Timestamp | When condition last changed. |
Id.Class | /Sense/Server |
Id.Contact | sysContact equivalent: Who manages this Server? |
Id.Created | ? |
Id.Description | sysDescription equivalent. |
Id.Name | Server's administratively assigned name. |
Id.ObjectId | sysObjectID equivalent for this SENSE server, specific at least to manufacturer and version. |
Id.Host.Address | Local host address of the node on which the Server is running. - For IP host, dotted octet notation. |
Id.Host.Id | tbs |
Id.Host.Name | Local host name. - for IP host, fully-qualified internet name in dotted form. |
Id.Host.Platform | Platform descriptor. [[rules tbs]] |
Id.Installed | Date when the Server was installed. |
Id.Location | sysLocation equivalent for the node on which the Server is running. |
Id.Manufacturer | Vendor/creator information, DMI equivalent, for Server. |
Id.Modified | When the Server contents were last modified, that is, when a Publication or Edition was last registered or unregistered. |
Id.Name | Platform-dependent and network-dependent node name. |
Id.Product | Product name of the SENSE Server product. |
Id.SenseVersion | Highest version of SENSE comm protocol supported by Server. |
Id.SerialNumber | Server software serial number. |
Id.Started | When the Server was restarted (booted, restarted by management command, or similar). |
Id.URL | tbs |
Id.Version | Server software version information, DMI-equivalent. |
The Server Publication includes several Editions. All Servers shall publish at least the following editions.
Edition name | Edition Contents |
Server.Publications | Events signifying the registration and deregistration of Publications in this Server. |
Server.Editions | Events signifying the registration and deregistration of Editions in this Server. |
Server.All | All events of importance to a SENSE Server: registration and unregistration of Clients, Publications, Editions. |
An Edition of a Publication is a specific format and subset of event messages relating to that entity. Generally, an Edition includes a specific type of opaque data and a specific set of properties that describe the event and the resulting condition of the entity. Together these two specifications describe the format of SENSE Event messages of this Edition.
Event Protocols are typed with respect to the syntax and content of the information conveyed within Event messages. Several protocols have subtypes that further delineate syntax and/or content aspects of the Event messages.
The official names of each Event Protocol described below are used as the keywords for the DATA property present in each Event message. In effect, these names serve as a classing mechanism that is typically used by a SENSE Client to distinguish among the various Event Protocols associated with a Publication Edition. Therfore, if an Edition is published in one of these protocols, the Publisher shall use the string given here as the first atom of the value of the Edition property Id.Name.
Event Protocol names are structured using the standard "dotted octet" form that provides a visual and processable form of class hierarchy. A collection of Event Protocols that compose a particular hierarchy are referred to as an "Edition set" in this document.
CPAP | Common Printer Access Protocol | Specification |
CPAP.Acct | Accounting Log | |
CPAP.EventLog | Event Log | |
CPAP.ShowState | Show State | |
SCSEP | Simple CommonSENSE Event Protocol | |
SNMP | Simple Network Management Protocol | |
SNMP.SET | SNMP Set Response Messages | |
SNMP.V1.Jobs | Job Monitoring MIB | |
SNMP.V1.Printer | Printer MIB (RFC 1759) | |
SNMP.V1.TRAP | SNMPv1 TRAP Messages | below |
SNMP.V2.TRAP | SNMPv2 TRAP Messages | below |
SERVER | SENSE Server Events | |
Server.Editions | Edition registration/unregistration | |
Server.Publications | Publication registration/unregistration | |
Server.All | All object and management activity within Server | |
STEP | Simple Text Event Protocol | |
STEP.SingleLine | Single Line Text | below |
STEP.SingleLine.CC | Single Line Text with Condition Code | |
STEP.MultiLine | Multiple Lines of Text | |
TIPSI | Transport Independent Printing System Interface (IEEE 1284.1) | |
TIPSI.CPMA | Common Printer MIB/MIF Alerts | |
TIPSI.DSA | Device Status Alerts | |
TIPSI.IMA | Interpreter Message Alerts | |
TIPSI.JCA | Job Control Alerts | |
TIPSI.OPA | Operator Panel Alerts | |
etc. tbs | ||
The SENSE Server is also a manageable object in the network, and can be managed through the client management interface. After passing local security screens, a Manager Client can modify the properties and operation of the Server.
Property | R/W? | Value Semantics of SET |
Id.Name | RW | Post-it-note to supply Server with nickname. |
Id..Location.Node | RO | Fully-qualified network name of the node on which the Server is running. |
Id.Location.Port | RW | Network port on which Server listens for Client requests. If zero, the Server uses the default port. |
" | On Write: If the new port number is different from the current value, close all current connections, delete all current registrations, listen for new connections on the new port number. | |
Server.RateLimiting | RW | Time in milliseconds between Server-emitted copies of Event messages. |
Server.Reminders | RO | Boolean value "T" or "F". Does the Server send reminder messages before Client registrations lapse? |
etc. tbs | ||
Property | Value |
Id.Name | SNMP.TRAP |
For this edition, the opaque data in each event message is an SNMP V1 TRAP-PDU. The trap message should be precisely what would be delivered to a process by the UDP service on the client platform for a real SNMP TRAP message.
The TRAP message shall contain whatever fields are required by the NOTIFICATION-TYPE macro that defines the message for this type of trap. The cause of the trap, the TrapOID, etc., depend on the device and the event.
Publishers shall include the following Publication properties in every Event Message of this Edition.
Property | Type | Contents |
Condition.Code | integer | Most recent known condition of the Publication entity. See Appendix J. |
Condition.Text | string | Text string representing the condition of the entity. |
Publishers may also include other Publication and Edition properties in Event Messages.
For some devices, it may be desirable to publish a minimal Edition of the Publication that reports changes in the overall "condition" of the device. Such an edition can be used for very simple green-yellow-red-light status monitoring applications.
Property | Value |
Id.Name | Minimal |
The minimal Edition of a Publication contains no opaque data. The length of the opaque data region of the message is zero.
Publishers shall include the following Publication properties in every Event Message of this Edition.
Property | Type | Contents |
Condition.Code | integer | Most recent known condition of the Publication entity. See Appendix J. |
Condition.Text | string | Text string representing the condition of the entity. |
Publishers may also include other Publication and Edition properties in Event Messages.
The SENSE Server adds several properties to an Event message in an Edition when it forwards the message to Subscribers of that Edition. The Server includes enough identifying information that the Subscriber can uniquely identify the message source, and can recognize duplicate messages in the case of retransmissions.
Property | Type | Contents |
Pub.Id | integer | Id number of the Publication on this Server. |
Ed.Id | integer | Id number of the Edition on this Server. |
Subs.Id | integer | Id number of the Subscription of the Client to this Edition |
Msg.Id | integer | Serial id number assigned to this message. The id is unique to this combination of Server, Subscription, and Event. If the same message is subsequently retransmitted, all the copies will contain the same id number. |
Msg.Timestamp | date | When the Server sent this message to the Client. If the same message is subsequently retransmitted, each copy will contain the timestamp when it was sent by the Server. |
The property Condition.Code contains a composite value that is encoded as described in this section. The condition code is a three-digit value that contains three sub-codes. In order from right to left, from least-significant digit to most-significant digit, the sub-codes represent Activity (values 0-9), Health (values 0-4), and Support (values 0-5).
Additionally, the three-digit general condition code may be prefixed with a vendor code. The format of vendor codes is vendor-specific. If a vendor code is present, all three digits of the condition code must be specified, including leading zeros, so that the general condition code and vendor code may be unambiguously distinguished.
[[more tbs]]
Dimension | Digit | Denoting |
Activity | units | Current level of activity, ranging from "idle" to "extremely busy." |
Health | tens | Overall operational status, indicating the relative severity of a problem, if there is a problem. |
Support | hundreds | Level of technical training or support required to resolve the problem indicated. |
Value | Support | Health | Activity |
0 | Unknown | Unknown | Unknown |
1 | None | Healthy | Idle |
2 | User | Warning, transient | Not idle |
3 | Operator | Warning, persistent | Lightly busy |
4 | Technician | Alert | Busier (see below) |
5 | Administrator | (reserved) | Busier (see below) |
6 | (reserved) | (reserved) | Moderately busy |
7 | (reserved) | (reserved) | Busier (see below) |
8 | (reserved) | (reserved) | Busier (see below) |
9 | (reserved) | (reserved) | Extremely busy |
The "Support" code describes the level of human expertise required to resolve a problem, ranging from basic familiarity with the device to trained hardware or software service skills.
Value | Label | Meaning |
0 | Unknown | Unable to determine the required support. |
1 | None | No support required (entity should be healthy). |
2 | User | Very low knowledge required. |
3 | Operator | Some knowledge required, not necessarily technical. |
4 | Technician | Special training required, usually on the physical aspects of the entity; for example, Field Service personnel. |
5 | Administrator | Special training required, usually dealing with software configuration, compatibility or interoperability; for example, System Manager. |
6-9 | (reserved) | Reserved for future definitions. |
The "Activity" code describes the recent level of activity in the device, from idle to very busy. In many devices, there may not be sufficient history to evaluate this property in detail. If the Publisher does not have the data necessary to make find distinctions, it should indicate only that the device is "idle" or "not idle." If the Publisher has no data about device activity, it should indicate "unknown."
Value | Label | Meaning |
0 | Unknown | Unable to determine activity level. |
1 | Idle | Definitely no activity. |
2 | Not idle | Some activity is present, but unable to determine any kind of level. |
3 | Low activity | Wthin the spectrum of ability to determine an activity level, this implies the least level of activity. |
4,5 | Below-average busy | More than lightly busy. |
6 | Average busy | Average level of activity; if the level of activity can be measured in some way, then this value represents the mid-point of the range. |
7,8 | Above-average busy | Busier than average. |
9 | Extremely busy | As busy as the entity can possibly be without exploding, going on strike, or otherwise punting off into oblivion. |
The "Health" code describes the ability of the device to continue processing without receiving attention or service.
Value | Label | Meaning |
0 | Unknown | Unable to determine the health of the entity. |
1 | Healthy | The entity is capable of normal processing. |
2 | Warning, transient | The entity is not capable of normal processing at the moment, but the condition should clear itself without assistance in a short period of time. |
3 | Warning, persistent | The entity may still be capable of normal processing, but the condition will not clear itself without operator intervention. |
4 | Alert | The entity is definitely not capable of normal processing, and the condition that prevents processing requires operator intervention. |
5-9 | (reserved) | Reserved for future expansion. |
[[many examples tbs]]
The Id.Class property of a Publication can be used to distinguish quickly the type of network entity that the Publication represents. This property is used in the ObjectGetFirst() API function to restrict the search to a particular class of Publications.
Class | Contents |
/Sense/Printer | Publications representing printers, according to their Publishers. |
/Sense/Host | Publications representing computer systems on the network. |
/Sense/Host/Filesystem | Publications representing the file storage subsystem of a computer system on the network. |
etc. tbs | |
SENSE objects other than Publications also use the Id.Class property to distinguish these objects in the ObjectGetFirst() function. Note that enumerating certain classes of objects, such as Clients, may be subject to security constraints in some implementations.
Class | Contents |
/Sense/Server | The Server Publication for this Server. |
/Sense/Publisher | All Clients that have currently registered Editions in this Server. |
/Sense/Edition | All Editions currently registered in this Server. |
/Sense/Client | All Clients currently registered with this Server. |
/Sense/Subscription | All Subscriptions currently registered in this Server. |
etc. tbs | |