Sponsored Content
Full Discussion: Network monitor script
Special Forums Windows & DOS: Issues & Discussions Network monitor script Post 302855103 by assafde on Thursday 19th of September 2013 04:43:00 AM
Old 09-19-2013
Network monitor script

Hi,

Although I'm not at my nature habitat, I need some assistance in having a basic windows script to monitor TCP connections from a host to other hosts.
script heed to display the following:
1. ping a remote host/hosts every 1 second (or other adjustable timer)
2. Display a fail/success.
3. time stamp.
4. write into a log file
5. create a new log file each hour.

A power shell script is acceptable, i'm a newbe in PowerShell
thanks
 

6 More Discussions You Might Find Interesting

1. Programming

Help in developing a Network Appliation to monitor pc in a network

I am developing a Network Appliation to monitor computers in a network. Specs are App monitors the current web page viewed in each system App also can shutdown the computer in the network App can show all process run by each computer in the network I am now confused how to start my... (2 Replies)
Discussion started by: valaparambil88
2 Replies

2. UNIX for Advanced & Expert Users

Monitor % utilization of the network card

Hello, How to we typically monitor the % of utilization of network cards on a Unix box,basically the % utilization of the bytes transfered of the network card. This is required on all the flavours of OS - HP, AIX, RHEL, Sun etc. Please let me know. Thanks. (1 Reply)
Discussion started by: devtakh
1 Replies

3. Red Hat

How to monitor network device traffic using MRTG?

How to monitor network device traffic using MRTG? How can I add network devices in MRTG configuration to monitor? (2 Replies)
Discussion started by: manalisharmabe
2 Replies

4. Shell Programming and Scripting

Script to monitor network

Hello Guys, I am starting with shell scripting and I need some help with my problem... The scenario is, I have like 20 servers inside one company, where I face some network issues affecting my servers functionality (Voice/recorder/IVR systems). So, to evidence the network events, I decided to... (1 Reply)
Discussion started by: raval
1 Replies

5. Shell Programming and Scripting

Monitor some of network services

Hi I want to write a script for netflow service because my service doesnt send any packet to netflow walker (server). Although the service is started but it does not send any packet to server until i restart the service I want to write a script in order to restart the service... (7 Replies)
Discussion started by: mohsen1366
7 Replies

6. IP Networking

I would like to monitor network traffic for a computer on my network

My son does homework on a school laptop. I was thinking about setting up a gateway on my home network, so that I can monitor web traffic and know if he is doing his homework without standing over his shoulder. Ideally I would like to use the Raspberry Pi Model b that I already have. However, I... (15 Replies)
Discussion started by: gandolf989
15 Replies
SNTOP(1)						    BSD General Commands Manual 						  SNTOP(1)

NAME
sntop -- top-like console network status tool SYNOPSIS
sntop [options] DESCRIPTION
sntop (simple network top) is a console utility, in the spirit of top, that polls a list of hosts at a regular interval to determine if they are online, displaying the results in a formatted table. This list is read on load from a config file, sntoprc, located (by default) in ~/ or /etc. The polling is done via ICMP ping (1) Optionally, the results can be used to generate an html page or ellicit the execution of a file. Interactive run-time commands exist: q - quit r - reload config file w - toggle html page generation any other key - force a refresh COMMAND-LINE PARAMETERS -d, --daemon - daemon mode: make sntop capable of running in the background. note, it wont automatically fork into the background. -o, --once - poll and display results once, then exit -c, --nocolor - toggle the use of ncurses color for pretty formatting -p, --ping - use 'ping' in lieu of 'fping'. note, ping (in particular on DOWN hosts) is slower than fping -- the performance of sntop will suffer. -w, --html - generate html output of results -s, --secure - secure mode. command keys are disabled. SIGINT must be used to terminate the program. this allows sntop to run nicely on spare terminals galore. something like the following in /etc/passwd can facilitate that: sntop:x:123:123:sntop:/:/usr/local/bin/sntop -s -e <file>, --wfile=file - output html to <file> instead of sntop.html -f <file>, --conf=file - read conf data from <file> instead of ~/.sntoprc. note, sntop will still try to read from /etc/sntoprc if <file> fails. if both fail, sntop will exit. -r <time>, --refresh=time - refresh every <time> seconds instead of 180 -a <file>, --alarm=file - alarm mode: execute <file> when a site first goes DOWN -l <file>, --log=file - log mode: execute <file> whenever the status of a site changes -b <bytes>, --byte=bytes - Number of bytes of ping data to send -v, --version - display version information and exit -h, --help - display command-syntax help and exit Command Execution Syntax In alarm or log mode a file is executed on the occurence of change in status of a given host. sntop will fork and exec the specified file, passing as arguments information about the event. those arguments are: <display name of host> <host name/IP> <status> <display name of host> the 'display' name (first sntop collumn) of the machine, ie "MyBox" <host name/IP> the explicit hostname or IP address of the machine, ie "snaggle" or "192.168.55.12" <status> the new status of the machine, "UP" or "DOWN," this would obviously always be DOWN for alarm mode Note, DOWN hosts will be logged in both modes upon load (ie, if they are down when sntop loads, <file> is executed). No action is taken in any modes for hosts that originate as UP -- thus, the default status is UP. We execute an external file to remain in the UNIX tradition -- small, simple programs that do one thing damn well. Thus, a logging option is not even provided -- a two-line shell script will do fine, there. However, the possibilities are powerful: administrator paging, for instance. See alarm.sh for an example script. FILES
~/.sntoprc default config file location /etc/sntoprc if a user's config is not found, this system-wide one is read /usr/share/man/man1/sntop.1.gz the man page /usr/share/doc/sntop/examples/alarm.sh sample alarm-execute script /usr/bin/sntop the sntop executable CONFIG FILE
An example config file, /usr/share/doc/sntop/examplessntoprc.EXAMPLE, is included in the standard distribution. However, the config file syntax is simple. Entries are RETURN terminated. Trailing whitespace is ignored. '#' signifies a comment and can be used inline. By default, upto 32 characters will be read, per line. All entries should be a single word, except comments. The syntax: Display Name IP or host Display Comments Example: Jimi 192.168.23.1 linux/sparc; firewall, http, ftp sntop will first attempt to read the config file from ~/.sntoprc (or another location specified by -f). If that fails, the system config file will be read from /etc/sntoprc. If both fail, sntop will exit. AUTHORS
sntop was written by Robert M. Love <rml@tech9.net> and Christopher M. Rivera <cmrivera@ufl.edu>. Send us bug reports, suggestions, and hardware. SEE ALSO
top (1), ping (1), fping (1) October 22, 2008
All times are GMT -4. The time now is 09:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy