admin_tool1Add my vote for this tag create new tag
, view all tags


This plugin tests if a remote host identified by host name or IP address is reachable via ping command.

Syntax Rules

PING{ host="..." } -- ping a host for reachability

  • The %PING{}% variable tests if a remote host identified by host name or IP address is reachable via ping command. The variable is handled by the PingPlugin.
  • Syntax: %PING{ host="www.google.com" }%
  • Supported attributes:
    Attribute Comment Default
    host="..." Host name or IP address (required)
    wait="..." Time, in seconds, to wait for a ping response "5"
    format="..." Format of output. Use the variables $host for the host and $result for the result (1 for success, 0 for failure) For success: "%GREEN%host%ENDCOLOR%"
    For failure: "%RED%host%ENDCOLOR%"
  • Example: %PING{ host="www.google.com" wait="2" }%
  • Category: AdministrationVariables, DevelopmentVariables, SystemInformationVariables
  • Related: PingPlugin

PING Examples

Basic Usage

%PING{ host="www.google.com" wait="1" }%
%PING{ host="www.google.com" wait="1" }%

%PING{ host="irs.gov" wait="1" }%
%PING{ host="irs.gov" wait="1" }%

%PING{ host="www.yahoo.com" wait="1" format="$host result is $result" }%
%PING{ host="www.yahoo.com" wait="1" format="$host result is $result" }%

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %PINGPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Test if a remote host is reachable via ping command

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.

  • For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.

  • Or, follow these manual installation steps:
    • Download the ZIP file from the Plugins home (see below).
    • Unzip PingPlugin.zip in your twiki installation directory. Content:
      File: Description:
      data/TWiki/PingPlugin.txt Plugin topic
      data/TWiki/VarPING PING variable documentation
      lib/TWiki/Plugins/PingPlugin.pm Plugin Perl module
      lib/TWiki/Plugins/PingPlugin/Core.pm Plugin Perl module
    • Set the ownership of the extracted directories and files to the webserver user.
    • Make sure the dependencies listed in the table below are resolved.

  • Plugin configuration and testing:
    • Run the configure script, enable the plugin in the Plugins section
    • Test if the installation was successful: See examples above.

Plugin Info

Plugin Author: TWiki:Main.MagnusLewisSmith
Copyright: © 2005 TWiki:Main.MagnusLewisSmith
© 2010-2012 Peter Thoeny, TWiki.org
License: GPL (GNU General Public License)
Plugin Version: 2012-12-01
Change History:  
2012-12-01: TWikibug:Item6962: Fix manifest; add category to VarPING; doc enhancements -- TWiki:Main.PeterThoeny
2012-06-06: TWikibug:Item6613: Adding format parameter -- TWiki:Main.AaronLWalker
2005-09-28: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL (GNU General Public License)
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, PingPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/PingPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/PingPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/PingPluginAppraisal

Related Topics: VarPING, TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 PingPlugin.md5 r2 r1 manage 0.1 K 2012-12-02 - 02:50 PeterThoeny  
Compressed Zip archivetgz PingPlugin.tgz r2 r1 manage 5.1 K 2012-12-02 - 02:50 PeterThoeny  
Compressed Zip archivezip PingPlugin.zip r2 r1 manage 7.8 K 2012-12-02 - 02:50 PeterThoeny  
Unknown file formatEXT PingPlugin_installer r1 manage 3.5 K 2012-12-02 - 02:50 PeterThoeny  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.