- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: show IP address
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
07-09-2005 11:49 PM
07-09-2005 11:49 PM
show IP address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 12:40 AM
07-10-2005 12:40 AM
Re: show IP address
to obtain IP address instead of the hostname, is totally dependent on your processing of this information on the "who -R" output.
some construct like this may give you the result you are looking for:
who -R | while read id tty mon day time host
do
h=`echo $host | cut -d"(" -f2 | cut -d")" -f1`
ip=`nslookup $h | grep Address | cut -d: -f2`
echo "${id}\t${tty}\t${mon}\t${day}\t${time}\t${ip}"
done
Hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 01:17 AM
07-10-2005 01:17 AM
Re: show IP address
I can see the ip address of local user login , but can't see the remote user ( by rlogin ), could suggest how to see it ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 02:36 AM
07-10-2005 02:36 AM
Re: show IP address
If DNS resolution is in play, then you will see the host name as resolved by DNS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 12:39 PM
07-10-2005 12:39 PM
Re: show IP address
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 12:56 PM
07-10-2005 12:56 PM
Re: show IP address
Run "who -u" command
Regards
Deepak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 02:06 PM
07-10-2005 02:06 PM
Re: show IP address
normally I use the who -R command to get the IPs
thanks
DP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 06:10 PM
07-10-2005 06:10 PM
Re: show IP address
remsh -l user HostB -n "who -um | awk '{ print $NF }' | xargs getip"
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 10:31 PM
07-10-2005 10:31 PM
Re: show IP address
Above command should provide you required details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2005 10:41 PM
07-10-2005 10:41 PM
Re: show IP address
Bill Hassell, sysadmin