Page 1 of 1 1
Topic Options
#32455 - 2002-11-14 03:59 PM Checking Network Connectivity
Anonymous
Unregistered


I am trying to accomplish the following but need help. We used have a manual process of verifying network connectivity in mornings by copying a small txt file from a DC to every main server in the company. I created a small batch file to do this, and another to run it giving the %1 source and %2 targets.

code:
@echo off

for /f "tokens=1,2,3,4* delims=- " %%i in ('date /t') do set TDDAY=%%i&set TDDD=%%j&set TDMM=%%k&set TDYY=%%l

REM Create Dir's
REM Log Directories
if not exist \\%2\c$\contest2 md \\%2\c$\contest2
if not exist \\%1\c$\contest\logs md \\%1\c$\contest\logs
if not exist \\%1\c$\contest\logs md \\%1\c$\contest\logs

REM Copy Section

echo Copying Connection test
xcopy %computername%_contest.txt \\%2\c$\contest2 /c /d /e > \\%1\c$\contest\logs\%1_%tdday%_contestlog.txt

if errorlevel 4 goto lowmemory
if errorlevel 2 goto abort
if errorlevel 0 goto exit

:lowmemory
echo Insufficient memory to copy files or invalid drive or command-line syntax > \\%1\c$\contest\logs\%1_%tdday%_error.txt
goto exit

:abort
echo You Pressed CTRL+C to end the copy operation
goto exit

:exit
exit

However, i'd like to replace this with a KIX script and report to a log file. Right now it creates a folder with a txt file for each server it can't connect to. Ideally i'd like to put this into all one file and have a count at the end, so it would look like...

Server1 - Good
Server2 - Good
Server3 - Bad

Count -
2 Good, 1 Bad, 3 Total

Anyone already using something like this or could help?

Thanks

Top
#32456 - 2002-11-14 04:03 PM Re: Checking Network Connectivity
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Definitely straightforward to convert this to KiXtart. However, I really have no idea what you try to prove with this. I would rather PING a computer to see whether it's there and then check some critical services remotely. UDFs for these tasks can be found in the UDF Forum.

Nevertheless, you might rather fix your underlying network problem.
_________________________
There are two types of vessels, submarines and targets.

Top
#32457 - 2002-11-14 04:09 PM Re: Checking Network Connectivity
Anonymous
Unregistered


I could ping, but sometimes even if a system is down file sharing wise you can still ping it. What is a UDF?..lol
Top
#32458 - 2002-11-14 04:11 PM Re: Checking Network Connectivity
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See ABC's of KiXtart board etiquette and message to new forum users , How to use UDFs , and Cannot find what you are looking for?

You could also check the eventlog remotely for critical messages pertaining the file sharing services.

[ 14. November 2002, 16:12: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1386 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.042 seconds in which 0.019 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org