The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Major OS errors/Bash errors help!!!! wcmmlynn UNIX for Dummies Questions & Answers 12 11-13-2007 12:50 AM
stty: tcgetattr: A specified file does not support the ioctl system call. vishal_ranjan UNIX for Advanced & Expert Users 9 05-30-2007 01:29 AM
stty errors nir_s UNIX for Dummies Questions & Answers 2 02-06-2006 12:54 AM
Adapter Errors and Link Errors mcastill66 UNIX for Advanced & Expert Users 0 08-02-2005 03:11 PM
stty: tcgetattr: Not a typewriter Trusevich Shell Programming and Scripting 1 01-17-2002 10:42 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2004
Registered User
 

Join Date: Aug 2003
Location: NJ
Posts: 39
stty tcgetattr errors

Hi,
I have an app that runs Oracle 8.1.7 residing on a AIX 4.3 ML 10 . preiodically app sends out a status log like the one displayed below. Lately I have noticed this stty:tcgetattr message in the log. Script that writes this output calls sqlplus, gets the required count and writes output to file.
Question is what is causing this "stty: tcgetattr" message and how can i prevent it from occurring
Please let me know Thnx....

stty: tcgetattr: A specified file does not support the ioctl system call.
06/24 09:30:00 W: 0 M: 0/ L: 0 C: 2068/ 92303 F: 0/ R: 0 T: 2068
stty: tcgetattr: A specified file does not support the ioctl system call.
06/24 09:40:00 W: 0 M: 0/ L: 0 C: 2068/ 92303 F: 0/ R: 0 T: 2068
stty: tcgetattr: A specified file does not support the ioctl system call.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-24-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,352
What usually causes a situation like this is a .profile file. People will load commands like:
stty intr ^c
or something into their .profile. And then Oracle people also put in stuff like
ORACLE_VARIABLE=something
export ORACLE_VARIABLE

Then they write a script that needs that oracle variable. So to make the script self-sufficient, they will run .profile with the dot command.

Then they run that script via cron and now there is no controlling terminal. The script runs .profile and .profile tries to run stty. Bingo.... you get that error message.

So check for that...
Reply With Quote
  #3 (permalink)  
Old 06-24-2004
Registered User
 

Join Date: Aug 2003
Location: NJ
Posts: 39
Thank You this is pretty cool...
profile has stty erase ^?, script inturn was running .profile.
I have removed stty erase ^? from .profile and no longer get the error. Now I will move towards trying to fix the script..

Thnx....
Reply With Quote
  #4 (permalink)  
Old 06-24-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,352
Well that's not a great solution. Now when the oracle user signs on, the erase character will be wrong.

I would move those environment settings into a file called .oracle_setup or something. Then put a
. ./.oracle_setup
in .profile and in any scripts that need it.
Reply With Quote
  #5 (permalink)  
Old 07-01-2004
Registered User
 

Join Date: Aug 2003
Location: NJ
Posts: 39
Hi,
Well thats exactly whats happening, all week i have been attending calls regarding dev and test engineers not being able to use the erase character.
I have the script below. Would appreciate if you could guide me with your valuable suggestions.

script runs in a cron every ten minutes:

#!/bin/ksh
#
# $Log: getStats,v $
# Revision 1.1.1.1 2004/0/07 15:02:26 vagabond
# This is an initial check-in of ARCEngine software into new CVS reporistory.
#

. ~colddba/.profile

DATE=`date +"%m/%d %H:%M:%S"`
W_COMPLETED=`echo 'select count(*) from queue where status=1 and sub_status=1;'
| sqlplus -S qmanager/qmanager | head -4 | tail -1`M_COMPLETED=`echo 'select count(*) from queue where status=2 and sub_status=1;'
| sqlplus -S qmanager/qmanager | head -4 | tail -1`
PG_MCOMPLETED=`echo 'select sum(page_count) from queue where status=2 and sub_st
atus=1;' | sqlplus -S qmanager/qmanager | head -4 | tail -1`
L_COMPLETED=`echo 'select count(*) from queue where status=3 and sub_status=1;'
| sqlplus -S qmanager/qmanager | head -4 | tail -1`
U_COMPLETED=`echo 'select count(*) from queue where status=5 and sub_status=1;'
| sqlplus -S qmanager/qmanager | head -4 | tail -1`
PG_COMPLETED=`echo 'select sum(page_count) from queue where status=5 and sub_sta
tus=1;' | sqlplus -S qmanager/qmanager | head -4 | tail -1`
FAILED=`echo 'select count(*) from queue where sub_status=2;' | sqlplus -S qmana
ger/qmanager | head -4 | tail -1`
PG_FAILED=`echo 'select sum(page_count) from queue where sub_status=2;' | sqlplu
s -S qmanager/qmanager | head -4 | tail -1`
RUNNING=`echo 'select count(*) from queue where sub_status=3;' | sqlplus -S qman
ager/qmanager | head -4 | tail -1`
TOTAL=`echo 'select count(*) from queue;' | sqlplus -S qmanager/qmanager | head
-4 | tail -1`
echo $DATE W:$W_COMPLETED M:$M_COMPLETED/$PG_MCOMPLETED L:$L_COMPLETED C:$U_COMP
LETED/$PG_COMPLETED F:$FAILED/$PG_FAILED R:$RUNNING T:$TOTAL
Reply With Quote
  #6 (permalink)  
Old 07-01-2004
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,352
Ummm...
Quote:
I would move those environment settings into a file called .oracle_setup or something. Then put a
. ./.oracle_setup
in .profile and in any scripts that need it.
Reply With Quote
  #7 (permalink)  
Old 05-30-2006
Registered User
 

Join Date: May 2006
Posts: 2
stty errors

All well, with the . ./.oracle_setup solution.
But what if is the script is executed as follows:

su - sewiefr -c start_application.sh

The .profile is called anyway
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:52 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0