11-29-2010
I've stayed away from this - SNMP is a VERY complex protocol. Here is the way you start doing it. It involves creating C code and working with the Netsnmp library. It is not just like bash or ksh. OID's (from MIB's) are involved.
Net-SNMP
10 More Discussions You Might Find Interesting
1. Solaris
is there a way to display the commands the the remote user is typing -I would like to know a way by which i can log onto a remote system and type commands as the user watched on the console - I know about vnc but that is not what i am looking for -or is it rexec ?
Ndegem
SCSA (4 Replies)
Discussion started by: ndegem
4 Replies
2. Shell Programming and Scripting
Hello,
Is there a way to use wc, sed or other commands against remote sftp in a regular shell script?
wc -c *.* | grep total | sed s/total// ?
thanks in advance (0 Replies)
Discussion started by: chm0dvii
0 Replies
3. Shell Programming and Scripting
I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config.
I am not sure if I can do this with BASH scripting.
I have set up password less login by adding my public key to authorized_keys file, it works.
I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies
4. Shell Programming and Scripting
I have a script that I'm trying to use that will check for files on a remote machine and if there is files copy the files, modify the perm on the copied files, and then delete the files off of the remote server. Right now I need to get the correct syntax so the the remote commands still interpret... (4 Replies)
Discussion started by: jcalisi
4 Replies
5. Shell Programming and Scripting
I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies
6. Infrastructure Monitoring
Hi,
I have sucessfully set up snmp daemon on my AIX box (v 6.1.2.0).
I can query snmp from localhost (using command: snmpinfo -v -m dump -c public mib-2) and it works perfectly.
But I don't get any reply when query my AIX box from remote machine (AIX, Linux,...)
I have tried to set up SNMP v1... (0 Replies)
Discussion started by: pavel.kovar
0 Replies
7. Infrastructure Monitoring
snmpget -v 1 -c COMMUNITYSTR hostname OID
what OIDs would I use to get information on all the processes and disk space information that are on a particular host.
where can i find out information on all of this?
thanks (3 Replies)
Discussion started by: SkySmart
3 Replies
8. Shell Programming and Scripting
I solved my issue by using the following code
#!/bin/bash
function GET_STATUS {
#values Active Passive Failed
ssh -a localhost '/home/user/fakecommand.sh'
}
STATE="unknown"
until ]
do
echo $STATE
sleep 5
STATUS=`GET_STATUS`
echo $STATUS | grep Active &&... (1 Reply)
Discussion started by: $scipt_Kid
1 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I am working in support and we are planning to automate a system to reduce the direct manual intervention to core system.
Please find the below details.
1. we have a web application that runs on Windows Platform.
2. From web application, we need to connect to remote Unix machine.... (6 Replies)
Discussion started by: Balaji K
6 Replies
10. Shell Programming and Scripting
Hi,
I need to run a script located in a directory on remote server by using ssh authentication from my local unix server. Can anyone help me in this.
I have tried the below command. It worked for echo command but when i tried to open a file using cat command it is showing "cat: cannot open... (6 Replies)
Discussion started by: ssk250
6 Replies
LEARN ABOUT DEBIAN
snmp::info::layer3::pf
Info::Layer3::Pf(3pm) User Contributed Perl Documentation Info::Layer3::Pf(3pm)
NAME
SNMP::Info::Layer3::Pf - SNMP Interface to FreeBSD-Based Firewalls using Pf /Pf Sense
AUTHOR
Max Baker
SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $pf = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
# These arguments are passed directly to SNMP::Session
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
or die "Can't connect to DestHost.
";
my $class = $pf->class();
print "SNMP::Info determined this device to fall under subclass : $class
";
DESCRIPTION
Subclass for Free-BSD PF-Based devices
LLDP Support
LLDP Support is included but untested in this Device Class. It is reported that the available CDP/LLDP modules for net-snmp don't work on
FreeBSD (on which pfSense is based) as they assume certain Linux specific Ethernet structures. This problem is apparently solved on PF
based firewall appliances by using the ladvd package, for which a port may be found here: <http://www.freshports.org/net/ladvd/>. I'm not
sure if this module ties into Net-SNMP or not.
Inherited Classes
SNMP::Info::Layer3
SNMP::Info::LLDP
Required MIBs
FOKUS-MIB
Inherited Classes' MIBs
See "Required MIBs" in SNMP::Info::Layer3 for its own MIB requirements.
See "Required MIBs" in SNMP::Info::LLDP for its own MIB requirements.
GLOBALS
These are methods that return scalar values from SNMP
$pf->vendor()
Returns 'FreeBSD'
$pf->hasCDP()
Returns whether LLDP is enabled.
$pf->model()
Grabs the os version from "sysDescr"
$pf->os()
Returns 'Pf'
$pf->os_ver()
Tries to reference $pf->id() to one of the product MIBs listed above. Will probably return a truncation of the default OID for pf-
based systems "enterprises.12325.1.1.2.1.1".
Global Methods imported from SNMP::Info::Layer3
See documentation in "GLOBALS" in SNMP::Info::Layer3 for details.
TABLE METHODS
These are methods that return tables of information in the form of a reference to a hash.
$pf->c_id()
Returns LLDP information.
$pf->c_if()
Returns LLDP information.
$pf->c_ip()
Returns LLDP information.
$pf->c_platform()
Returns LLDP information.
$pf->c_port()
Returns LLDP information.
Table Methods imported from SNMP::Info::Layer3
See documentation in "TABLE METHODS" in SNMP::Info::Layer3 for details.
Table Methods imported from SNMP::Info::LLDP
See documentation in "TABLE METHODS" in SNMP::Info::LLDP for details.
perl v5.12.4 2011-09-28 Info::Layer3::Pf(3pm)