文件操作 - MSM_IR_help-2-29.html
返回文件管理
返回主菜单
删除本文件
文件: /usr/local/MegaRAID Storage Manager/docs/MSM_IR_help/MSM_IR_help-2-29.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" /> <title>Installing and Configuring an SNMP Agent on the Linux Operating System</title> <link rel="StyleSheet" href="css/v10392091.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_IR_help-2-01.html">Installation</a> : <a class="WebWorks_Breadcrumb_Link" href="MSM_IR_help-2-27.html">Installing and Configuring an SNMP Agent</a> : Installing and Configuring an SNMP Agent on the Linux Operating System</div> <hr align="left" /> <blockquote> <p class="Heading_2"><a name="3_4_40_8_1">Installing and Configuring an SNMP Agent on the Linux Operating System</a></p> <p class="Body"><a name="3_4_40_8_3_1_2">Perform these steps to install and configure 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_40_8_3_1_3">This procedure requires that you have the Net-SNMP Agent installed on the Linux machine. The RPM has not been created to support the </a><span class="codeph">-U</span> version. The RPM <span class="codeph">-U</span> version will probably fail with this RPM.</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_40_8_3_2_1">Install the Avago SAS SNMP Agent using </a></span><span class="codeph">rpm -ivh <sas rpm></span><span class="Command">.</span></p> </td> </tr> </table> </div> <p class="Body_1"><a name="3_4_40_8_3_2_1_4_2">After installation, the </a><span class="codeph">LSI-AdapterSAS.mib</span> SAS MIB file is in the <span class="codeph">/etc/lsi_mrdsnmp/sas</span> directory.</p> <p class="Body_1"><a name="3_4_40_8_3_2_1_4_3">This RPM makes the necessary modification needed in the </a><span class="codeph">snmpd.conf</span> file to run the agent.</p> <p class="note_1"> <span style="font-family: Sans-Serif; font-weight: bold">NOTE </span><a name="3_4_40_8_3_2_1_4_4">Before installation, check if there is any pass command that starts with 1.3.6.1.4.1.3582 OID in the </a><span class="codeph">snmpd.conf</span>file.</p> <p class="NoteEnd"><a name="3_4_40_8_3_2_1_4_4_4">If so, delete all of the old pass commands that start with 1.3.6.1.4.1.3582 OID. This situation can occur if an earlier version of the Avago SNMP Agent was installed in the system.</a></p> <p class="Body_1"><a name="3_4_40_8_3_2_1_4_5">The </a><span class="codeph">snmpd.conf</span> file structure should be the same as <span class="codeph">lsi_mrdsnmpd.conf.</span> For reference, a sample configuration file (<span class="codeph">lsi_mrdsnmpd.conf</span>) is in the <span class="codeph">/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_40_8_3_2_2">To run an SNMP query from a remote machine, add the IP address of that machine in the snmpd.conf file, as in this example:</a></span></p> </td> </tr> </table> </div> <p class="Body_1"><span class="codeph"><a name="3_4_40_8_3_2_2_4_2">com2sec snmpclient 172.28.136.112 public</a></span></p> <p class="Body_1"><a name="3_4_40_8_3_2_2_4_3">In this example, 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_40_8_3_2_3">To receive an SNMP trap to a particular machine, add the IP address of that machine to the com2sec section of the </a></span><span class="codeph">snmpd.conf</span><span class="Command"> file.</span></p> </td> </tr> </table> </div> <p class="Body_1"><a name="3_4_40_8_3_2_3_4_2">For example, to get a trap in 10.0.0.144, add the following to the </a><span class="codeph">snmpd.conf</span> file.</p> <p class="Body_1"><span class="codeph"><a name="3_4_40_8_3_2_3_4_3"># sec.name source communitycom2sec snmpclient 10.0.0.144 public</a></span></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_40_8_3_2_4">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="Body_1"><span class="codeph"><a name="3_4_40_8_3_2_4_4_2">/etc/init.d/snmpd start/stop</a></span></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_40_8_3_2_5">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="Body_1"><span class="codeph"><a name="3_4_40_8_3_2_5_4_2">/etc/init.d/lsi_mrdsnmpd start/stop</a></span></p> <p class="Body_1"><a name="3_4_40_8_3_2_5_4_3">You can check the status of the SAS SNMP Agent daemon by entering the following command:</a></p> <p class="Body_1"><span class="codeph"><a name="3_4_40_8_3_2_5_4_4">/etc/init.d/lsi_mrdsnmpd status</a></span></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_40_8_3_2_6">Issue an SNMP query in this format:</a></span></p> </td> </tr> </table> </div> <p class="info_1"><span class="codeph"><a name="3_4_40_8_3_2_6_4">snmpwalk -v1 -c public localhost .1.3.6.1.4.1.3582</a></span></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_40_8_3_2_7">Get the SNMP trap from local machine by entering the following command:</a></span></p> </td> </tr> </table> </div> <p class="info_1"><span class="codeph"><a name="3_4_40_8_3_2_7_4">snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A %v\n"</a></span></p> <p class="note"> <span style="font-family: Sans-Serif; font-weight: bold">NOTE </span><a name="3_4_40_8_3_3_2">To receive a trap in a local machine with Net-SNMP version 5.3, you must modify the </a><span class="codeph">snmptrapd.conf</span> file (generally located at <span class="codeph">/var/net-snmp/snmptrapd.conf</span>).</p> <p class="NoteNext"><a name="3_4_40_8_3_3_2_7">Add </a><span class="codeph">"disableAuthorization yes"</span> in the <span class="codeph">snmptrapd.conf</span> file and then run the <span class="codeph">sudo snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A %v\n”</span> command.</p> <p class="NoteEnd"><a name="3_4_40_8_3_3_2_8">It is assumed that the </a><span class="codeph">snmpd.conf</span> file is located in the <span class="codeph">/etc/snmp</span> directory for Red Hat operating system and the <span class="codeph">/etc</span> directory for the SLES operating system. You can change the file location from the <span class="codeph">/etc/init.d/lsi_mrdsnmpd</span> file.</p> <p class="Body"><a name="3_4_40_8_3_3_3">You can install SNMP without the trap functionality. To do so, set the </a><span class="codeph">TRAPIND</span> environment variable to <span class="codeph">N</span> before running the RPM.</p> <p class="Body"><a name="3_4_40_8_3_3_4">Before you install a new version, you must uninstall all previous versions.</a></p> <p class="Body"><a name="3_4_40_8_3_3_5">For the SLES 10 operating system, perform these 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_40_8_3_3_6_1">Copy the </a><span class="codeph">/etc/snmp/snmpd.conf</span> file to the <span class="codeph">/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_40_8_3_3_6_2">Modify the </a><span class="codeph">/etc/init.d/snmpd</span> file, and change the <span class="codeph">SNMPDCONF=/etc/snmp/snmpd.conf</span> entry to <span class="codeph">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_40_8_3_3_6_3">Run </a><span class="codeph">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>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件