LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-25-2013, 12:57 AM   #1
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Rep: Reputation: 1
w command from field


hi guys
i have a simple question about w command output .

USER TTY FROM LOGIN@ IDLE
user1 pts/0 x.x.x.x 08:34 25.00s
root pts/1 x.x.x.x 08:58 0.00s
user2 pts/3 x-y-z-x.sta 08:58 0.00s

what does x-y-z-x.sta mean in from field ???
why th ip address of user2 is like that ??? x-y-z-x.sta instead of x.x.x.x ??????

thx in advance
 
Old 08-25-2013, 01:47 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
Quote:
Originally Posted by mmhs View Post
hi guys
i have a simple question about w command output .

USER TTY FROM LOGIN@ IDLE
user1 pts/0 x.x.x.x 08:34 25.00s
root pts/1 x.x.x.x 08:58 0.00s
user2 pts/3 x-y-z-x.sta 08:58 0.00s

what does x-y-z-x.sta mean in from field ???
why th ip address of user2 is like that ??? x-y-z-x.sta instead of x.x.x.x ??????

thx in advance
User2 is logged in from a different location.
 
Old 08-25-2013, 02:03 AM   #3
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1

thx man but my question is different . x.x.x.x is a sample of ip address . my question is why user2 ip address is like x-y-y-z.sta . why - is used instead of . in ip address and what is .sta at the end of ip address ??

Last edited by mmhs; 08-25-2013 at 02:06 AM.
 
Old 08-25-2013, 02:14 AM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
That comes from the reverse address lookup. Usually it will be a string based on the IP address and the ISP of origin, sometimes other identifiers, but the format is at the discretion of the system that answers the lookup. Those that show only the dotted IP address usually originate within the local network in my experience.
 
Old 08-25-2013, 04:31 AM   #5
mmhs
Member
 
Registered: Oct 2010
Posts: 99

Original Poster
Rep: Reputation: 1
I don't agree with your opinion about dotted ip address!!

Quote:
Originally Posted by astrogeek View Post
. Those that show only the dotted IP address usually originate within the local network in my experience.
that was the first time i see that in w command output however every time i connected to server remotely.

my question is still remains !! why user2 ip address was like that and what is the meaning of .sta at the end of ip address ?? !
 
Old 08-25-2013, 04:42 AM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

Rep: Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997Reputation: 1997
It was not my opinion, it was in my experience, so there is nothing to not agree with.

From man w

Quote:
The following entries are displayed for each user: login name, the tty name, the remote host, login
time, idle time, JCPU, PCPU, and the command line of their current process.
That does not say remote IP address, it says remote host, which it gets by reverse lookup of IP address, or the IP address if there is no lookup response.

So while our experience with whether we see IP addresses or host strings may be different, nonetheless, that is what that field is.

Last edited by astrogeek; 08-25-2013 at 04:46 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I extract the pid field from ps aux command RajRed Linux - Newbie 7 12-09-2013 01:43 PM
[SOLVED] last command does not show more than 8 characters in username field roopakl Linux - Newbie 2 10-26-2012 02:52 AM
Can I execute a shell command and put the result in command field? fran4tw Linux - General 9 08-08-2011 09:27 PM
command to print the last field dsids Linux - Software 3 12-29-2010 10:03 AM
'Command' field in Gnome launchers Comreak Linux - Software 7 06-05-2005 02:25 AM


All times are GMT -5. The time now is 11:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration