12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14Utility NamesnmptestsnmpstatussnmptablesnmptranslatesnmpusmsnmpvacmsnmpdfsnmptrapDescription of functionalityCommunicates with SNMP servers using user specified SNMP requests.Retrieves a fixed set of management information from SNMP server.Retrieves an SNMP table and displays it in tabular format.Translates OID names from numeric to text and vice versa.Manages SNMPv3 users on SNMP servers.Manages SNMPv3 View-based Access Control on SNMP servers.Retrieves disk usage information from SNMP server.Sends TRAP-PDU or TRAP2-PDU to trap receiver.The snmpget(1) utility is a handy tool to retrieve SNMP variables from anSNMP agent.# snmpget –v 1 –c public 10.10.1.3 sysName.0SNMPv2-MIB::sysName.0 = STRING: server01.example.orgThis example shows retrieveing sysName variable from host 10.10.1.3. Thisquery is initiaited using SNMP version 1 (hence the -v parameter) and a read-onlycommunity named public is configured on the SNMP server.On the other hand, snmpwalk(1) actually retrieves a complete sub-tree fromthe SNMP server. It can be used to populate a complete set of data from anSNMP-enabled host.# snmpwalk -v 1 -c public 10.10.1.3 IF-MIB::ifDescrIF-MIB::ifDescr.1 = STRING: sis0IF-MIB::ifDescr.2 = STRING: xl0IF-MIB::ifDescr.3 = STRING: lo0This example shows how to retrieve the ifDescr sub-tree from IF-MIB. Note thatyou can retrieve the complete SNMP MIB tree from the host, if you do not specifyany SNMP OID in parameters. This will most likely give a huge amount of output,but it is useful to see what kind of information you can get from the host.PrintingObviously FreeBSD can be used to connect to printers and communicate with them.This is not a big deal, since pretty much every other operating system has a printinginterface that can be hooked up to standard printers, and print documents. Besidesthat, FreeBSD can be used as a full-featured print server. As a print server, yourFreeBSD host can receive print jobs from multiple hosts over the network, and spoolthe jobs and then print them respectively.[ 251 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!