Machine - Provides information regarding a machine (router, bridge, server, etc.)
use DBI; use Machine;
my $dbh = DBI->connect(...); my $machine = new Machine( id=>$machineID, dbHandle=>$dbh );
or
my $machine = new Machine( dbHandle=>$dbh, netmon=>$netmon, description=>$description, contact=>$contact, name=>$machineName, place=>$locationID, upTime=>$upTime, community=>$SNMPcommunityString );
$router->SNMP( oid=>'tempInlet' );
$router->SNMP( oid=>'tempInlet', timestamp=>1 );
print $router->netmon
print $router->description
print $router->contact
print $router->name
print $router->place
print $router->upTime
print $router->community
@interfaces = $router->interfaces;
Machine provides an easy way to get and save data regarding SNMP-enabled machines. This is a child class of Node. Please see node for more details.
new() - creates a new machine dbHandle - database handle id - machine ID netmon* - MAC address of the netmon that is monitoring this machine description* - system description contact* - contact information for administrator's, usally an email place* - locationID (see Location Object) uptime* - seconds since startup community* - SNMP community string
* - must always be declared together or none at all
SNMP() - check for the latest value or timestamp for a given oid oid - MIB object ID timestamp - determine whether a timestamp is requested, instead of the value
id() name() netmon() description() contact() place() uptime() community() - returns the SNMP community string for this particular router
interfaces() - returns an array that contains all the ID's of the children interfaces
Machine is supported as part of the core Pawikan distribution. Please send bug report to <netapps@pregi.net> or use the bugzilla.
Edwin Viñas <edwinv@asti.dost.gov.ph>
Jerremeo Raynier Gabás <ren@asti.dost.gov.ph>
René Mendoza <renem@asti.dost.gov.ph>
Rey Vincent Babilonia <rvincent@asti.dost.gov.ph>
Paul Afroilan <paula@asti.dost.gov.ph>
Copyright (c) 2004 Philippine Research, Education and Government Information Network. All rights reserved. This program is part of the Pawikan distribution; you can redistribute it and/or modify it under the same terms as Pawikan itself.