The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help me in writing the script prakashreddy Shell Programming and Scripting 1 12-20-2008 12:50 PM
Need help writing this script wiggles UNIX for Dummies Questions & Answers 1 12-12-2008 12:26 PM
UFS CD-ROM file-writing in Windows? NeilAtkins UNIX for Dummies Questions & Answers 1 10-29-2008 08:55 AM
Writing Script? wmosley2 Shell Programming and Scripting 15 01-12-2004 05:01 PM
need help writing a script tarballed Shell Programming and Scripting 3 04-17-2003 05:50 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-22-2009
samnyc samnyc is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 52
need help writing a script in Windows

Hi,

On Windows 2003, we have over 100 servers. I need to find NICs settings. I am using "SNMPUTIL" to get this.

If there is any other easy way to do this please do let me know.


Check the value of the output to see if its 2, if its not 2 the issue the command again increasing the end of the commands number by 1

snmputil get localhost public .1.3.6.1.4.1.232.18.2.3.1.1.34.2
So the output will either be the below or if its the last NIC you will get


Code:
 
d:\server1>snmputil get localhost public .1.3.6.1.4.1.232.18.2.3.1.1.34.1
Error: errorStatus=2, errorIndex=1
 
d:\server1>snmputil get localhost public .1.3.6.1.4.1.232.18.2.3.1.1.34.2 
Variable = .iso.org.dod.internet.private.enterprises.232.18.2.3.1.1.34.2
Value = Integer32 2


For any NIC that returns a value of 2 we then need to check the speed of that interface with the following command;


Code:
 
d:\server1>snmputil get localhost public .1.3.6.1.4.1.232.18.2.3.1.1.33.2 
Variable = .iso.org.dod.internet.private.enterprises.232.18.2.3.1.1.33.2
Value = Integer32 1000000000

So in this case we had a NIC (.2) that is set auto but is running gig which is good. We need to identify any NIC running auto not running gig, so if the NIC (.2) was running 10mps it would look like this;


Code:
 
d:\server1>snmputil get localhost public .1.3.6.1.4.1.232.18.2.3.1.1.33.2 
Variable = .iso.org.dod.internet.private.enterprises.232.18.2.3.1.1.33.2
Value = Integer32 10000000


How do I write this into a script? Any ideas?
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0