- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- Trying to reach printers
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
Trying to reach printers
SOLVED- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:22 PM
07-01-2010 01:22 PM
i need to verify if the printers are reachables or not.
i am using ping command.
I know that many of them are not reachables.. but i need to create the evidence.
when i ping them, it takes a long long long tiime ... who can i do to let the ping command know "if you can not reach the printer after 10 seconds, please break and follow the next one" ??? (i am using a shell using for ...)
what other command can i use to test if the printer is reachable or not?
please let me know.
thanks in advance.
Manuales :)
thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:43 PM
07-01-2010 01:43 PM
SolutionConsider the following:
# ping -n 3 printer1
will transmit 3 packets to printer 1 and exit.
# pint -n 5 -t 5 printer2
will time out after 5 seconds or 5 packets have been transmitted. The use of '-t' requires the use of '-n'.
See 'man ping' for more information.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:44 PM
07-01-2010 01:44 PM
Re: Trying to reach printers
Re: Trying to reach printers
>>
>>will time out after 5 seconds or 5 packets
>>have been transmitted. The use of '-t'
>>requires the use of '-n'.
I screwed up above. The '-t' should actually be '-m'. The '-t' option is different.
The above should actually read:
# pint -n 5 -m 5 printer2
will time out after 5 seconds or 5 packets have been transmitted. The use of '-m' requires the use of '-n'.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:52 PM
07-01-2010 01:52 PM
Re: Trying to reach printers
Re: Trying to reach printers
okok i am kidding .. you mean pÃng command ..ok ok let me try.
thanks for your support
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:52 PM
07-01-2010 01:52 PM
Re: Trying to reach printers
Re: Trying to reach printers
ping is good.
you can also telnet to the printer port
(hp print server port : 9100 e.g.)
telnet
you should then be presented with a menu and one of the item should show you the status of the printer.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:54 PM
07-01-2010 01:54 PM
Re: Trying to reach printers
Re: Trying to reach printers
>>okok i am kidding .. you mean pà Âng command
>>..ok ok let me try.
You are correct, I did mean ping.
Although a pint of an adult libation would be nice about now......
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:56 PM
07-01-2010 01:56 PM
Re: Trying to reach printers
Re: Trying to reach printers
$ for a in `cat sidnsnoping.txt `
> do
> /etc/ping -n 2 -t 2 $a
> echo "==="
> done
output:
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]]
the file sidnsnoping.txt exists correctly ..
what is wrong here?
please help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 01:59 PM
07-01-2010 01:59 PM
Re: Trying to reach printers
Re: Trying to reach printers
ping -n 2 -m 2 $a
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 02:00 PM
07-01-2010 02:00 PM
Re: Trying to reach printers
Re: Trying to reach printers
ping -n 5 -m 2
will send 5 ping packets, and will wait up to 2 seconds for each ping reply. The total wait time should then be 10 seconds in the worst case (i.e. when the printer is completely not reachable).
If the printer is configured as a "remote" printer to HP-UX, it uses the traditional Unix LPR print protocol. In this case, you can use any tool that can connect to the TCP port 515 on the printer and verify that it works. This test can be done manually using the telnet command targeted to the port 515:
telnet
If the printer is configured as a "network" printer to HP-UX, it is a printer equipped with a HP JetDirect adapter or equivalent functionality. In this case, the port number to test is usually 9100:
telnet
(The redirection of input from /dev/null prevents the telnet command from waiting forever for input if the test is successful and a connection is actually established.)
MK
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 02:51 PM
07-01-2010 02:51 PM
Re: Trying to reach printers
Re: Trying to reach printers
for a in `cat sidnsnoping.txt `
do
/etc/ping -n 2 -m 2 $a
echo "==="
done
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 03:40 PM
07-01-2010 03:40 PM
Re: Trying to reach printers
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 03:46 PM
07-01-2010 03:46 PM
Re: Trying to reach printers
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 06:21 PM
07-01-2010 06:21 PM
Re: Trying to reach printers
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-01-2010 07:15 PM
07-01-2010 07:15 PM
Re: Trying to reach printers
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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-02-2010 07:30 AM
07-02-2010 07:30 AM
Re: Trying to reach printers
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 !!!!
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP