Note that there are some explanatory texts on larger screens.

plurals
  1. PORunning Script through SNMP commands using SNMP Protocol gives different output as script execute stand alone
    primarykey
    data
    text
    <p>I want to shell execute a script through <code>SNMP</code> command.So for that script i have configured <code>OID</code> in <code>snmpd.conf</code> under <code>/etc/snmp</code> folder.</p> <p>My script looks like working is just to redirect <code>"text"</code> to <code>output.txt</code> file and then print script executed on console.</p> <pre><code>#!/usr/bin/ksh Input_path="$HOME/input.txt" Out_Path="$HOME/output.txt" #I have to take the line_num from output.txt which is actually number of line present in output.txt line_num=`wc -l &lt;$out` #after that i need to take that line from INPUT file line=`head -$a $Input_path | tail -1 ` #i need to uppend data to 1 kb for that i am using typset command typeset -L1024 line #I am increasing value of a a=`expr $a + 1` #same i am echo in file so at this point number of line in file will increase by 1 echo $a &gt;&gt; $Out_Path #this is the final output which i want . echo -e "$line\n" </code></pre> <hr> <h2><strong>Output</strong></h2> <p>if i am using snmpwalkcommand from node ...1</p> <p>snmpwalk command the output is </p> <p>a</p> <p>and the updated output.txt file is 1 2</p> <p>snmpwalk command the output is </p> <p>c</p> <p>and the updated output.txt file is 1 2 3 4</p> <p>snmpwalk command the output is </p> <p>c</p> <p>and the updated output.txt file is 1 2 3 4 5</p> <h2>Which means i am getting a,c,e ... but i need a,b,c,d,e</h2> <p>This type of processing i am doing because data is more that 1 kb in output.txt and i am not able to fetch more than 1 kb record in snmpget command, that's why i am doing this process to get whole data. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload