Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, February 9, 2022

snmpstatus (1)


snmpstatus - retrieves a fixed set of management information from a network entity


snmpstatus [COMMON OPTIONS] [-Cf] AGENT


SNMPSTATUS(1)                      Net-SNMP                      SNMPSTATUS(1)

       snmpstatus  -  retrieves  a  fixed set of management information from a
       network entity

       snmpstatus [COMMON OPTIONS] [-Cf] AGENT

       snmpstatus is an SNMP application that retrieves several important sta-
       tistics from a network entity.

       AGENT  identifies a target SNMP agent, which is instrumented to monitor
       the given objects.  At its simplest, the AGENT specification will  con-
       sist  of a hostname or an IPv4 address.  In this situation, the command
       will attempt communication with the agent, using UDP/IPv4 to  port  161
       of the given target host.

       See  the snmpcmd(1) manual page for a full list of the possible formats
       for AGENT.

       The information returned is:

              The IP address of the entity.
              A textual description of the entity (sysDescr.0)
              The uptime of the entity's SNMP agent (sysUpTime.0)
              The sum of received packets on all interfaces (ifInUCastPkts.* +
              The  sum  of transmitted packets on all interfaces (ifOutUCastP-
              kts.* + ifOutNUCastPkts.*)
              The number of IP input packets (ipInReceives.0)
              The number of IP output packets (ipOutRequests.0)

       For example:

       snmpstatus -c public -v 1 netdev-kbox.cc.cmu.edu

       will produce output similar to the following:

       []=>[Kinetics FastPath2] Up: 1 day, 4:43:31
       Interfaces: 1,  Recv/Trans packets: 262874/39867 | IP: 31603/15805

       snmpstatus also checks the operational status of all interfaces  (ifOp-
       erStatus.*),  and  if it finds any that are not running, it will report
       in a manner similar to this:

       2 interfaces are down!

       If the network entity has an error processing the  request  packet,  an
       error  packet  will be returned and a message will be shown, helping to
       pinpoint in what  way  the  request  was  malformed.   snmpstatus  will
       attempt  to  reform  its  request  to  eliminate the malformed variable
       (unless the -Cf option is given, see below),  but  this  variable  will
       then be missing from the displayed data.

              Please  see  snmpcmd(1) for a list of possible values for COMMON
              OPTIONS as well as their descriptions.

       -Cf    By default, snmpstatus will try to fix errors  returned  by  the
              agent  and  retry a request. In this situation, the command will
              display the data that it can. If the -Cf  option  is  specified,
              then  snmpstatus  will not try to fix errors, and the error will
              cause the command to terminate.

       See attributes(7) for descriptions of the following attributes:

       |ATTRIBUTE TYPE |        ATTRIBUTE VALUE          |
       |Availability   | system/management/snmp/net-snmp |
       |Stability      | Volatile                        |

       snmpcmd(1), snmpget(1)

       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source  was  downloaded   from    https://sourceforge.net/projects/net-

       Further information about this software can be found on the open source
       community website at http://www.net-snmp.org/.

V5.8                              25 Jul 2003                    SNMPSTATUS(1)