cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
433
Views
0
Helpful
3
Replies

PSUCli in a crontab

pvignaud
Level 1
Level 1

Hi,

Running LMS 3.1 on a Solaris box.

I try to find a way of running a cron job with a complete download of all devices packages.

But, the command line ask me with questions (CCO and proxy information). Is there a way of using PSUCli.sh script with the download field inside a cron job ?

The install option are Ok, because there's no CCO/proxy questions.

Any ideas are welcomed.

Example :

todk1:/ #/opt/CSCOpx/bin/PSUCli.sh -p cmf -download -dst /opt/psu_download -all

NMSROOT = /data/CSCOpx

directory specified :/opt/psu_download

Proxy Server is configured in CiscoWorks.

If the Proxy Server requires authentication, you must enter Proxy Server Username and Password.

Do you need to enter the Proxy Server Username and Password? (Press 'y' for Yes or 'n' for No)

n

Please specify Cisco.com credentials to connect to Cisco.com

Enter Cisco.com Username: pvignaud

Enter Cisco.com Password:

Loaded VDS Properties..

Number of packages to be downloaded = 2

Downloading packages...

Finished downloading [2] packages to /opt/psu_download/cmf

Thanks.

Patrick Vignaud.

1 Accepted Solution

Accepted Solutions

No, this is not possible since this data is not actually stored in Common Services.

You could wrap the call to PSUCli.sh in an expect script so that you can answer the prompts when asked.

View solution in original post

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

Why not just schedule the download via the GUI under Common Services > Software Center > Schedule Device Download? This allows you to specify everything required, then schedule the download to run automatically.

I've done this but I want to be more granular (cvw, rme, ...) and the idea to have all download/install functions inside a crontab job, is more, administratively reliable.

Like this for the install :

0 3 * * 5 /opt/CSCOpx/bin/PSUCli.sh -p cvw -install -src /opt/psu_download/cvw -all -noprompt > /var/adm/CSCOpx/log/psucli-cvw.log 2>&1

0 4 * * 5 /opt/CSCOpx/bin/PSUCli.sh -p rme -install -src /opt/psu_download/rme -all -noprompt > /var/adm/CSCOpx/log/psucli-rme.log 2>&1

But I would like to specify the download in a same way that the install.

Is there a way for PSUCli.sh to use the CCO login information defined inside common services ?

Thanks.

No, this is not possible since this data is not actually stored in Common Services.

You could wrap the call to PSUCli.sh in an expect script so that you can answer the prompts when asked.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: