cancel
Showing results for 
Search instead for 
Did you mean: 

What command will show clients and ip address

Alex_Vasquez
Level 6
I'm thinking this is an easy one, but I'm not able to find the answer. I'm trying to find a NBU command that will show me all my clients and their respective IP addresses. So, who's first?

My guess is either Dave Parker or Chia Tan Beng will triumph. Of course one can never count out Bob Stump... But all forum users are welcome. Thanks!




Alex,
17% more point friendly than the competing brand.
13 REPLIES 13

Dennis_Strom
Level 6
check_coverage will produce three /tmp files and let you know what kind of coverage you have what os and what version of client. It will also tell you the IP address and hostname. I run it monthly. Just....grep YES /tmp/hosts_rpt.lastversion

Message was edited by:
Dennis Strom

Dennis_Strom
Level 6
there is also bpclntcmd -hn
but then you would have to use that in a script

AKopel
Level 6
You could use a combination of this:
1: Use 'bpplclients -alluniquel -l' to dump all clients
2: Parse out just the client names
3: Use 'bpclntcmd -hn' to get the ip addresses and parse them out.

Should be about a 5 line script.

AK

T_N
Level 6
1) Policy -> Summary of all policies -> Clients : highline all clients -> Save to client.txt file,
2) create scripts : bpclntcmd -hn read first line of this file, it'll give you all client IP addresses

Nathan_Kippen
Level 6
Certified
on unix something like ..

for i in `bpplclients -allunique -l | awk '{print $2}';
do
bpclntcmd -hn $i | grep host | awk '{print $1 $2 $3}'
done



untested

zippy
Level 6
nslookup...

dig....

JD

Stumpr2
Level 6
Sorry to let you down Alex, but I'm on bereavement leave.

However a quick look at Nathan's answer looks encouraging.
If I were in the office then I might try testing it for him,

T_N
Level 6
for i in `bpplclients -allunique -l | awk '{print $2}';
do
bpclntcmd -hn $i | grep host | awk '{print $1 $2 $3}'
done


First line is correct but third line is wrong, it should be :

bpclntcmd -hn $i | grep host | awk '{print $1,$3,$5}'


result is: host cdcaw015 155.90.47.37

or

bpclntcmd -hn $i | grep host | awk '{print $3,$5}'

result is : cdcaw015 155.90.47.37

Chia_Tan_Beng
Level 6
Hi Alex,

Sorry, having some projects with tight schedule and didn't have time to login to the forums daily.

Its interesting to learn various methods posted. My opinion is Nathan method need less effort and I tried and tested that on NBU5 environment with slight modification:

#!/bin/ksh
for i in `bpplclients -allunique -l | awk '{print $2}'`;
do
bpclntcmd -hn $i | grep host | awk '{print $2 $5}'
done

Alex_Vasquez
Level 6
No need for apologies. I just wanted to see who'd respond first. And I'm sorry to hear of your bereavement leave, Bob. Truly so...

I tried Chia's modified method and ran into a snag. I ended up getting the info out of Advanced Reporter 'Host Listing'. THank you all, though.

Dennis_Strom
Level 6
have you tried the check_coverage command?

Ankur_Kumar
Level 5
The bpclient -L option can be of some help i believe.


Warmest Regards
Ankur Kumar

Chia_Tan_Beng
Level 6
Oh, I forgotten about the Advance Reporter (It's cool). Thanks for the update and the points.