06-09-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wrote a script to test many systems to see if they are up or not. if a system is down, i am notified by email
now, most of the time,when systems are down in my enviroment, it is because the user accidentally or purposely (not knowing the consequences) hit the power button. so these problems... (3 Replies)
Discussion started by: TRUEST
3 Replies
2. Shell Programming and Scripting
Hi all,
I'm trying to write a shell script that will ping a site and and write the date and 1 or 0 (for success or no success) to a file.
it looks roughly like this:
#/bin/sh
set mydate = `date`
set myvar = `ping -c 1 hostname | grep -c "100%"`
if ($myvar == 1) then
echo... (1 Reply)
Discussion started by: TylerDurden
1 Replies
3. UNIX for Dummies Questions & Answers
I can ping by ip address but not by host name
everything is on the same subnet
check all of the normal files
I can telnet in to the unix box but can not open a connect to
the share dir.
unix ver sunSO 5.9
all the other computers ar Windows XP (with firewall turn off)
Thanks... (1 Reply)
Discussion started by: vviscomi
1 Replies
4. UNIX for Dummies Questions & Answers
I want to access window file system through Samba. when i ping Window machine through linux machine it connect, but in reverse case it shows "Request time out". could any one suggest what problem may be. (1 Reply)
Discussion started by: sonirajesh
1 Replies
5. IP Networking
Comp1=192.168.100.2
Comp2=192.168.100.6
both the comp have win2000 Os.
Using Cross cable i have connected back to Back.
When i ping From Comp1 to Comp2 its working fine.
But
When i ping From Comp2 to Comp1 its not working.
I know don't know what went wrong please help me out.... (4 Replies)
Discussion started by: ashokmeti
4 Replies
6. AIX
Hi All,
I'm testing ping command on two servers.
A,B,C,D are servers
From A-->B:
ping -c 3 -p ff -s30720 <B IP-Addres>
This works fine.
From C-->D:
ping -c 3 -p ff -s30720 <D IP-Addres>
This is NOT working and 100% packe loss :(
But if I use 8700 instead of 30720 for packet size... (6 Replies)
Discussion started by: saraperu
6 Replies
7. Solaris
Hi friends,
I am running Solaris 10, which is connected to a DSL router running DHCP. During the installation I chose not to use DHCP and assigned a permanent IP address to solaris machine. I also did not choose any name service as well. The rest of the details are as under.
Solaris Machine
IP... (4 Replies)
Discussion started by: gabam
4 Replies
8. HP-UX
I am having a problem with a new server build that has got me completely baffled. This server has a private back end network so the way it is supposed to work is that the server thinks its ip address is 10.131.0.48 but the rest of the world knows it as 199.68.100.100 per DNS. It has to be this way... (2 Replies)
Discussion started by: keelba
2 Replies
9. Shell Programming and Scripting
How can I get the following result of the "ping" command?
Example:
root@OpenWrt:~# ping google.com -c1 | sed -n 1p
PING google.com (216.58.210.14): 56 data bytes
How can I get the data only in the range of ()?
The result of what I want to get it:
216.58.210.14
Please use code... (4 Replies)
Discussion started by: andrewxxx
4 Replies
10. IP Networking
I have vmware on my windows PC ( hostname : acer ).
vmware has RHEL 7 ( hostname : rhel7 ) installed recently.
RHEL IP configuration
IP : 192.168.5.128
Netmask : 255.255.255.0
ssh to rhel7 works from acer using putty
resolve.conf
cat /etc/resolv.conf
nameserver 192.168.5.1
host... (12 Replies)
Discussion started by: hiten.r.chauhan
12 Replies
LEARN ABOUT DEBIAN
anyevent::xmpp::ext::ping
AnyEvent::XMPP::Ext::Ping(3pm) User Contributed Perl Documentation AnyEvent::XMPP::Ext::Ping(3pm)
NAME
AnyEvent::XMPP::Ext::Ping - Implementation of XMPP Ping XEP-0199
SYNOPSIS
use AnyEvent::XMPP::Ext::Ping;
my $con = AnyEvent::XMPP::IM::Connection->new (...);
$con->add_extension (my $ping = AnyEvent::XMPP::Ext::Ping->new);
# this enables auto-timeout of a connection if it didn't answer
# within 120 seconds to a ping with a reply
$ping->enable_timeout ($con, 120);
my $cl = AnyEvent::XMPP::Client->new (...);
$cl->add_extension (my $ping = AnyEvent::XMPP::Ext::Ping->new);
# this enables auto-timeout of newly created connections
$ping->auto_timeout(120);
$ping->ping ($con, 'ping_dest@server.tld', sub {
my ($time, $error) = @_;
if ($error) {
# we got an error
}
# $time is a float (seconds) of the rtt if you got Time::HiRes
});
DESCRIPTION
This extension implements XEP-0199: XMPP Ping. It allows you to define a automatic ping timeouter that will disconnect dead connections
(which didn't reply to a ping after N seconds). See also the documentation of the "enable_timeout" method below.
It also allows you to send pings to any XMPP entity you like and will measure the time it took if you got Time::HiRes.
METHODS
new (%args)
Creates a new ping handle.
auto_timeout ($timeout)
This method enables automatic connection timeout of new connections. It calls "enable_timeout" (see below) for every new connection
that was connected and emitted a "stream_ready" event.
This is useful if you want connections that have this extension automatically timeouted. In particular this is useful with modules like
AnyEvent::XMPP::Client (see also SYNOPSIS above).
enable_timeout ($con, $timeout)
This enables a periodical ping on the connection $con. $timeout must be the seconds that the ping intervals last.
If the server which is connected via $con didn't respond within $timeout seconds the connection $con will be disconnected.
Please note that there already is a basic timeout mechanism for dead TCP connections in AnyEvent::XMPP::Connection, see also the
"whitespace_ping_interval" configuration variable for a connection there. It then will depend on TCP timeouts to disconnect the
connection.
Use "enable_timeout" and "auto_timeout" only if you really feel like you need an explicit timeout for your connections.
ping ($con, $dest, $cb, $timeout)
This method sends a ping request to $dest via the AnyEvent::XMPP::Connection in $con. If $dest is undefined the ping will be sent to
the connected server. $cb will be called when either the ping timeouts, an error occurs or the ping result was received. $timeout is
an optional timeout for the ping request, if $timeout is not given the default IQ timeout for the connection is the relevant timeout.
The first argument to $cb will be the seconds of the round trip time for that request (If you have Time::HiRes). If you don't have
Time::HiRes installed the first argument will be undef.
The second argument to $cb will be either undef if no error occured or a AnyEvent::XMPP::Error::IQ error object.
ignore_pings ($bool)
This method is mostly for testing, it tells this extension to ignore all ping requests and will prevent any response from being sent.
AUTHOR
Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>"
COPYRIGHT & LICENSE
Copyright 2007, 2008 Robin Redeker, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-01-23 AnyEvent::XMPP::Ext::Ping(3pm)