Comparing installed software.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Comparing installed software.
# 1  
Old 08-31-2008
Comparing installed software.

I have some 30 AIX servers and I want their software packages to be consistent. AIX provides a command to list out all pertinent information on a software package in a colon separate list - I grab this through ssh and collect in a temp directory server_name.log.

Now, I'm stuck. I can create a list of all unique packages but how do I traverse through each server list to see whether the sofware is installed?

The example below may help explain my dilema.



File 1

awk:1.1
sed:3.2
ssh:4.1.2

File 2
something:1.0.1
awk:1.1
sed:3.2

File 3

something:1.0.1
awk:1.1
bgp:1.0
sed:3.2
# 2  
Old 08-31-2008
Do you have a master list of what software should be installed?

You might want to use Perl or Awk to read the versions into an array (Perh hash) and then in the end print missing packages (array keys) and wrong versions (key values).
# 3  
Old 09-01-2008
Ugly but it works.

# I used ssh server1 lslpp -Lc > /tmp/lslpp_files/server1.log to create
# the log files. I then did a cat of all the log files sorting out the unique
# cat /tmp/lslpp_files/*log | cut -d":" -f1 | sort -u

#!/usr/bin/perl
@host=(server1, server2, server3);

for $host (@host) {
open(MYINPUTFILE, "</tmp/lslpp_files/$host.log");
my (@lines) = <MYINPUTFILE>;
foreach $line (@lines)
{
chomp;
next if /^#/;
( $PackageName, $Fileset, $Level, $State, $PTFId, $FixState, $Type, $Description, $DestinationDir, $Uninstaller, $MessageCatalog, $MessageSet, $MessageNumber, $Parent, $Automatic, $EFIXLocked, $InstallPath, $BuildDate ) = split ( /:/, $line);

#print "$host -- $Fileset -- $Level\n";
$HoH{$host}{$Fileset} = $Level;
}
close(MYINPUTFILE);
}
#
# compare file
#
open(COMPFILE, "</tmp/lslpp_files.final");
my (@complines) = <COMPFILE>;

#
# print header
#
print "fileset:server1:server2:server3\n";
foreach $compline (@complines)
{
( $Filset, $Lvl ) = split ( /:/, $compline);
print "$Filset";
for $host (@host) {
print ":$HoH{$host}{$Filset}";
}
print "\n";
}
close(COMPFILE);
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Is it possible access software installed on one partition from another

Hello Team my scenario is like i have 2 partitions on server. /apps and /home and i am trying to install my software in /apps partition.intstallation is successful but when i am trying to open something in that its showing blank screen. now if i install that software in /home it works... (2 Replies)
Discussion started by: lalgourav1983
2 Replies

2. UNIX for Dummies Questions & Answers

Command to see what software installed on linux server

I am using red hat linux server. I need to know what softwares installed on that server. What command can i use to get this list? Any help is highly appreciated. (2 Replies)
Discussion started by: govindts
2 Replies

3. Solaris

Which Solaris 10 software group is installed?

Hey Forumers- I know how to tell which update of Solaris 10 is installed on my systems (/etc/release) but how can I determine which software group is installed? reduced network support software group (SUNWCrnet) core system support software group (SUNWCreq) end user system support... (2 Replies)
Discussion started by: bluescreen
2 Replies

4. UNIX for Dummies Questions & Answers

compiled software installed correctly?

Greetings all, first time poster. I have always had an interest in Unix and so decided to try and learn some on my own. I have learned a great deal by just lurking, so for those of you who patiently share your knowledge-thank you! I am in the process of compiling and installing some... (3 Replies)
Discussion started by: RobertSubnet
3 Replies

5. Programming

How To find if Specific Software is installed ?

Hi all, I have developed an application in linux that uses MySQL and unixODBC. Now I am making a small installer for this application that configures environment for this application. What I need is the way to check if MySQL and unixODBC is installed on the system before I start installing my... (3 Replies)
Discussion started by: noble_curious
3 Replies

6. UNIX for Advanced & Expert Users

listing installed software

hi,:) In redhat linux whats the command to list all the installed s/w. cheers RRK (2 Replies)
Discussion started by: ravi raj kumar
2 Replies

7. UNIX for Advanced & Expert Users

Listing all Software and Tools installed

Hi, In Unix, how do we know, which software and tools are installed? Is there any command or info file available for the same? Regards, (7 Replies)
Discussion started by: hasnain
7 Replies

8. UNIX for Dummies Questions & Answers

Installed Software

Pls guys, what command do i use to dispaly the Disk size and Ram Size my system? thanks (1 Reply)
Discussion started by: tt1ect
1 Replies

9. UNIX for Dummies Questions & Answers

Installed software

I am a complete novice/dumbo with Unix. How can I ascertain what software is installed on a unix system? Any help is much appreciated. (3 Replies)
Discussion started by: wakeley
3 Replies

10. UNIX for Dummies Questions & Answers

Knowing installed software versions

Hello, Is there any command or something to know the versions of the softwares installed ? Similar to the registry in Windows, is there anything in Unix ...? We are shifting our server to other one ... so we need to install the same versions on other server also .. Please advice, ... (3 Replies)
Discussion started by: Jayathirtha
3 Replies
Login or Register to Ask a Question