- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Trying to reach printers
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
Community
Resources
Forums
Blogs
- 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
тАО07-01-2010 03:40 PM
тАО07-01-2010 03:40 PM
Re: Trying to reach printers
How do you know it is not working? I don't see any error messages.
This might be more useful:
for PRN in $(cat sidnsnoping.txt)
do
/usr/sbin/ping -n 2 -m 2 $PRN
RTN=$?
[[ $RTN -ne 0 ]] && echo "$PRN = error $RTN"
echo "==="
done
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 03:46 PM
тАО07-01-2010 03:46 PM
Re: Trying to reach printers
$ ./revisa.sh
printer1.myenterprise.com
Usage: ping [-oprv] [-f address-family] [-i address] [-I interval] [-t ttl] hos
t [-n count [-m timeout]]
ping [-oprv] [-f address-family] [-i address] [-I interval] [-t ttl] hos
t packet-size [[-n] count [-m timeout]]
printer1.myenterprise.com = error 1
should i get this?
printer1.myenterprise.com = error 1
does this mean that i do not reach it?
i am on:
HP-UX atlup10 B.11.23
how can i avoid the error of saying that i am not using correctly the command ping??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 06:21 PM
тАО07-01-2010 06:21 PM
Re: Trying to reach printers
My psychic powers are too weak to tell me
what's in it.
cat sidnsnoping.txt
> what is wrong here?
I also can't see exactly what your script is
doing.
cat ./revisa.sh
> Usage: ping [...]
I'd guess that "ping" does not like your
(invisible) command-line options and
parameters.
> how can i avoid the error of saying that i
> am not using correctly the command ping??
Uh, use it correctly? You might start by
trying to see what's happening.
sh -x ./revisa.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2010 07:15 PM
тАО07-01-2010 07:15 PM
Re: Trying to reach printers
> Usage: ping [-oprv] [-f address-family] [-i address] [-I interval] [-t ttl] host [-n count [-m timeout]]
Pretty obvious problem -- you have specified option(s) that are invalid or have wrong values. This is why the man pages were written. The example above is incorrect. ping requires -n and -m to follow the hostname/IPaddr. This is unlike any other Unix type command and is a common problem with developing ping scripts. The correct script is:
for PRN in $(cat sidnsnoping.txt)
do
/usr/sbin/ping $PRN -n 2 -m 2
RTN=$?
[[ $RTN -ne 0 ]] && echo "$PRN = error $RTN"
echo "==="
done
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2010 07:30 AM
тАО07-02-2010 07:30 AM
Re: Trying to reach printers
cat sidnsnoping.txt
printer1.mysite.com
printer2.mysite.com
printer3.mysite.com
printer4.mysite.com
printer5.mysite.com
printer6.mysite.com
printer7.mysite.com
for PRN in $(cat sidnsnoping.txt)
do
echo $PRN
/usr/sbin/ping $PRN -n 2 -m 2
RTN=$?
[[ $RTN -ne 0 ]] && echo "$PRN = error $RTN"
echo "==="
sleep 1
done
thank you so much !!!!
thanks all !!!!
- « Previous
-
- 1
- 2
- Next »