Welcome to PCCS-Linux.COM Hello, and welcome to the PCCS-Linux Home Page.
Your last visit was !!!
Your Browser is running on Other
 
widtools and snmputils
#!/bin/sh

TMP="/tmp/`whoami`"


gethost () {
host=$(widtools -input -label "Enter Hostname" -text)
}

getcomm () {
comm=$(widtools -input -label "Enter Community" -text)
}

getmibvar() {
mibvar=$(widtools -input -label "MIB Variable" -text)
}

getsubnet() {
subnet=$(widtools -input -label "Enter subnet /24)" -text)
}

item=$(widtools -menu  -label "#!/bin/sh / xForms SNMP utils Script "\
 "snmpwalk" \
 "snmptable" \
 "snmpnetstat"\
 "snmpget" \
 "Exit")


if [ "$item" = "1" ]; then
   gethost
   getcomm
   getmibvar

  snmpwalk -s $host $comm $mibvar > $TMP
  VIEW="$TMP"
fi

if [ "$item" = "2" ]; then
  gethost
  getcomm
  getmibvar

  snmptable $host $comm $mibvar > $TMP
  VIEW="$TMP"  
fi

if [ "$item" = "3" ]; then
  gethost
  getcomm

  snmpnetstat -s $host $comm > $TMP
  VIEW="$TMP"
  
fi

if [ "$item" = "4" ]; then
  gethost
  getcomm
  getmibvar
   
  snmpget $host $comm $mibvar > $TMP
  VIEW="$TMP"
fi

if [ "$item" = "5" ]; then
   exit
fi 


 widtools -dialog \
 -label "$VIEW" \
 -showfile $VIEW \
 -height 500 \
 -width 650 \

if [ -f $TMP ]; then
 rm $TMP
fi 

 ./snmputilxform



Screenshots of #/bin/sh and widtools

Main Menu

PCCS-Linux.COM

Output Screen

PCCS-Linux.COM

>> Comments/FeedBack


Page hits 33 on :11:26



This web site is prepared and maintained by Chauncey Thorn.
The information contained in this site was valid at the time of posting.
Chauncey Thorn, assumes no liability for damages incurred directly or indirectly as a result of errors, omissions or discrepancies.

Remember most of the content here are my notes...

All logos and trademarks in this site are property of their respective owner. All the rest © by PCCS-Linux.COM

PCCS-Linux.COM ::ource Advocate Articles catalogue
2000 2002