Sponsored Content
Top Forums Shell Programming and Scripting Telnet errors coming on screen while using snarf command. Post 302844815 by Raza Ali on Tuesday 20th of August 2013 05:43:35 AM
Old 08-20-2013
Telnet errors coming on screen while using snarf command.

Hi Team,

I am using one script, It is working fine, the problem is it gives unwanted telnet errors when I am using it.
I just want to remove these unwanted errors/info from my screen.


bash-3.00$ cat raza_site_temp
#!/usr/bin/bash
#rj835b
IFS="|"
REGEX="$*"
echo
snarf2 -c "show chassis status" `showHosts gsx |egrep "$REGEX"` > /dev/null > d1d1
echo
cat d1d1 |egrep -i "Node|Temp"|sed '/Node/{x;p;x;}'
echo
echo
echo "GSX Temperature > 30C"
echo "*********************"
echo
cat d1d1|egrep "Node|Temp"|awk '{if ($1~/Node:/) print $1,$2; else if ($1~/Temperature/) print $0}'|sed '$!N;s/\n/ /'|awk '{if (substr($4,1,2)>30) print $2,"----->", $4}'|awk '{printf "%-10s %s %s\n", $1,$2,$3}'
echo
bash-3.00$


Output of the script


bash-3.00$ ./raza_site_temp hst

Enter GSX Login: Enter GSX Password:
telnet: Unable to connect to remote host: Connection refused
Connection to 10.24.63.67 closed by foreign host.
Connection to 10.24.63.68 closed by foreign host.
telnet: Unable to connect to remote host: Connection refused
Connection to 10.24.63.70 closed by foreign host.
telnet: Unable to connect to remote host: Connection refused
Connection to 10.24.63.72 closed by foreign host.
telnet: Unable to connect to remote host: Connection refused
Connection to 10.24.63.74 closed by foreign host.
telnet: Unable to connect to remote host: Connection refused
Connection to 10.24.63.98 closed by foreign host.
telnet: Unable to connect to remote host: Connection refused


Node: hstg1so Date: 2013/08/20 09:35:31 GMT
Temperature: 25C

Node: hstg2so Date: 2013/08/20 09:35:39 GMT
Temperature: 26C

Node: hstg3so Date: 2013/08/20 09:35:48 GMT
Temperature: 24C

Node: hstg4so Date: 2013/08/20 09:35:55 GMT
Temperature: 25C

Node: hstg5so Date: 2013/08/20 09:36:03 GMT
Temperature: 25C

Node: hstg6so Date: 2013/08/20 09:36:11 GMT
Temperature: 25C


GSX Temperature > 30C
*********************


bash-3.00$


When I fire script it will ask for password, then it will fetch data from different node, error coming from redundant ports.
I jus want these telnet and connection refused error does not appear on my screen.

Thanks
Raza
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Errors installing Screen 4.0.2

I tried to install and use Screen4.0.2 for SunOS 5.8. WHen I go to execute screen it tries to start it, but shows a quick error: ttyn: Permission denied. and then... Sorry, could not find a PTY. Does anyone know what I might have done wrong? How can I get screen to work? Thanks in... (1 Reply)
Discussion started by: FredSmith
1 Replies

2. HP-UX

telnet remsh rogin errors

hi everybody. can u help please . i have error: getpid: peer died: Error 0 on /var/adm/syslog/syslog.log. what does it means?how can i fix problem? also strange wen i make an rlogin from my affected host to annother one. it demands the password!!!! (0 Replies)
Discussion started by: hmaiida
0 Replies

3. Shell Programming and Scripting

Files are not coming in attachement by any command

Hi All I want to send a file thru a mail with an attachment. i tried using uuencode , but it says "bash: uuencode: command not found" and the same i am getting for mutt as well: "bash: mutt: command not found" Tried searching in all the forums but could not find anything... (2 Replies)
Discussion started by: Prateek007
2 Replies

4. Linux

Possible errors in telnet

Am writing one script in which it will check whether a device listens on the specific port. using telnet, I have written the script. Now my doubt is I have to handle different kind of errors that telnet is giving. Anybody can give the list of errors and what is the cause of that error? So that I... (2 Replies)
Discussion started by: skmdu
2 Replies

5. UNIX for Dummies Questions & Answers

Automatic logging (capture screen output) of telnet/ssh sessions on a Solaris node

Hi I am working in Solaris 10 and I want to monitor logs for every telnet/ssh session that tries to connect to the server. I need these logs to be generated in a file that I can fetch using ftp. I am a new user and a stepwise detail will be great BR saGGee (3 Replies)
Discussion started by: saggee
3 Replies

6. Red Hat

command line tool to disable screen lock and/or screen saver

Hi, I have a simple question : how to disable screen lock and/or sreen saver with command line with RHEL5.4 ? (1 Reply)
Discussion started by: albator1932
1 Replies

7. AIX

xp to aix - telnet blank screen

hello, i am trying to test connection to a 5.3 box. from an xp machine, telnet connects but shows only a blank screen. cursor moves as i type, but no response back. have used telnet, putty and accuterm - all same result verified that telnet services are active in xp xp windoze firewall is... (10 Replies)
Discussion started by: allenhibbert
10 Replies

8. UNIX and Linux Applications

vnc viewer presents black screen along with GNOME settings daemon errors.

Hello folks, I'm remotely connecting through VNC to two machines, each running Red Hat 5.9, from mine which is running Windows 7. Both connections were working well before. However, now one of the machines only gives me a black screen, with a pop up that says: "There was an error starting... (1 Reply)
Discussion started by: Miguel E. Perez
1 Replies

9. Shell Programming and Scripting

Want to remove telnet error/info from screen

Hi Team, I am using one script, It is working fine, the problem is it gives unwanted telnet errors when I am using it. I just want to remove these unwanted errors/info from my screen. bash-3.00$ cat raza_site_temp #!/usr/bin/bash #rj835b IFS="|" REGEX="$*" echo snarf2 -c "show... (2 Replies)
Discussion started by: Raza Ali
2 Replies

10. UNIX for Dummies Questions & Answers

Top Command Output is not coming via Cronjob

Dear All, I created a small script to get the CPU, GIS usage etc automatically. However when i run this script manually its working , but when i run through cronjob i am not getting any output. Can anyone please help me on this. I am using SuseLinux. Thank you in advance. #!/bin/sh {... (2 Replies)
Discussion started by: Nitin Kapoor
2 Replies
POE::Component::Server::SimpleHTTP::Connection(3pm)	User Contributed Perl Documentation    POE::Component::Server::SimpleHTTP::Connection(3pm)

NAME
POE::Component::Server::SimpleHTTP::Connection - Stores connection information for SimpleHTTP SYNOPSIS
use POE::Component::Server::SimpleHTTP::Connection; my $connection = POE::Component::Server::SimpleHTTP::Connection->new( $socket ); # Print some stuff print $connection->remote_port; DESCRIPTION
This module simply holds some information from a SimpleHTTP connection. METHODS my $connection = POE::Component::Server::SimpleHTTP::Connection->new( $socket ); $connection->remote_ip(); # Returns remote ip in dotted quad format ( 1.1.1.1 ) $connection->remote_port(); # Returns remote port $connection->remote_addr(); # Returns true remote address, consult the L<Socket> POD $connection->local_addr(); # Returns true local address, same as above $connection->local_ip(); # Returns local ip in dotted quad format ( 1.1.1.1 ) $connection->local_port(); # Returns local port $connection->dead(); # Returns a boolean value whether the socket is closed or not $connection->ssl(); # Returns a boolean value whether the socket is SSLified or not $connection->sslcipher(); # Returns the SSL Cipher type or undef if not SSL $connection->ID(); # unique ID of this connection EXPORT Nothing. SEE ALSO
POE::Component::Server::SimpleHTTP, POE::Component::Server::SimpleHTTP::Response AUTHOR
Apocalypse <apocal@cpan.org> Chris "BinGOs" Williams <chris@bingosnet.co.uk> COPYRIGHT AND LICENSE
Copyright X Apocalypse and Chris Williams This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-12-28 POE::Component::Server::SimpleHTTP::Connection(3pm)
All times are GMT -4. The time now is 09:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy