Software Update reporting script

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Software Update reporting script
# 1  
Old 04-09-2009
Software Update reporting script

I need a script that gets the output of softwareupdate -al on each machine (the list of available updates) and reports how many updates are needed in total by all the machines on the network, and the results to 4 different recipients.

i.e.
total patches required = 12

hostname1 =4 patch(es)
hostname2=3 patch(es)
hostname3=4 patch(es)
hostname4=1 patch(es)
# 2  
Old 04-11-2009
I'm not seeing the -l option in man softwareupdate, but it ran without complaining in my one test (on a machine that needed no updates).

You should be able to grep the lines relating to software updates, then pipe to "wc -l"

Store that in a variable, then write the host name and update count to a file, presumable with an easily parsible delimiter (like "=" for instance).

Push the file to a central mutually accessible location, then cat the files.
From there you can create your report.

The important part is determining the unique character/s you want to grep for on the hosts, before writing the host specific reports. It's pretty easy to determine from the "man" output, and running the command on a few machines that actually need updates.
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Fedora

Newby: How to actually update software?!

Hi All - 1) I work with bigdate for a living, use lots of neat software, SAS, SQL Server, etc. I know how to get my data and such, analyze it, etc... 2) I use UNIX at work (Solaris mostly) and can easily navigate around Unix and get the job done, vi and sas -nodms are about my fav, and some... (6 Replies)
Discussion started by: sas
6 Replies

2. SuSE

update package/software questions

Hi, In SUSE linux, it looks like that I can update the package using YAST or install the package from source. So, which way works better? Also, if i install the package of new version. Do i need to remove/delete the old version package, or I just need to change my environments and keep the old... (0 Replies)
Discussion started by: jianma
0 Replies
Login or Register to Ask a Question