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 ++++++++++++++--------
1 file changed, 18 insertions(+), 9 deletions(-)
(limited to 'kpov_judge/tasks/snmp_agent_uptime/howtos/en/index.html')
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
-
+ 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)
-
- (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
-
- write correct network address = command ifconfig -a
+ change 0.0.0.0./0 into correct address ifconfig -a
@@ -170,7 +172,7 @@
1.3.6.1.4.1.8072.1.3.2.4.1.2
- 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.
-
@@ -296,15 +298,22 @@
-
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
-
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