Server and Network Monitoring with iPhone
February 25, 2010 – 6:53 pm | No Comment

What is a Unix sysadmin doing with an iPhone, you ask? It was a birthday present, if that’s all right with you. I know, I should have gotten something odd with a beta version of …

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands and Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Networking, Scripts

Windows Network Troubleshooting Script

Submitted by admin on January 20, 2010 – 10:15 pmOne Comment
Windows Network Troubleshooting Script

I try my best to stay away from Windows. I wish my clients did the same. The usual difficulty of troubleshooting elusive network performance problems is amplified many-fold when there is a Windows computer at the end of the line. With Unix it’s relatively simple: run tests “a”, “b”, “c”, etc and follow the familiar process of elimination. With Windows in the picture the number of steps uses up all of the English alphabet and spills over well into the Russian one. And when you finally reach step “я”, you have to pull out your Chinese dictionary.

Below is a simple but, as I found time and time again over the past few years, and extremely useful little batch script that collects important network performance information on the affected Windows system. The script does not require admin privileges and doesn’t make any changes to the system. Any Windows user can run it and send you the output. The information the script collects would help you quickly catch many common Windows networking issues.

Download netprobe.zip

@Echo OFF
 
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set timestr=%d:~6,4%%d:~3,2%%d:~0,2%%t:~0,2%%t:~3,2%
 
set OUTFILE=C:\User\netprobe_%timestr%.txt
 
echo ---------------------------------------------------------  > %OUTFILE%
echo Email contents of this file to your_email@whatever.com >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
 
hostname >> %OUTFILE%
echo %USERDOMAIN%\%USERNAME% >> %OUTFILE%
date /T  >> %OUTFILE%
time /T  >> %OUTFILE%
 
echo --------------------------------------------------------- >> %OUTFILE%
echo IPCONFIG                                                  >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
 
ipconfig /All >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
 
echo --------------------------------------------------------- >> %OUTFILE%
echo PING                                                      >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
 
set TARGET=hostname_or_ip_of_target_server
ping -w 1000 -n 10 -l 512 %TARGET% >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
 
echo --------------------------------------------------------- >> %OUTFILE%
echo TRACERT                                                   >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
 
tracert -w 512 %TARGET% >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
 
echo --------------------------------------------------------- >> %OUTFILE%
echo NETSTAT                                                   >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -a     >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -e     >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -p TCP >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -p UDP >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -p IP  >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -r     >> %OUTFILE%
echo --------------------------------------------------------- >> %OUTFILE%
netstat -s     >> %OUTFILE%
 
echo --------------------------------------------------------- >> %OUTFILE%
notepad %OUTFILE%
 
del %OUTFILE%

Popularity: 1% [?]

Related posts

One Comment »

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.