![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Display Modes | Rate This Thread |
|
|