Sponsored Content
Top Forums Shell Programming and Scripting Unix Shell Script to ping systems & make a log Post 302578349 by psychoTHEIST on Thursday 1st of December 2011 10:41:10 AM
Old 12-01-2011
Thanks a Lot !!!

Thanks 'Zaxxon, Spellbound, Mikelking'.. Smilie
Since, I'm new to Unix/Linux Shell-scripting and this forum
- kindly bear w/ me, wherever you find me a (dumb) rookie! Smilie
________________________________________________________
My overall aim is :
1. To ping my office-network..
2a. Create a log for successful pings and unsuccessful ones..
>> till here - i'm done<<
2b. Create a DNS kinda thingy..
>> done - but, i'm using 'if-else' here (..plz don't laugh..) <<
>> my boss said, rather than 'if-else', use a file - where <<
>> from you import all the names for particular IPs.. <<
3. Generate/create a Network-Outage report, that gives the timestamps for
whenever the ping was unsuccessful for that particular IP (as rightly mentioned by 'Zaxxon')..
4. Question arises - what's the need for successful IPs..!?
Answer - I need to run network-related commands on those successful IPs,
to generate another log that gives me all the system-related-info (such as Memory/Disk-usage, N/W-usage, blah! blah! blah!) of/for those particular (successful) IPs..

[in short - have to make my own NMS (n/w mgmt. sys.) for my company Smilie ]
________________________________________________________
My problem :
1. I'm not good at googling.. :'(
2. I've a few commands, like :
vmstat, netstat, nslookup, traceroute, ifconfig, df, du, iostat, iptables, chkconfig, etc.
but these work for my system (not all f 'em) and i need to sit on my system
and use the above commands (or, similar) on all the systems on the n/w via. IPs..
3. As of now, the bit I'm struggling w/ is:
using 'grep' to fetch the IP from the same line where I'm grepping - "unreachable host"..
________________________________________________________
~!!~Cheers~!!~ Smilie
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ping from Unix script

I have two queries in regard to a Unix script. 1) From a Unix script, I want to read the IP of another remote HP-UX server and want to just check if that machine is reachable or the IP exists. I don't know the login Id and password of the remote machine. I could not properly manage with ping. How... (2 Replies)
Discussion started by: asutoshch
2 Replies

2. Shell Programming and Scripting

Shell script delete log files from folder & subfolders on space usage

Hi, I am trying to write a shell script to delete logs generate by db when space in the folder reaches 70%. i am getting space values from db, find the files at OS and remove them by using a cron job runs every 5minutes. I have to keep the latest 5 files at any time, my problem is that log files... (3 Replies)
Discussion started by: saha
3 Replies

3. Shell Programming and Scripting

shell script for ping

hi anyone, i want shell script for ping command. any one post here............ (10 Replies)
Discussion started by: rameshreddy.ema
10 Replies

4. Shell Programming and Scripting

Shell Script for ping, Linux

I woul like to create a script in order to make a ping to a server and save in a variable a 1 if respond or a 0 if it doesnt. Then with that I could make a graffic of the server, for how long it is up.:b: So far I have this: if ; then #if the ip respond the ping shows online echo... (3 Replies)
Discussion started by: jsebastiang0
3 Replies

5. Shell Programming and Scripting

Script problems in hp unix systems

test.sh -------------- #This script deletes the temporary files created on the server when the user opens the output files # FILE_PATH=$1 P_FILE_PATH=$2 FRQ=$3 #FRQ=`expr $FRQ*60*24 | bc` #FRQ= 60 echo $FILE_PATH echo $P_FILE_PATH echo $FRQ if then find $FILE_PATH -mmin... (7 Replies)
Discussion started by: arjunbodduuxlx
7 Replies

6. Shell Programming and Scripting

Ping shell script - need urgent help

Hi friends, i have a file contains IP address like below cat file.txt 10.223.20.1 10.223.20.2 10.223.20.3 10.223.20.4 10.223.10.5 . . . like this Now i want to make a script which gives output whether each ip is pinging or not... the result will be like this 10.223.20.1 up... (9 Replies)
Discussion started by: siva kumar
9 Replies

7. Shell Programming and Scripting

SFTP Shell Script Get & Delete && Upload & Delete

Hi All, Do you have any sample script, - auto get file from SFTP remote server and delete file in remove server after downloaded. - only download specify filename - auto upload file from local to SFTP remote server and delete local folder file after uploaded - only upload specify filename ... (3 Replies)
Discussion started by: weesiong
3 Replies

8. Shell Programming and Scripting

Shell script to ping multiple servers

Hi I did the following script to ping multiple servers, but I keep on receiveing duplicate emails for one server that is down: #!/bin/bash date cat /var/tmp/servers.list | while read output do ping -c 1 "$output" > /dev/null if ; then echo "node $output is up" else ... (10 Replies)
Discussion started by: fretagi
10 Replies
asadmin-ping-connection-pool(1AS)				   User Commands				 asadmin-ping-connection-pool(1AS)

NAME
asadmin-ping-connection-pool, ping-connection-pool - tests that a connection pool is usable SYNOPSIS
ping-connection-pool --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] pool_name Tests that a connection pool is usable for both JDBC connection pools and connector connection pools. For example, if you create a new JDBC connection pool for use with an application that is expected to be deployed, before deploying the application, the previously created pool is tested with this command. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. OPERANDS
poolname name of the connection pool to be tested. Example 1: Using ping-connection-pool Before you can ping a connection pool, you must: o Create a connection pool with authentication. o Make sure the Enterprise Information Server (can be the database) is started. asadmin> ping-connection-pool --user admin1 --password adminadmin1 --host pigeon --port 5001 sampleConnectionPool Command ping-connection-pool executed successfully EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-create-connector-connection-pool(1AS), asadmin-delete-connector-connection-pool(1AS), asadmin-list-connector-connection-pool(1AS), asadmin-create-jdbc-connection-pool(1AS), asadmin-delete--jdbc-connection-pool(1AS)asadmin- list--jdbc-connection-pools(1AS) J2EE 1.4 SDK March 2004 asadmin-ping-connection-pool(1AS)
All times are GMT -4. The time now is 11:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy