- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /dev/ttyXX entries and mywho
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
Forums
Discussions
Discussions
Discussions
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
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
12-01-2003 10:27 PM
12-01-2003 10:27 PM
/dev/ttyXX entries and mywho
stat(/dev/ttyw2) failed: No such file or directory
If I create /dev/ttyw2 as a (hard) link to /dev/pty/ttyw2 then mywho will get past this point and may run to completion or fail with another stat error.
If I fix all the missing links then it will be OK for a while.
I also notice that mywho reports "0.0.0.0" as the IP address for all ttyXX entries but the IP addresses for all pts/ entries are OK.
We use mywho to figure out how to set the DISPLAY variable during login so this is causing a bit of a problem.
I installed patch PHNE_24829 and it made no difference.
What process(es) is/are responsible for managing the /dev/ttyXX entries?
Any ideas?
Regards,
Michael.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 10:53 PM
12-01-2003 10:53 PM
Re: /dev/ttyXX entries and mywho
On the other hand, why do you need this to set your DISPLAY variable on login. This should all be handled by whatever xdmcp login app you are using. If you mean you want to telnet to a random box and have the ip address you logged in from translated to a display variable, do something like this
expr "`who -R | grep $LOGNAME`" : '.*(\(.*\))'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 11:08 PM
12-01-2003 11:08 PM
Re: /dev/ttyXX entries and mywho
I don't think there is a mywho command.
How about using something like
# -- Do trick to set the display in case of remote login
HOST=`who am i -R |awk '{print $NF}' | sed "s/(\(.*\))/\1/"`
if [ "$HOST" != "" ] && [ "$HOST" != ":0" ] && [ "$HOST" != ":0.0" ];
then
if [ "$HOST" = `who am i -R |awk '{print $NF}' | sed "s/(\(.*\))/\1/"` ]
then
HOST=$HOST:0.0
fi
echo " +--<<"
echo " | Remote login detected, setting DISPLAY to $HOST"
echo " +-->>"
DISPLAY=$HOST
export DISPLAY
HTH,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 11:55 PM
12-01-2003 11:55 PM
Re: /dev/ttyXX entries and mywho
However, there is no need to use mywho...just replace the mywho code with:
DISPLAYHOST=$(/usr/bin/who -muR | awk '{print $NF}')
DISPLAY="${DISPLAYHOST%%:0.0}:0.0"
This assumes that the user is telnet'ing direct to the server and going thtough several intermediate boxes.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 11:59 PM
12-01-2003 11:59 PM
Re: /dev/ttyXX entries and mywho
It seems to me that the basic problem is that these /dev/ttyXX entries keep disappearing (or are not being recreated) and I don't know why. Perhaps this behaviour is perfectly normal and whoever wrote mywho made assumptions s/he had no valid reason to make.
If I can't solve the mystery of the disappearing tty entries it looks like `who -R` might be a viable workaround.
Thanks for the assistance so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 06:45 AM
12-02-2003 06:45 AM
Re: /dev/ttyXX entries and mywho
Bill Hassell, sysadmin