- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ps: don't know which terminal to select
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 05:47 PM
тАО02-28-2011 05:47 PM
ps: don't know which terminal to select
This script works on AIX 5.X
This script works on HPUX if running directly on the command line
ONLY If run from cron I get this error:
(HP-UX
ps: don't know which terminal to select
ps: don't know which terminal to select
ps: don't know which terminal to select
ps: don't know which terminal to select
Here is the relevant code:
#!/usr/bin/ksh
....
manage_ssh_ps $HOST &
...
PLEASE NOTE:
I have read about this patch PHCO_30559:
http://www13.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_33267&sel={hpux:11.00,}&BC=main|search|patchDetail{PHCO_33267,{hpux:11.00,}}|cart|
The test for the conditions described do not match, in particular
$ ps < /dev/null 1> /tmp/out 2> /tmp/err
$ echo $?
1
$ cat /tmp/out --- This does not give any output.
$ cat /tmp/err
ps: don't know which terminal to select
cat /tmp/out
-- outputs normal ps info
cat /tmp/err
-- is empty
Furthermore the patch is for a different OS load.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 06:38 PM
тАО02-28-2011 06:38 PM
Re: ps: don't know which terminal to select
ONLY If run from cron I get this error:
What is the user in both condition?
Shibin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 07:16 PM
тАО02-28-2011 07:16 PM
Re: ps: don't know which terminal to select
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 08:07 PM
тАО02-28-2011 08:07 PM
Re: ps: don't know which terminal to select
> #!/usr/bin/ksh
> ....
> manage_ssh_ps $HOST &
Not very useful.
What is manage_ssh_ps?
Post the results of this command:
# what /usr/bin/ps
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-28-2011 09:10 PM
тАО02-28-2011 09:10 PM
Re: ps: don't know which terminal to select
ps: don't know which terminal to select
Either they broke this with PHCO_30559 or it never worked?
Note: A crontab job doesn't have a controlling terminal.
It appears what you want conflicts with the documentation:
(none) Select those processes associated with the current terminal.
Since there is no current terminal, you get that error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2011 05:02 AM
тАО03-01-2011 05:02 AM
Re: ps: don't know which terminal to select
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2011 01:16 PM
тАО03-01-2011 01:16 PM
Re: ps: don't know which terminal to select
What is the output on Linux and AIX when there is no controlling terminal?
What did you want to see?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2011 03:05 PM
тАО03-01-2011 03:05 PM
Re: ps: don't know which terminal to select
In this case the script is being run on 11.23 but in the patch description - for a similar issue - on 11.00 there exists a condition in which the way the terminal was being assigned needed fixing. But that patch mentioned nothing about cron.
Regards, putting a process in the background in korn shell, via cron, on 11.23 consistently is causing errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-01-2011 04:18 PM
тАО03-01-2011 04:18 PM
Re: ps: don't know which terminal to select
for x in 2 3 4 5 6^Jdo^Jssh atl$x ps^Jdone
ps: don't know which terminal to select
ps: don't know which terminal to select
ps: don't know which terminal to select
ps: don't know which terminal to select
ps: don't know which terminal to select
I get the same results for remsh and rexec. So what does ps need that uname (for instance) doesn't need? AFAIK ps isn't interactive and doesn't read anything from stdin. Seems like a bug to me...even if it has been that way for more than 10 years.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2011 12:26 AM
тАО03-02-2011 12:26 AM
Re: ps: don't know which terminal to select
That's not what I was asking. What output does it produce? If there is no controlling terminal, are you happy with empty output?
Are you happy with the current shell and ps itself?
>But that patch mentioned nothing about cron.
The code change looks at the controlling terminal for the process and there is none.
>via cron, on 11.23 consistently is causing errors.
Yes, that is a consequence of the bug fix.
>Bill: I don't understand why ps would ever care about anything except stdout and stderr.
Did you read the man page:
(none) Select those processes associated with the current terminal.
You could say, if no current terminal, there is nothing to display.
>So what does ps need?
Something to select which processes to start displaying.
This only happens if you don't provide ps(1) any options.