cancel
Showing results for 
Search instead for 
Did you mean: 

command or script

Arun_K
Level 6

Hi ALL,

We have manually offline around 200 clients in NBU using GUI.

Some of my junior employees have made some clients online and now it is vey tough for me to check which are offline clients and date.

 

Can anybody please provide me the command/script to check which clients are in offline state and the online date?

Please it is my humble reuqest.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Twinkle_Sapra
Level 5
Certified

Try this one

 for i in `sudo bpclient -All -L|grep -i "client name"|awk '{print $3}'`;do echo -e `echo $i;sudo bpclient -client $i -L|egrep -i "offline|online at"`|grep -i "yes";done

 

View solution in original post

12 REPLIES 12

Nicolai
Moderator
Moderator
Partner    VIP   
bpclient -All -L  |grep  -e "Client Name:" -e "Offline:"  |sed 'N;s/\n/ /;P;D;'

Arun_K
Level 6

What all it will show nicolai?

Vickie
Level 6

Hi,

It's not possible to get the date from which the client was online, we just get to know wheather a client is online or offline.

Nicolai
Moderator
Moderator
Partner    VIP   

Did you try the command ?

Did it do what you expected ?

Nicolai
Moderator
Moderator
Partner    VIP   

True +1

StefanosM
Level 6
Partner    VIP    Accredited Certified

check the modification time of the config file at ...\netbackup\db\clients\client_name\

if you have not do any other changes, you have a good change to get the time and date you want.

Arun_K
Level 6

sudo ./bpclient -All -L  |grep  -e "Client Name:" -e "Offline:"  |sed 'N;s/\n/ /;P;D;'
Client Name: win23  Offline:    yes
Client Name: win24  Offline: No
Client Name: win25 Offline:       yes
Client Name: win26  Offline:       No

 

I want to have only online = yes. output in the result.A

 

nd want to know at what time these offline will be online.

Arun_K
Level 6

I want output like below of each client which is being offline.

 

Client Name: win23  Offline:   Yes
Online at:  05/18/2013 04:57:44

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

why dont you keep that result in notepad or excle and seperate it as per your requirement.. 

Nicolai gave you best command that compleates 90% of your work.

you just need to sort the things how you want.. 

and there is no way to find the dates about the client offline and online unless no once changed the client config after the ofline or online 

 

Vickie
Level 6
Hi,
 
You may try this command which will give you output like
 
Client Name: win23  Offline:   Yes
 
 ./bpclient -All -L  |grep  -e "Client Name:" -e "Offline:"  |sed 'N;s/\n/ /;P;D;' | grep -i yes
 
Note : As mentioned in earlier post "Its not possible to get the Date or time when the server was online or offline"

Marianne
Level 6
Partner    VIP    Accredited Certified

Twinkle_Sapra
Level 5
Certified

Try this one

 for i in `sudo bpclient -All -L|grep -i "client name"|awk '{print $3}'`;do echo -e `echo $i;sudo bpclient -client $i -L|egrep -i "offline|online at"`|grep -i "yes";done