文件操作 - MSM_MR_help-2-43.html
返回文件管理
返回主菜单
删除本文件
文件: /usr/local/MegaRAID Storage Manager/docs/MSM_MR_help/MSM_MR_help-2-43.html
编辑文件内容
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="keywords" content="MegaRAID SAS SW UG" /> <title>Installing and Configuring an SNMP Agent on Linux</title> <link rel="StyleSheet" href="css/v10392197.css" type="text/css" media="all" /> <link rel="StyleSheet" href="css/webworks.css" type="text/css" media="all" /> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/context.js"></script> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/towwhdir.js"></script> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/wwhpagef.js"></script> <script type="text/javascript" language="JavaScript1.2"> <!-- var WebWorksRootPath = ""; // --> </script> <script type="text/javascript" language="JavaScript1.2"> <!-- // Set reference to top level help frame // var WWHFrame = WWHGetWWHFrame("", true); // --> </script> <script type="text/javascript" language="JavaScript1.2" src="scripts/expand.js"></script> </head> <body onload="WWHUpdate();" onunload="WWHUnload();" onkeydown="WWHHandleKeyDown((document.all||document.getElementById||document.layers)?event:null);" onkeypress="WWHHandleKeyPress((document.all||document.getElementById||document.layers)?event:null);" onkeyup="WWHHandleKeyUp((document.all||document.getElementById||document.layers)?event:null);"> <br /> <div class="WebWorks_Breadcrumbs" style="text-align: left;"> <a class="WebWorks_Breadcrumb_Link" href="MSM_MR_help-2-01.html">Installation</a> : <a class="WebWorks_Breadcrumb_Link" href="MSM_MR_help-2-23.html">Installing and Supporting the MegaRAID Storage Manager Software on VMware</a> : <a class="WebWorks_Breadcrumb_Link" href="MSM_MR_help-2-34.html">Installing and Configuring an SNMP Agent</a> : Installing and Configuring an SNMP Agent on Linux</div> <hr align="left" /> <blockquote> <p class="Heading_3"><a name="3_4_28_18_12_1">Installing and Configuring an SNMP Agent on Linux</a></p> <p class="Body"><a name="3_4_28_18_12_3_1_2">This section explains how to install and configure the SAS SNMP Agent for the SuSE Linux and Red Hat Linux operating systems.</a></p> <p class="Body"><a name="3_4_28_18_12_3_1_3">Perform the following steps to install and configure the SAS SNMP Agent for the SuSE Linux and Red Hat Linux operating systems:</a></p> <p class="note"> <span style="font-family: Sans-Serif; font-weight: bold">NOTE </span><a name="3_4_28_18_12_3_1_4">This procedure requires that you have the Net-SNMP agent installed on the Linux machine. The RPM has not been created to support -U version. The RPM -U will probably fail with this RPM.</a></p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">1. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_1">Install the Avago SAS SNMP Agent using the </a></span><span class="codeph">rpm -ivh </span><span class="varname"><sas rpm></span><span class="Command"> command.</span></p> </td> </tr> </table> </div> <p class="note_1"> <span style="font-family: Sans-Serif; font-weight: bold">NOTE </span><a name="3_4_28_18_12_3_2_1_4_2">Before installation, check whether any pass command exists that starts with 1.3.6.1.4.1.3582 OID in </a><span class="filepath">snmpd.conf</span>. If so, delete all of the old pass commands that start with 1.3.6.1.4.1.3582 OID. (This situation could occur if an earlier version of the Avago SNMP Agent was installed in the system.)</p> <p class="note_1"> <span style="font-family: Sans-Serif; font-weight: bold">NOTE </span><a name="3_4_28_18_12_3_2_1_4_3">After installation, find the SAS MIB file </a><span class="filepath">LSI-AdapterSAS.mib</span> under the <span class="filepath">/etc/lsi_mrdsnmp/sas</span> directory. RPM makes the necessary modification needed in the <span class="filepath">snmpd.conf</span> file to run the agent.</p> <p class="Body_1"><a name="3_4_28_18_12_3_2_1_4_4">The </a><span class="filepath">snmpd.conf</span> file structure should be the same as the file structure l<span class="filepath">si_mrdsnmpd.conf</span>. For reference, a sample configuration file (<span class="filepath">lsi_mrdsnmpd.conf</span>) is in the <span class="filepath">/etc/lsi_mrdsnmp</span> directory.</p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">2. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_2">To run an SNMP query from a remote machine, add the IP address of that machine in the </a></span><span class="filepath">snmpd.conf</span><span class="Command"> file, as in this example:</span></p> </td> </tr> </table> </div> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_2_4_2">com2sec snmpclient 172.28.136.112 public</a></p> <p class="Body_1"><a name="3_4_28_18_12_3_2_2_4_3">Here, the IP address of the remote machine is 172.28.136.112.</a></p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">3. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_3">To receive an SNMP trap to a particular machine, add the IP address of that machine in the </a></span><span class="filepath">com2sec</span><span class="Command"> section of the </span><span class="filepath">snmpd.conf</span><span class="Command"> file.</span></p> </td> </tr> </table> </div> <p class="Body_1"><a name="3_4_28_18_12_3_2_3_4_2">For example, to get a trap in 10.0.0.144, add the following to the </a><span class="filepath">snmpd.conf</span> file.</p> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_3_4_3"># sec.name source community <br />com2sec snmpclient 10.0.0.144 public</a></p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">4. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_4">To send SNMPv1 traps to a custom port, add the following configuration information to the </a></span><span class="filepath">snmpd.conf</span><span class="Command"> file:</span></p> </td> </tr> </table> </div> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_4_4_2">Trapsink HOST [community [port] ]</a></p> <p class="info_1"><a name="3_4_28_18_12_3_2_4_5">Specify the custom port number; otherwise, the default SNMP trap port, 162, is used to send traps.</a></p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">5. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_5">To run or stop the </a></span><span class="codeph">snmpd</span><span class="Command"> daemon, enter the following command:</span></p> </td> </tr> </table> </div> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_5_4_2">/etc/init.d/snmpd start <br />/etc/init.d/snmpd stop</a></p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">6. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_6">To start or stop the SAS SNMP Agent daemon before issuing a SNMP query, enter the following command:</a></span></p> </td> </tr> </table> </div> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_6_4_2">/etc/init.d/lsi_mrdsnmpd start <br />/etc/init.d/lsi_mrdsnmpd stop</a></p> <p class="Body_1"><a name="3_4_28_18_12_3_2_6_4_3">You can check the status of the SAS SNMP Agent daemon by checked by entering the following command:</a></p> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_6_4_4">/etc/init.d/lsi_mrdsnmpd status</a></p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">7. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_7">Issue an SNMP query in this format:</a></span></p> </td> </tr> </table> </div> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_7_4_2">snmpwalk -v1 -c public localhost .1.3.6.1.4.1.3582</a></p> <div class="Step_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Step_1_inner" style="width: 18pt; white-space: nowrap">8. </p> </td> <td width="100%"> <p class="Step_1_inner"><span class="Command"><a name="3_4_28_18_12_3_2_8">You can get the SNMP trap from local machine by issuing the following command:</a></span></p> </td> </tr> </table> </div> <p class="Preformatted_1"><a name="3_4_28_18_12_3_2_8_4_2">snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A %v\n"</a></p> <p class="note_1"> <span style="font-family: Sans-Serif; font-weight: bold">NOTE </span><a name="3_4_28_18_12_3_2_8_4_3">To receive a trap in a local machine with Net-SNMP version 5.3, you must modify the </a><span class="filepath">snmptrapd.conf</span>, file (generally located at <span class="filepath">/var/net-snmp/snmptrapd.conf</span>). Add the <span class="filepath">disableAuthorization yes</span> line in the <span class="filepath">snmptrapd.conf</span> file and then run the <span class="cmdname">sudo snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A %v\n</span> command.</p> <p class="note_1"> <span style="font-family: Sans-Serif; font-weight: bold">NOTE </span><a name="3_4_28_18_12_3_2_8_4_4">It is assumed that the </a><span class="filepath">snmpd.conf</span> file is located in the <span class="filepath">/etc/snmp</span> directory for the Red Hat operating system and the <span class="filepath">/etc</span> directory for the SLES operating system. You can change the file location from the <span class="filepath">/etc/init.d/lsi_mrdsnmpd</span> file.</p> <p class="Body"><a name="3_4_28_18_12_3_3_2">You can install SNMP without the trap functionality. To do so, set the TRAPIND environment variable to </a><span class="codeph">N</span> before running RPM.</p> <p class="Body"><a name="3_4_28_18_12_3_3_3">Before you install a new version, you must uninstall all previous versions.</a></p> <p class="Body"><a name="3_4_28_18_12_3_3_4">For the SLES 10 operating system, perform the following steps to run SNMP:</a></p> <div class="Numbered_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Numbered_1_inner" style="width: 18pt; white-space: nowrap">1. </p> </td> <td width="100%"> <p class="Numbered_1_inner"><a name="3_4_28_18_12_3_3_5_1">Copy the </a><span class="filepath">/etc/snmp/snmpd.conf</span> file to the <span class="filepath">/etc/snmpd.conf</span> file.</p> </td> </tr> </table> </div> <div class="Numbered_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Numbered_1_inner" style="width: 18pt; white-space: nowrap">2. </p> </td> <td width="100%"> <p class="Numbered_1_inner"><a name="3_4_28_18_12_3_3_5_2">Modify the </a><span class="filepath">/etc/init.d/snmpd</span> file, and change the <span class="filepath">SNMPDCONF=/etc/snmp/snmpd.conf</span> entry to <span class="filepath">SNMPDCONF=/etc/snmpd.conf</span>.</p> </td> </tr> </table> </div> <div class="Numbered_1_outer" style="margin-left: 1px"> <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation"> <tr style="vertical-align: baseline"> <td> <p class="Numbered_1_inner" style="width: 18pt; white-space: nowrap">3. </p> </td> <td width="100%"> <p class="Numbered_1_inner"><a name="3_4_28_18_12_3_3_5_3">Run </a><span class="cmdname">LSI SNMP rpm</span>.</p> </td> </tr> </table> </div> <script type="text/javascript" language="JavaScript1.2"> <!-- // Clear related topics // WWHClearRelatedTopics(); document.writeln(WWHRelatedTopicsInlineHTML()); // --> </script> </blockquote> <hr align="left" /> <!-- LSI changed location of company info to align left --> <!-- Added rol from 2011.3 pages.asp file --> <!-- LSI added copyright style --> <!-- --> <table align="left" role="presentation"> <!-- LSI added support for booknum and reldate --> <!-- --> <tr> <td class="copyright">DB09000202-21, Rev 2.2, July 2015</td> </tr> <tr> <td class="copyright"> <a href="http://www.lsi.com/Pages/trademark.aspx?" target="external_window">Copyright© 2015 by Avago Technologies. All rights reserved.</a> </td> </tr> </table> <script type="text/javascript" language="JavaScript1.2"> <!-- document.write(WWHRelatedTopicsDivTag() + WWHPopupDivTag() + WWHALinksDivTag()); // --> </script> </body> </html>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件