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
RXTELNET(1)						    BSD General Commands Manual 					       RXTELNET(1)

NAME
rxtelnet -- start a telnet and forward X-connections. SYNOPSIS
rxtelnet [-l username] [-k] [-t telnet_args] [-x xterm_args] [-K kx_args] [-w term_emulator] [-b telnet_program] [-n] [-v] host [port] DESCRIPTION
The rxtelnet program starts an xterm window with a telnet to host host. From this window you will also be able to run X clients that will be able to connect securely to your X server. If port is given, that port will be used instead of the default. If setting up the X forwarding failes, rxtelnet will still telnet in to the remote host, but without X forwarding. The supported options are: -l Log in on the remote host as user username. -k Disables keep-alives. -t Send telnet_args as arguments to telnet. -x Send xterm_args as arguments to xterm. -X Send kx_args as arguments to kx. -w Use term_emulator instead of xterm. -b Use telnet_program instead of telnet. -n Do not start any terminal emulator. -v Be verbose. EXAMPLE
To login from host foo (where your display is) to host bar, you might do the following. 1. On foo: rxtelnet bar 2. You will get a new window with a telnet to bar. In this window you will be able to start X clients. SEE ALSO
kx(1), rxterm(1), telnet(1), tenletxr(1), kxd(8) KTH_KRB March 7, 2004 KTH_KRB
All times are GMT -4. The time now is 11:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy