Sponsored Content
Full Discussion: Implicit Ping
Top Forums Shell Programming and Scripting Implicit Ping Post 57950 by skotapal on Wednesday 10th of November 2004 02:58:50 PM
Old 11-10-2004
Question Implicit Ping

Hi All

I want some help in writing a script that will:
1. Implicitly ping a server to see if it is up or not. (I have blocked all ICMP traffic on that box)
2. if the server is down send an alert mail to users

I have looked and looked but I could not get any way to do this. What I have thought of doing is:

1. Send an email to a particular user on the host box every 15 mins.
2. Have a script on the host to check the mailbox every 15 mins and delete that message.
3. If there is no mail in the mailbox... send the alert.

This will accomplish the implicit ping. But:
a. Is there a way to do this using shell/ perl scripts? - 2-3
b. Are there some security concerns in this kind of a solution?
c. Is there some other way I could accomplish implicit pinging of the server?

Any advise would be appreciated!

regards

KS
 

10 More Discussions You Might Find Interesting

1. Programming

gcc warnings: implicit declaration of function...

I am having strange warnings from gcc compiler, which I don't think should come while cmpiling. Can anyone help? The warnings are: - warning: implicit declaration of function 'bzero' - warning: implicit declaration of function 'inet_addr' The code is as below: int main(int argc, char... (2 Replies)
Discussion started by: Ahsan
2 Replies

2. AIX

Implicit login in AIX

only wanted to know .. if I have some tivoli jobs running with different user .. will this mean that everytime the job invokes .. the .profile runs for that user ... or is it that the .profile runs only at explicit LOGINs ... e.g if a cron calls a job under some user, does it run the .profile of... (1 Reply)
Discussion started by: rajesh_149
1 Replies

3. Shell Programming and Scripting

FTP/implicit SSL

Hi, I want to FTP can some one help me how do I do this manually from unix command line Thanks, (2 Replies)
Discussion started by: sridatos
2 Replies

4. Programming

implicit declaration of function 'reboot'

Hi, I'm tying to use the following function to reboot the system as part of my code #include <unistd.h> #include <linux/reboot.h> int restart(unsigned int delay) { sleep(delay); return reboot(LINUX_REBOOT_CMD_RESTART); } When I try to compile the code I get the warning in the... (2 Replies)
Discussion started by: galapogos
2 Replies

5. UNIX for Dummies Questions & Answers

Automating ftp job using implicit ssl?

Can this be done? Or do you need some other program installed on the AIX box? (6 Replies)
Discussion started by: NycUnxer
6 Replies

6. SuSE

RPM implicit dependencies

Hi, I'm having issues with implicit dependencies for my RPM package. This is the error I'm getting: error: Failed dependencies: libclntsh.so.11.1()(64bit) is needed by geomatica-10.4-0.x86_64 Our software has a dynamically loaded library which links to the Oracle's libclntsh.so.11.1... (2 Replies)
Discussion started by: pneveu
2 Replies

7. UNIX for Dummies Questions & Answers

FTP over implicit TSL - for dummies

Here are the essentials: un: myuser pw: mypasswd site: sftp.somesite.com port: 990 type: FTPS enc: FTP over implicit TLS program used: Curl 7.1.x on Hpux 11.31 I would like to "put" 1 file on there server. Here is my syntax, what am I doing wrong? curl -3 -v --cacert... (5 Replies)
Discussion started by: olyanderson
5 Replies

8. UNIX for Advanced & Expert Users

FTP over implicit TLS

Here are the essentials: un: myuser pw: mypasswd site: sftp.somesite.com port: 990 type: FTPS enc: FTP over implicit TLS program used: Curl 7.1.x on Hpux 11.31 I would like to "put" 1 file on there server. Here is my syntax, what am I doing wrong? curl -3 -v --cacert... (4 Replies)
Discussion started by: olyanderson
4 Replies

9. Shell Programming and Scripting

Implicit FTPS error on Citrix Sharefile

Hi, I have to upload a file to a remote Citrix Sharefile server using implicit FTPS. But the problem I'm facing is that when the FTPS UNIX script is called through a GUI tool; it keeps on running and after forcibly killing that job, if I try to connect the same server directly from the UNIX box... (1 Reply)
Discussion started by: dips_ag
1 Replies

10. Programming

Ping test sends mail when ping fails

help with bash script! im am working on this script to make sure my server will stay online, so i made this script.. HOSTS="192.168.138.155" COUNT=4 pingtest(){ for myhost in "$@" do ping -c "$COUNT" "$myhost" &&return 1 done return 0 } if pingtest $HOSTS #100% failed... (4 Replies)
Discussion started by: mort3924
4 Replies
sonar(6x)							XScreenSaver manual							 sonar(6x)

NAME
sonar - display a sonar scope SYNOPSIS
sonar [-ping hosts-or-subnets] [-ping-timeout int] [-delay usecs] [-speed ratio] [-sweep-size ratio] [-font-size points] [-team-a-name string] [-team-b-name string] [-team-a-count int] [-team-b-count int] [-no-dns] [-no-times] [-no-wobble] [-debug] [-fps] DESCRIPTION
This draws a sonar screen that pings (get it?) the hosts on your local network, and plots their distance (response time) from you. The three rings represent ping times of approximately 2.5, 70 and 2,000 milliseconds respectively. Alternately, it can run a simulation that doesn't involve hosts. OPTIONS
sonar understands the following options: -ping hosts-or-subnets The list of things to ping, separated by commas or spaces. Elements of this list may be: simulation Run in simulation mode instead of pinging real hosts. hostname Ping the given host. A.B.C.D Ping the given IP address. subnet Ping the local class C subnet (the nearest 255 addresses). subnet/NN Ping a different-sized local subnet: e.g., subnet/28 would ping a 4-bit subnet (the nearest 15 addresses). A.B.C.D/NN Ping an arbitrary other subnet. The IP address specifies the base address, and the part after the slash is how wide the subnet is. Typical values are /24 (for 255 addresses) and /28 (for 15 addresses). filename Ping the hosts listed in the given file. This file can be in the format used by /etc/hosts, or it can be any file that has host names as the first or second element on each line. If you use ssh, try this: sonar -ping $HOME/.ssh/known_hosts -ping-timeout int The amount of time in milliseconds the program will wait for an answer to a ping. -delay int Delay between frames, in microseconds. Default 20000. -speed ratio Less than 1 for slower, greater than 1 for faster. Default 1. -sweep-size ratio How big the glowing sweep area should be. Default 0.3. -font-size points How large the text should be. Default 10 points. -no-wobble Keep the display stationary instead of very slowly wobbling back and forth. -no-dns Do not attempt to resolve IP addresses to hostnames. -no-times Do not display ping times beneath the host names. -team-a-name string In simulation mode, the name of team A. -team-b-name string In simulation mode, the name of team B. -team-a-count int In simulation mode, the number of bogies on team A. -team-b-count int In simulation mode, the number of bogies on team B. -fps Display the current frame rate, polygon count, and CPU load. NOTES
On most Unix systems, this program must be installed as setuid root in order to ping hosts. This is because root privileges are needed to create an ICMP RAW socket. Privileges are disavowed shortly after startup (just after connecting to the X server) so this is believed to be safe: chown root:root sonar chmod u+s sonar It is not necessary to make it setuid on MacOS systems, because on MacOS, unprivileged programs can ping by using ICMP DGRAM sockets instead of ICMP RAW. In ping-mode, the display is a logarithmic scale, calibrated so that the three rings represent ping times of approximately 2.5, 70 and 2,000 milliseconds respectively. This means that if any the hosts you are pinging take longer than 2 seconds to respond, they won't show up; and if you are pinging several hosts with very fast response times, they will all appear close to the center of the screen (making their names hard to read.) SEE ALSO
X(1), xscreensaver(1), ping(8) COPYRIGHT
Copyright (C) 2000-2008 by Jamie Zawinski <jwz@jwz.org> Copyright (C) 1998 by Stephen Martin. <smartin@canada.com> Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in sup- porting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHORS
Stephen Martin <smartin@canada.com>, 3-nov-1998. Subnet support, etc. added by Jamie Zawinski, 17-Jul-2000. Rewritten using OpenGL instead of X11 by Jamie Zawinski, 12-Aug-2008. X Version 11 5.15 (28-Sep-2011) sonar(6x)
All times are GMT -4. The time now is 09:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy