1840501 Members
2864 Online
110165 Solutions
New Discussion

collect hostname and IP?

 
Venkat_33
Frequent Advisor

collect hostname and IP?

Hi,

How to collect hostname and IPaddress by processid or pts/ta or username.


11 REPLIES 11
Arunvijai_4
Honored Contributor

Re: collect hostname and IP?

You can use # who -T will tell you IP or Hostname, PID details.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Venkat_33
Frequent Advisor

Re: collect hostname and IP?

I tried,

Output is given below,

assoq - pts/ta Dec 14 23:39 0:14 14472 a1230373p2
it showing

a1230373p2 is the package name how this happening because this username i.eassoq utilzation cpu 100%,

Bharat Katkar
Honored Contributor

Re: collect hostname and IP?

Hi,
# who -R

Does that help you?

Regards,
You need to know a lot to actually know how little you know
Arunvijai_4
Honored Contributor

Re: collect hostname and IP?

Are you using telnet or ssh to connect to your server ? What is application you are running ?
What exactly you want to do ? A script to kill a particular user ? Can you be more specific ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Venkat_33
Frequent Advisor

Re: collect hostname and IP?

Hi Bharath,

its given all the details but what my problem,

The User aqqoq utilization cpu 100%,and find out the Hostname or IP by using who -R cmd by it given output is

aqqoq pts/ta Dec 14 23:39 (a0300112p2)

and
a0300373p2 is the package name..i am so confuse pls anyone clarify to me
Venkat_33
Frequent Advisor

Re: collect hostname and IP?

Hi Bharath,

its given all the details but what my problem,

The User aqqoq utilization cpu 100%,and find out the Hostname or IP by using who -R cmd by it given output is

aqqoq pts/ta Dec 14 23:39 (a0300112p2)

and
a0300112p2 is the package name..i am so confuse pls anyone clarify to me
Bharat Katkar
Honored Contributor

Re: collect hostname and IP?

a0300112p2 is package but for user it's a virtual IP to which he is doing telnet. So for him the host is a0300112p2.

Can you explain what is the scenario and what info you would like to get.

Problem?
Solution expected??

Regards,
You need to know a lot to actually know how little you know
Venkat_33
Frequent Advisor

Re: collect hostname and IP?

Problem is cpu performance is worst today because one of the user utilization cpu 100%

that user is aqqoq

My IT Head want to know hostname and ip of that user aqqoq,then i tried by who -R

it showing hostname a0300112p2 i.ePackage name

How should i find out the hostname and Ipaddress...?pls help out this

AwadheshPandey
Honored Contributor

Re: collect hostname and IP?

Try with #ps -eaf | grep -i aqqoq, this will show PID of process, u can easily kill the process, this is solution of ur problem

Cheers,

Awadhesh
It's kind of fun to do the impossible
Bharat Katkar
Honored Contributor

Re: collect hostname and IP?

HI,
Now there are two things:

1. TO find out which is the user who is hogging CPU (I assume you have done it)
2. TO know from where this person has logged in and his Systems IP.

For that you can use:
# last -R | grep
This command will give you IP address or the hostname (anyone of them should suffice)

Hope that works for you.

Regards,
You need to know a lot to actually know how little you know
Venkat_33
Frequent Advisor

Re: collect hostname and IP?

Thanks a lot...