Operating System - HP-UX
1834022 Members
2367 Online
110063 Solutions
New Discussion

How to get package/application info?

 
Daniel Woo
New Member

How to get package/application info?

Hi all,

I am trying to create a script for maintainenance purpose, my challenge is to figure out what applications are in a specified package, I think I get get it via script, command line or config files. Does anybody know how to do this?

Regards,
Daniel
5 REPLIES 5
Piergiacomo Perini
Trusted Contributor

Re: How to get package/application info?

Hi Daniel,

hope this can be useful:

to see patch (ux) level
show_patches

to check what kind of patch (ux)
swlist â l patch

and comand
what
on core (main) file of application

best regards
pg
Daniel Woo
New Member

Re: How to get package/application info?

Thanks for your help, but I mean to find what applications are in a MC Service Guard Package.
Ralph Grothe
Honored Contributor

Re: How to get package/application info?

Since the logic to start or stop your applications is put in the customer_defined_{run|halt}_cmds() function of the pakages' control scripts you will have to parse these files.
But this is too specific and dependant on the scripting style of the person who supplied this functionality to give any general recommendations how to extract this info.

One can only generally extract where this logic is hidden by parsing the cluster config like that:

# cmviewconf|grep -E 'package (name|(run|halt) script)'
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: How to get package/application info?

Hm, if you are content with identifying the resources a package constitutes you could make the control script word readable (provided they don't contain any passwords that you pass this way to get an application started (e.g. DB startup, but would be bad practice anyway).
Then your maintenance process could simply source it and access the defined resource array variables.

e.g.

$ . /etc/cmcluster/package/package.ctl

IP addresses:

echo ${IP[*]}

Mount Points and LVs:

echo ${LV[*]} ${FS[*]}

etc.


As you can see, this wouldn't require any contrived parsing (which in turn maybe even would require some grammar definition).
Madness, thy name is system administration
Daniel Woo
New Member

Re: How to get package/application info?

I think I can set some limition on the script names, so your solution is engouh in our case.

Thanks!