From 858a51fd42864351d399cd7b011c85b5a1fa4e07 Mon Sep 17 00:00:00 2001 From: "ao6744@student.uni-lj.si" Date: Sat, 29 Aug 2015 10:10:33 +0000 Subject: popravljena navodila git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@304 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- .../tasks/snmp_agent_uptime/howtos/en/index.html | 27 ++++++++++++++-------- .../tasks/snmp_agent_uptime/howtos/si/index.html | 6 ++--- 2 files changed, 21 insertions(+), 12 deletions(-) (limited to 'kpov_judge/tasks/snmp_agent_uptime/howtos') diff --git a/kpov_judge/tasks/snmp_agent_uptime/howtos/en/index.html b/kpov_judge/tasks/snmp_agent_uptime/howtos/en/index.html index 756cc72..bef6792 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/howtos/en/index.html +++ b/kpov_judge/tasks/snmp_agent_uptime/howtos/en/index.html @@ -19,7 +19,7 @@

Write a script called beri.sh that reads the value from the - OID 1.3.6.1.4.1.8072.1.3.2.4.1.4 on SNMPServer. Set it up on + OID 1.3.6.1.4.1.8072.1.3.2.4.1.2 on SNMPServer. Set it up on SNMPClient in the home directory of the user test.

Instructions

@@ -60,6 +60,8 @@

Set up of SNMPServer machine

  1. + setup network as “Bridged Adapter” -> Machine-> Settings ->Network + Install snmpd and snmp packages and tools for inspecting the data available over SNMP.
      @@ -85,7 +87,7 @@ (you can use different editor)
    1. - (un)comment these four lines as below:
      + Check this 4 rows and make sure they look like this:
      # Listen for connections from the local system only
      # agentAddress udp:127.0.0.1:161
      # Listen for connections on all interfaces (both IPv4 *and* IPv6)
      @@ -102,7 +104,7 @@ rocommunity students 0.0.0.0/0
    2. - write correct network address = command ifconfig -a + change 0.0.0.0./0 into correct address ifconfig -a
  2. @@ -170,7 +172,7 @@ 1.3.6.1.4.1.8072.1.3.2.4.1.2
  3. - it should return one strings with "Uptime in seconds: xyz" + you should get string: "Uptime in seconds: xyz"
@@ -271,7 +273,7 @@ uptime=$(</proc/uptime)
uptime=${uptime%%.*}
minutes=$(( uptime / 60 ))
- echo "Uptime in minutes:" $minutes
+ echo $minutes
exit 0
  • @@ -285,9 +287,9 @@
  • -
  • [NOT 100 % DONE YET] As user test and create next script called +
  • As user test and create next script called beri.sh that reads the value from the OID - 1.3.6.1.4.1.8072.1.3.2.4.1.4. on SNMPServer. Set it up on SNMPClient + 1.3.6.1.4.1.8072.1.3.2.4.1.2. on SNMPServer. Set it up on SNMPClient in the home directory of the user test.
    1. @@ -296,15 +298,22 @@
    2. add the source code:
      #!/bin/bash
      - snmpwalk -c students -v1 IPaddressOfServer 1.3.6.1.4.1.8072.1.3.2.4.1.4
      + snmpwalk -c students -v1 IPServerAddress 1.3.6.1.4.1.8072.1.3.2.4.1.2
      exit 0
    3. don't forget to make the program runnable:
      command chmod +x /home/test/upminutes + you can test it with ./beri.sh
  • - + + +

    Setting SimpleArbiter

    + User: tester + Password: test + + apt-get install libsnmp-python diff --git a/kpov_judge/tasks/snmp_agent_uptime/howtos/si/index.html b/kpov_judge/tasks/snmp_agent_uptime/howtos/si/index.html index ed59309..f490f6c 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/howtos/si/index.html +++ b/kpov_judge/tasks/snmp_agent_uptime/howtos/si/index.html @@ -270,7 +270,7 @@ uptime=$(</proc/uptime)
    uptime=${uptime%%.*}
    minutes=$(( uptime / 60 ))
    - echo "Uptime in minutes:" $minutes
    + echo $minutes
    exit 0
  • @@ -284,7 +284,7 @@
  • Kot uporabnik test naredi se eno skripto beri.shm ki bere - vrednosti od OID 1.3.6.1.4.1.8072.1.3.2.4.1.4. + vrednosti od OID 1.3.6.1.4.1.8072.1.3.2.4.1.2. na SNMPServer. Shrani jo na SNMPClient v domac direktorij uporabnika test.
    1. @@ -293,7 +293,7 @@
    2. dodaj kodo:
      #!/bin/bash
      - snmpwalk -c students -v1 IPnaslovStreznika 1.3.6.1.4.1.8072.1.3.2.4.1.4
      + snmpwalk -c students -v1 IPnaslovStreznika 1.3.6.1.4.1.8072.1.3.2.4.1.2
      exit 0
    3. -- cgit v1.2.1