ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Ping with SSH

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ping with SSH

    When I try to use the ping command in a SSH session (with bash), this is the response:
    PHP Code:
    bashpingcommand not found 
    I was a bit disappointed. How could it be?
    I tried everything I found on the net: yum install iputils (packet not found), I even downloaded a generic RPM package for PPC64 (too many missing dependencies).

    Is it really possible that one can't launch a simple ping from SSH?
    Yes, I know OS/400 PING command, but I needed to create a script in order to monitor a particular host.

  • #2
    On IBM i, PING is provided as a system command not a PASE command. This provides you with two possible solutions:
    1. You could call the system ping command from your script.
    2. Or, you could find/write/buy a ping command for PASE and install it and run that.


    For example, you could do this in your script:
    Code:
    system "ping rmtsys('www.google.com')"

    Comment


    • #3
      Thanks Scott, I didn't know about the "system" command. Nice!

      Comment

      Working...
      X