- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- who -Rm in dtterm fails
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
04-22-2003 10:38 AM
04-22-2003 10:38 AM
it works.
however if I do it in a dtterm it I get nothing back.
any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 10:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 10:42 AM
04-22-2003 10:42 AM
Re: who -Rm in dtterm fails
just get the prompt back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 10:42 AM
04-22-2003 10:42 AM
Re: who -Rm in dtterm fails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 10:45 AM
04-22-2003 10:45 AM
Re: who -Rm in dtterm fails
last -R$ last -R | grep `logname` | grep in$ | sed -n '1p'
the display you're trying this on.... is it a terminal attached directly to the server?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 10:48 AM
04-22-2003 10:48 AM
Re: who -Rm in dtterm fails
ignore the first last R$.... copied and pasted too much
should just be
last -R | grep `logname` | grep in$ | sed -n '1p'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 10:50 AM
04-22-2003 10:50 AM
Re: who -Rm in dtterm fails
I would guess not, so check your TERM variable. That is a possible culprit.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 10:53 AM
04-22-2003 10:53 AM
Re: who -Rm in dtterm fails
who -R tries to do name lookups.
So if you have a LOT of connections that are NOT listed in DNS or cannot be resolved by the method defined in nsswitch.conf, then you'll get a 30 second delay for EACH lookup failure.
This of course can add up to quite a few minutes of "no response". This may appear as a no response or a hang.
Let it run it's course to see if you EVER get a response.
Also a corrupt /etc/utmp could cause this, but it should also cause other who switches to fail as well.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 11:50 AM
04-22-2003 11:50 AM
Re: who -Rm in dtterm fails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 12:21 PM
04-22-2003 12:21 PM
Re: who -Rm in dtterm fails
this was my problem.
in a particular users .profile I do this
greet()
{
set -- $(who -Rm)
Machine=${6#\(}
Machine=${Machine%\)}
nslookup $Machine | grep Address | cut -f2 -d":" | read IP
..
.
.
}
it works on all the boxes over 90 of them.
on 3 others I had to modify the who -Rm to
who -uT
greet()
{
Machine=$(who -uT | awk '{print $9}')
nslookup $Machine | grep Address | cut -f2 -d":" | read IP
NAME=$(who -uT | awk '{print $1}')
.
.
.
}
not sure why this is happening on those boxes.
maybe I'll replace the /etc/umtp this weekend and check again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2003 12:24 PM
04-22-2003 12:24 PM
Re: who -Rm in dtterm fails
put this in your users .profile
greet()
{
set -- $(who -Rm)
Machine=${6#\(}
Machine=${Machine%\)}
nslookup $Machine | grep Address | cut -f2 -d":" | read IP
NAME=$(who -Rm | awk '{print $1}')
grep ${NAME} /etc/passwd|awk -F: '{print $5}'|awk '{print $1}'|read Name
HOUR=$(date +%H)
if [ $HOUR -le 12 ] && [ $HOUR -ge 0 ]
then
greet=Morning
elif [ $HOUR -gt 12 ] && [ $HOUR -lt 18 ]
then
greet=Afternoon
else
greet=Evening
fi
if mail -e
then
Mail=$(echo " You've got mail")
else
Mail=$(echo " sorry no mail at this time")
fi
printf "\n--------------------------------------------------------"
printf "------------------------\n"
printf "\n\t\tGood $greet, $Name,\t$Mail\n\n"
printf "\t\tYou logged in from:\n"
printf "\t\t\tIP address\t: $IP\n"
printf "\t\t\tDNS name\t: $Machine\n\n"
printf "\n\t\tToday is\t: `date +%A`\n"
printf "\t\tDate is\t\t: `date +%D`\n"
printf "\t\tTime is\t\t: `date +%H:%M`\n\n"
printf "\n\t\tYour Display is exported as ${IP}:0.0\n\n"
printf "\t\tYour terminal type is: `echo $TERM`\n"
printf "\n--------------------------------------------------------"
printf "------------------------\n"
export DISPLAY=${IP}:0.0
}
# don't show this banner when youhave jobs running from cron or other processes.
if [[ -t 0 && -t 1 ]]
then
greet
fi
enjoy
Donny