- 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
тАО03-02-2011 05:28 AM
тАО03-02-2011 05:28 AM
Re: ps: don't know which terminal to select
No, the script malfunctions only produces the error message "ps: don't know which terminal to select" then will fail entirely and terminate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2011 05:32 AM
тАО03-02-2011 05:32 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-02-2011 08:51 AM
тАО03-02-2011 08:51 AM
Re: ps: don't know which terminal to select
HP provided what I would call a work around. Let me provide a bit more code associated with this issue:
################################
# this function open ssh session
manage_ssh_ps $HOST &
PS_VAL=$!
....
#do some things
...
ps -f | grep $PS_VAL
########################
They recommended I use the "-e" option
When I changed
ps -f
to
ps -ef
The terminal warnings stopped.
The comment I received from HP was:
"...the issue could happen even running from a tty and the session leader process relinquishes or killed. This is the intended behavior".
So, that's pretty much it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-02-2011 08:55 AM
тАО03-02-2011 08:55 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-02-2011 09:28 PM
тАО03-02-2011 09:28 PM
Re: ps: don't know which terminal to select
I should have said, "Would you be happy ..."
>the script malfunctions only produces the
This is not what I'm asking.
First what is the output for AIX and Linux?
And if HP-UX were to change things, would you be happy with outputting lines only for the current shell and ps itself?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2011 05:21 AM
тАО03-03-2011 05:21 AM
Re: ps: don't know which terminal to select
The output from the complete and successful invocation of the script is a cat command against the syslog. This works properly in AIX and Linux.
The problem in HPUX centers around dropping the ssh function in the background within the script, via cron. Then checking it with:
ps -f | grep
I would not expect ps to react with a terminal error. I don't understand why ps has a problem with the terminal.
I've read the man page on both
ps -ef ( causes the error to go away )
and
ps -f ( causes terminal error )
There's nothing in it indicating a terminal error might result.
> And if HP-UX were to change things, would you be happy with outputting lines only for the current shell and ps itself?
Why 1 type of argument creates a terminal error and the other does not seems odd. Sure, one can expect different results but not a failure, imho.
In regards to being happy... well, I've changed to using -ef and the script is working. So, I'm happy. I guess I'll
avoid using the -f option by itself when putting processes in the background
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2011 05:23 AM
тАО03-03-2011 05:23 AM
Re: ps: don't know which terminal to select
Found a work around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2011 10:41 AM
тАО03-03-2011 10:41 AM
Re: ps: don't know which terminal to select
I only care about what you expect ps to produce in a cron job?
What is the EXACT output of ps for Linux or AIX? And what do you do with that output?
>I don't understand why ps has a problem with the terminal.
Because the ps default is to produce output of all processes of the controlling terminal. If none, what should it output, nothing?
- « Previous
-
- 1
- 2
- Next »