Operating System - HP-UX
1748195 Members
4500 Online
108759 Solutions
New Discussion юеВ

Re: [ Is it possible to get swagent lock ]

 
madhavabk
Regular Advisor

[ Is it possible to get swagent lock ]

Hi all,
Thanks in advance.

Is there any api or changes to be done to some files to gain the control of the swagent lock.

I will expain below the scenario:-

I will be executing swinstall command with some delay in one of my applications. Mean while ( when my application is in delay) if we start with swinstall in another terminal then my application fails to do its job. Hence is there any way to gain the lock so that my application can release it once it is done with its job.

Thanks
6 REPLIES 6
Florian Heigl (new acc)
Honored Contributor

Re: [ Is it possible to get swagent lock ]

The lock file exists once for each session / depot.

You could try if simply touching it solves Your issue.
yesterday I stood at the edge. Today I'm one step ahead.
madhavabk
Regular Advisor

Re: [ Is it possible to get swagent lock ]

I would like to get some more details.

Govinda_1
Valued Contributor

Re: [ Is it possible to get swagent lock ]

Hi Madhava,

kindly read man pages for swagentd, give a special attention to

Edit /var/adm/sw/defaults ---- > file

max_agents=-1 ===> The maximum number of agents that are permitted to run simultaneously. The value of -1 means that there is no limit.


hope this helps you,

Best regards,
Govinda G.
Govinda_1
Valued Contributor

Re: [ Is it possible to get swagent lock ]

hi Madhava,

u need to edit the file.

#vi /var/adm/sw/defaults

swagentd.max_agents = 1 (-1 is default).



let us if your problem is solved.

regards,
Govind.
madhavabk
Regular Advisor

Re: [ Is it possible to get swagent lock ]

It did not solved my problem.

My application will sleep for considerable amount of time hence any other application can take control of lock.

So i would like to gain the control and do not give it up till my application finishes.

Will there be any api to get the lock once my application starts first installation.

RAC_1
Honored Contributor

Re: [ Is it possible to get swagent lock ]

pre-execute script for swinstall. this will check the status of your other application and if satisfied, then only procee, else not.
There is no substitute to HARDWORK