GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Check zone ip
Operating System - HP-UX
1848854
Members
8135
Online
104038
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2006 02:57 AM
11-21-2006 02:57 AM
Hi,
In server A, I have a script that ping ip 10.30.11.209.
If the ip is up, it will show 10.30.11.209 is alive if not it will show unknown host 10.30.11.209. The input of the script will be in ip.txt
In server B, I need a script that can ftp server A and get the ip.txt. If the content show unknown host, it will then send an sms alert.
In server A, I have a script that ping ip 10.30.11.209.
If the ip is up, it will show 10.30.11.209 is alive if not it will show unknown host 10.30.11.209. The input of the script will be in ip.txt
In server B, I need a script that can ftp server A and get the ip.txt. If the content show unknown host, it will then send an sms alert.
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2006 03:13 AM
11-21-2006 03:13 AM
Solution
Hi,
something like:
Server A:
#/usr/bin/sh
rm out.txt
while read ip
do
ping $ip -n 1 > /dev/null 2>&1
status=$?
if [ $status -ne 0 ]
then
echo "$ip is alive" >> out.txt
else
echo "Unknown host $ip" >> out.txt
fi
done < ip.txt
Server B:
ftp -n ServerA << EOF
user id passwd
get out.txt
bye
EOF
count=`grep Unknown out.txt | wc -l`
if [ $count -gt 0 ]
then
mailx
fi
something like:
Server A:
#/usr/bin/sh
rm out.txt
while read ip
do
ping $ip -n 1 > /dev/null 2>&1
status=$?
if [ $status -ne 0 ]
then
echo "$ip is alive" >> out.txt
else
echo "Unknown host $ip" >> out.txt
fi
done < ip.txt
Server B:
ftp -n ServerA << EOF
user id passwd
get out.txt
bye
EOF
count=`grep Unknown out.txt | wc -l`
if [ $count -gt 0 ]
then
mailx
fi
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP