- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: who -R
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
10-26-2001 01:41 AM
10-26-2001 01:41 AM
who -R
root ttyp1 (PC@IP1)
system pts/0 (HPSERVER1)
root dtremote (PC@IP1)
system dtremote (PC@IP2)
root pts/1 (HPSERVER1)
my PC address is "PC@IP1" .
what command should i use , to find this address ?
thank you .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 01:49 AM
10-26-2001 01:49 AM
Re: who -R
#who -mR
Hope this helps
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 01:50 AM
10-26-2001 01:50 AM
Re: who -R
#who am i
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 01:52 AM
10-26-2001 01:52 AM
Re: who -R
you can try resolving the name into the ip-adress with
nslookup PC@IP1
or cat /etc/hosts | grep PC@IP1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 02:05 AM
10-26-2001 02:05 AM
Re: who -R
who am i -R | awk '{print $6}' | sed 's/[()]//g'
nslookup will find the IP address of the machine, looking in /etc/hosts won't work unless you *don't* use DNS.
More information after more details ;-)
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 02:46 AM
10-26-2001 02:46 AM
Re: who -R
export DISPLAY=`who am i -R | cut -f2 -d'(' | cut -f1 -d')'|cut -f1 -d':'`:0.0
which is the command you need to find your ip.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2001 03:43 AM
10-26-2001 03:43 AM
Re: who -R
Do an nslookup on PC@IP1 to get the
IP address. If you are using DHCP, the
IP address will change whenever you login
to the network.
-raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 01:30 AM
10-29-2001 01:30 AM
Re: who -R
system return : " system pts/0 (HPSERVER1)" or
more informations .
But I need a command to get my dtremote PC's name only to execute a script, i need a system return like :
"root dtremote (PC@IP1)" .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 05:22 AM
10-29-2001 05:22 AM
Re: who -R
You can have the telnet and remote sessions from the #who -R command.
Now you can grep the user tty and the ipaddress from there.
you can then cut the ip-address and then
For example it the tty is pts/ta and the ip is
xx.xx.xx.xx
who -R|grep "pts/ta"|awk -F "(" '{print $2}'|awk -F ")" '{print $1}'
do a
#nslookup
to get the hostname.
Remember the remote machine is a Windows machine,make sure that your dns server has entries for the hostname resolution.
If your network has NT dns server then it is a easy task.Then you can point your Unix machine
to the windows DNS server and modify your /etc/nsswitch.conf file to look into dns for name resolution.
Now your nslookup will give you the NT hostname.
else
you can catch the ip-address.Then do a
ping -a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 06:59 AM
10-29-2001 06:59 AM
Re: who -R
who -R|tr -s " " ""|sed "s/^\([a-z]\{1,8\}\) \([a-z0-9\/]\{1,12\}\) \([A-Za-z]{3\} [0-9]\{2\} [0-9]\{2\}\:[0-9]\{2\}\) \((.*)\)$/\1 \2 \4/"
it will take "who -R" output and return the loginname tty and address:
# who -R
root ttyp1 Oct 29 08:25 (141.123.236.157)
root pts/ta Oct 29 09:31 (vpart2)
# who -R|tr -s " " ""|sed "s/^\([a-z]\{1,8\}\) \([a-z0-9\/]\{1,12\}\) \([A-Za-z]{3\} [0-9]\{2\} [0-9]\{2\}\:[0-9]\{2\}\) \((.*)\)$/\1 \2 \4/"
root ttyp1 (141.123.236.157)
root pts/ta (vpart2)
#
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2001 07:30 AM
10-29-2001 07:30 AM
Re: who -R
#who -mR |cut -c40-61 (this was the columns to get the output I needed, yours may be different)
Hope this gets you closer.
Chris