- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- check my ip address instead of my dns name
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
09-18-2007 09:26 AM
09-18-2007 09:26 AM
When I use who -u (or who -R) I get my dns name instead.
thanks, mk
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 09:34 AM
09-18-2007 09:34 AM
Re: check my ip address instead of my dns name
getip $(who -u | awk '{print $NF}')
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 09:41 AM
09-18-2007 09:41 AM
Re: check my ip address instead of my dns name
but I get an error message:
Usage: getip host
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 09:47 AM
09-18-2007 09:47 AM
Re: check my ip address instead of my dns name
What is your EXACT output of who -u?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 09:55 AM
09-18-2007 09:55 AM
Re: check my ip address instead of my dns name
this is the line for who am i -u
moises pts/tk Sep 18 17:55 . 8480 mn_064.national-lumber.com
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 10:01 AM
09-18-2007 10:01 AM
Solutiongetip mn_064.national-lumber.com
Does that work?
Now try,
who -u | awk '{print $NF}'
Does that output mn_064.national-lumber.com?
The problem is probably a result of the illegal "_" character in your hostname. If you play by the DNS rules, "_"'s are not allowed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 10:13 AM
09-18-2007 10:13 AM
Re: check my ip address instead of my dns name
any other sugestion?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 10:17 AM
09-18-2007 10:17 AM
Re: check my ip address instead of my dns name
thanks, mk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 12:14 PM
09-18-2007 12:14 PM
Re: check my ip address instead of my dns name
dy # getip $(who -u | awk '{print $NF}')
Usage: getip host
dy # who -u
root pts/0 Sep 18 17:03 . 1180 alp-l.antinode.org
root console Sep 18 17:04 0:02 2146 system console
dy # who -mu
root pts/0 Sep 18 17:03 . 1180 alp-l.antinode.org
Or, "who am i -u".
dy # getip $(who -mu | awk '{print $NF}')
10.0.0.9
> it didn't work
>
> any other sugestion?
Yes. Say exactly what you did, and,
exactly, what happened when you did it.
Saying "it didn't work" is about as useless
as saying nothing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 07:04 PM
09-18-2007 07:04 PM
Re: check my ip address instead of my dns name
ping `hostname`
where ` is the key in the top left corner of the keyboard. The result will display the ip address.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 09:07 PM
09-18-2007 09:07 PM
Re: check my ip address instead of my dns name
If you used the following you wouldn't have to explain it: :-)
$ ping $(hostname)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2007 09:16 PM
09-18-2007 09:16 PM
Re: check my ip address instead of my dns name
$ nslookup $(hostname)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 02:41 AM
09-19-2007 02:41 AM
Re: check my ip address instead of my dns name
who am i -u
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 02:59 AM
09-19-2007 02:59 AM
Re: check my ip address instead of my dns name
I agree with Dennis, why not just do a nslookup on the hostname. You also can check the /etc/rc.config.d/netconf file or the /etc/hosts.
sp,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 03:12 AM
09-19-2007 03:12 AM
Re: check my ip address instead of my dns name
mk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 03:15 AM
09-19-2007 03:15 AM