The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 04: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 04:29 AM
stty errors nir_s UNIX for Dummies Questions & Answers 2 02-06-2006 04:54 AM
Adapter Errors and Link Errors mcastill66 UNIX for Advanced & Expert Users 0 08-02-2005 06:11 PM
stty: tcgetattr: Not a typewriter Trusevich Shell Programming and Scripting 1 01-17-2002 02:42 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-24-2004
Student37 Student37 is offline
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.
  #2 (permalink)  
Old 06-24-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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...
  #3 (permalink)  
Old 06-24-2004
Student37 Student37 is offline
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....
  #4 (permalink)  
Old 06-24-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
  #5 (permalink)  
Old 07-01-2004
Student37 Student37 is offline
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
  #6 (permalink)  
Old 07-01-2004
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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.
  #7 (permalink)  
Old 05-30-2006
frankwiel frankwiel is offline
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
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0