Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO Configure SOLARIS SNMP HELP

Status
Not open for further replies.

geounix

Technical User
Mar 7, 2003
1
0
0
US
Ok Please someone help.

I have SNMP running on two Solaris systems. When I walk the mib I do not get any host resource info only standard MIBII data ie; syscontact and interfaces. How can I configure SOLARIS SNMP to support the host resource mib i believe RFC 1157

Geo
 
hi,
as per my knowledge...Soaris boxes are not default snmp enabled...but u may use the commands snmpget, snmpset etc...but until u have snmp agent running u cnnot know the oid values...u have to have a SNMP agent running in the destination mechine...like sysedge, ssm etc..then only u can see the vlues...all the cisco devices are default snmp enabled...
if you could give me some more details like which mechine u are qureing etc...i can help u...
thanks,
sireesh
 
Hi Sireesh,

I have the same question as Geo, can you help me to config host resource MIB in Sun solaris box..

Thanks !
Tung.
 
Dear All,

I am on Solaris 2.

If you are still hunting for a solution re this subject, I hope what follows can help.

To query OIDs like CPU utilisations, total & free memory, and even bytes free for file systems on Solaris, I've tried with success using a replacement snmpd. It's a very nice daemon!

1. Follow the link and download net-snmp 5.1 source codes; compile and install with help of README and INSTALL documentations;

2. set up config file using command "snmpconf" ... very user friendly :)

3. stop the Soloaris snmpdx daemon and start the generated snmpd daemon with -c specifying the config file you created in step 2;

4. Set up MRTG with help from tutorial link:
Hope these steps can lead you to somewhere!

God bless!

Lawrence Koo
 
Hi Lawrence Koo,

Thanks for your instruction, i did follow yours, but unfortunately i did not compile this source. It told me that cannot file the C compliler. I am using Solaris 8.

Can you help?

Many thanks !

Tung.
 
Hey Tung,

i guess you have to install C compiler from your Solaris CD.

Lawrence
 
Hi Lawrence,

I did install gcc packet in my machine but cannot run ./configure, here is the contain of install.log file:
----------
It was created by Net-SNMP configure 5.1-pre1a, which was
generated by GNU Autoconf 2.57. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = mnm
uname -m = i86pc
uname -r = 5.8
uname -s = SunOS
uname -v = Generic_108529-27

/usr/bin/uname -p = i386
/bin/uname -X = System = SunOS
Node = mnm
Release = 5.8
KernelID = Generic_108529-27
Machine = i86pc
BusType = <unknown>
Serial = <unknown>
Users = <unknown>
OEM# = 0
Origin# = 1
NumCPU = 1

/bin/arch = i86pc
/usr/bin/arch -k = i86pc
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/sbin
PATH: /usr/bin
PATH: /usr/dt/bin
PATH: /usr/openwin/bin
PATH: /bin
PATH: /usr/ucb
PATH: /usr/local/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1806: checking what to build and install
configure:1808: result: agent apps man local mibs
configure:2222: result: using default &quot;enterprise.net-snmp&quot;
configure:2257: result: using default enterprise sysOID &quot;NET-SNMP-MIB::netSnmpAgentOIDs...&quot;
configure:2292: result: using default notifications &quot;NET-SNMP-MIB::netSnmpNotifications&quot;
configure:2453: checking if I need to feed myself to ksh
configure:2469: result: no
configure:2554: checking for gcc
configure:2570: found /usr/local/bin/gcc
configure:2580: result: gcc
configure:2824: checking for C compiler version
configure:2827: gcc --version </dev/null >&5
gcc (GCC) 3.2.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2830: $? = 0
configure:2832: gcc -v </dev/null >&5
Reading specs from /usr/local/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.2.1
configure:2835: $? = 0
configure:2837: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:2840: $? = 1
configure:2864: checking for C compiler default output
configure:2867: gcc conftest.c >&5
gcc: installation problem, cannot exec `as': No such file or directory
configure:2870: $? = 1
configure: failed program was:
| #line 2843 &quot;configure&quot;
| /* confdefs.h. */
|
| #define PACKAGE_NAME &quot;Net-SNMP&quot;
| #define PACKAGE_TARNAME &quot;net-snmp&quot;
| #define PACKAGE_VERSION &quot;5.1-pre1a&quot;
| #define PACKAGE_STRING &quot;Net-SNMP 5.1-pre1a&quot;
| #define PACKAGE_BUGREPORT &quot;net-snmp-coders@lists.sourceforge.net&quot;
| #define CONFIGURE_OPTIONS &quot;\&quot;\&quot;&quot;
| #define SCAPI_AUTHPRIV 1
| #define NO_DUMMY_VALUES 1
| #define OPAQUE_SPECIAL_TYPES 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2908: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=''
ac_cv_env_CC_value=''
ac_cv_env_CFLAGS_set=''
ac_cv_env_CFLAGS_value=''
ac_cv_env_CPPFLAGS_set=''
ac_cv_env_CPPFLAGS_value=''
ac_cv_env_CPP_set=''
ac_cv_env_CPP_value=''
ac_cv_env_LDFLAGS_set=''
ac_cv_env_LDFLAGS_value=''
ac_cv_env_build_alias_set=''
ac_cv_env_build_alias_value=''
ac_cv_env_host_alias_set=''
ac_cv_env_host_alias_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_prog_ac_ct_CC=gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

AGENTLIBS=''
ALLOCA=''
AUTOCONF=''
AUTOHEADER=''
CC='gcc'
CCPATH=''
CFLAGS=''
CONFIGURE_OPTIONS='&quot;&quot;'
COPY_PERSISTENT_FILES=''
CPP=''
CPPFLAGS=''
DEFS=''
DEVFLAGS=''
DLLIBS=''
ECHO='/usr/ucb/echo'
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP=''
EMBEDPERLINSTALL=''
EMBEDPERLUNINSTALL=''
EXEEXT=''
EXTRACPPFLAGS=''
HAVE_DMALLOC_H=''
INSTALL_DATA=''
INSTALL_PREFIX=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIBTOOLFLAGS=''
LIBTOOL_DEPS=''
LN_S=''
LPSTAT_PATH=''
LTLIBOBJS=''
MAINSUBS=' agent apps man local mibs'
MODULE_LIST=''
OBJEXT=''
OTHERAGENTLIBLOBJS=''
OTHERAGENTLIBOBJS=''
PACKAGE_BUGREPORT='net-snmp-coders@lists.sourceforge.net'
PACKAGE_NAME='Net-SNMP'
PACKAGE_STRING='Net-SNMP 5.1-pre1a'
PACKAGE_TARNAME='net-snmp'
PACKAGE_VERSION='5.1-pre1a'
PATH_SEPARATOR=':'
PERLARGS=''
PERLINSTALLTARGS=''
PERLPROG=''
PERLTARGS=''
PERLUNINSTALLTARGS=''
PERSISTENT_DIRECTORY=''
PSCMD=''
PSPROG=''
RANLIB=''
RELEASEVERSION=''
SED=''
SET_MAKE=''
SHELL='/bin/ksh'
SNMPCONFPATH=''
STRIP=''
UCDPERSISTENT_DIRECTORY=''
UNAMEPROG=''
VERSION=''
WHOAMI=''
WRAPLIBS=''
ac_ct_CC='gcc'
ac_ct_RANLIB=''
ac_ct_STRIP=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${prefix}/share'
default_mibs_install=''
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
includedir='${prefix}/include'
infodir='${prefix}/info'
installucdheaders=''
installucdlibs=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mibgroup_list_lo=''
mibgroup_list_o=''
module_list=''
module_list_c=''
module_list_h=''
module_list_lo=''
module_list_o=''
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
security_hdr_list=''
security_src_list=''
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''
transport_hdr_list=''
transport_src_list=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define CONFIGURE_OPTIONS &quot;\&quot;\&quot;&quot;
#define NO_DUMMY_VALUES 1
#define OPAQUE_SPECIAL_TYPES 1
#define PACKAGE_BUGREPORT &quot;net-snmp-coders@lists.sourceforge.net&quot;
#define PACKAGE_NAME &quot;Net-SNMP&quot;
#define PACKAGE_STRING &quot;Net-SNMP 5.1-pre1a&quot;
#define PACKAGE_TARNAME &quot;net-snmp&quot;
#define PACKAGE_VERSION &quot;5.1-pre1a&quot;
#define SCAPI_AUTHPRIV 1

configure: exit 77
------

Can you help? I am not an C programer !
Many thanks !
Tung.
 
Tung,

Neither am I a C programmer :)

Looks like you have some program missing according to your log ...

configure:2867: gcc conftest.c >&5
gcc: installation problem, cannot exec `as': No such file or directory

If you 'man as', it reads:
NAME
as - assembler
...
DESCRIPTION
The as command creates object files from assembly language source files.

I am sure the command is the same on SPARC and x86 platforms.

As i am not a UNIX admin either ... so i don't have the knowhow on how to fix such problem ... sorry.

lk
 
I know this is an old post, but I thought I'd provide something in case people are looking for more information.

I think that it might be easier to install a precompiled net-snmp sun package. Grab it from sunfreeware.com and then edit the snmpd.conf file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top