Highlighted
Absent Member.
Absent Member.
925 views

DXCMD command to set polling time from command line


Hi all!
Hope this is the right section of the forum for this issue.

I'm trying to write a batch file that needs to change the polling time
of a driver and set it to null.

The command should do the same thing you can do manually by opening the
iManager, selecting the driver properties and erasing the polling time
and then, after doing some other things, setting it back to 5:30 am.

Can anyone help me?

Thanks a lot in advance!


--
lmazziotti
------------------------------------------------------------------------
lmazziotti's Profile: https://forums.netiq.com/member.php?userid=9745
View this thread: https://forums.netiq.com/showthread.php?t=55074

Labels (1)
0 Likes
10 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: DXCMD command to set polling time from command line

On 1/4/2016 9:14 AM, lmazziotti wrote:
>
> Hi all!
> Hope this is the right section of the forum for this issue.
>
> I'm trying to write a batch file that needs to change the polling time
> of a driver and set it to null.
>
> The command should do the same thing you can do manually by opening the
> iManager, selecting the driver properties and erasing the polling time
> and then, after doing some other things, setting it back to 5:30 am.


Do you mean a Job? Or do you mean something like the Publisher
heartbeat value?

For attributes on a driver, use LDAP. Some data is in a single attr
(Cannot think of an example of a polling setting) some is buried in XML
in a text blob attribute. You probably need to be more specific?

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: DXCMD command to set polling time from command line


Hi geoffc,
thanks for replying me.

I mean something like the pubblisher heartbeat value.

More precisely...
I have this JDBC driver that contains all the managers of the employees.
When an employee changes his manager the administrator of the system
modifies the row in the database but sometimes this change is not
imported by the driver in the IAM console.
So what I need is to implement a batch file that weekly forces this
changes to get imported.
The steps to do so are:
-stop the driver (i can do this via dxcmd command)
-set to null the polling time <---------------------------------------
DON'T KNOW HOW
-delete the .dib file
-start the driver
-wait for all the changes to get imported by the driver
-stop the driver
-set to 5:30 am the polling time <---------------------------------
DON'T KNOW HOW
-start the driver

Hope I was clear enough.

Thank you!


--
lmazziotti
------------------------------------------------------------------------
lmazziotti's Profile: https://forums.netiq.com/member.php?userid=9745
View this thread: https://forums.netiq.com/showthread.php?t=55074

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: DXCMD command to set polling time from command line

On 1/7/2016 9:24 AM, lmazziotti wrote:
>
> Hi geoffc,
> thanks for replying me.
>
> I mean something like the pubblisher heartbeat value.
>
> More precisely...
> I have this JDBC driver that contains all the managers of the employees.
> When an employee changes his manager the administrator of the system
> modifies the row in the database but sometimes this change is not
> imported by the driver in the IAM console.
> So what I need is to implement a batch file that weekly forces this
> changes to get imported.
> The steps to do so are:
> -stop the driver (i can do this via dxcmd command)
> -set to null the polling time <---------------------------------------
> DON'T KNOW HOW
> -delete the .dib file
> -start the driver
> -wait for all the changes to get imported by the driver


Do you want all objects to resync or just the one user?

If all you want is a resync, you could submit (via dxcmd) a query XML as
a 'command' that returns an <instance> document for every user (or just
the ones you care about, make your <query> doc be specific to your
needs) and that will cause a resync. Your current plan does not sound
very good to me, at the moment.


> -stop the driver
> -set to 5:30 am the polling time <---------------------------------
> DON'T KNOW HOW
> -start the driver
>
> Hope I was clear enough.
>
> Thank you!
>
>


0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: DXCMD command to set polling time from command line

On Thu, 07 Jan 2016 14:24:01 +0000, lmazziotti wrote:

> I have this JDBC driver that contains all the managers of the employees.
> When an employee changes his manager the administrator of the system
> modifies the row in the database but sometimes this change is not
> imported by the driver in the IAM console.


Personally, I'd work on identifying and fixing that problem.


> So what I need is to
> implement a batch file that weekly forces this changes to get imported.


Forcing a complete resync on a weekly basis may be a workaround for the
problem, but it's a poor solution to actually fixing it.


--
--------------------------------------------------------------------------
David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.microfocus.com

Please post questions in the forums. No support provided via email.
If you find this post helpful, please click on the star below.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: DXCMD command to set polling time from command line


lmazziotti;263942 Wrote:
> Hi geoffc,
> thanks for replying me.
>
> I mean something like the pubblisher heartbeat value.
>
> More precisely...
> I have this JDBC driver that contains all the managers of the employees.
> When an employee changes his manager the administrator of the system
> modifies the row in the database but sometimes this change is not
> imported by the driver in the IAM console.
> So what I need is to implement a batch file that weekly forces this
> changes to get imported.
> The steps to do so are:
> -stop the driver (i can do this via dxcmd command)
> -set to null the polling time <---------------------------------------
> DON'T KNOW HOW
> -delete the .dib file
> -start the driver
> -wait for all the changes to get imported by the driver
> -stop the driver
> -set to 5:30 am the polling time <---------------------------------
> DON'T KNOW HOW
> -start the driver
>
> Hope I was clear enough.
>
> Thank you!


The workaround would be to have a stop driver job, then a start driver
job. In between of those just remove the jdbs driver cache files (if you
are running triggerless).
So stop driver with job @ sometime
Have cron (if linux, on windows use some sort of scheduler) run a script
to remove the .lg and .db files for the driver
Have a start job to launch the driver again.
No need to fiddle with polling 🙂

Its ugly though. Another option is to make sure the driver doesn't store
any assocs on the users objects, then you will basically do a full
resync for every poll (even uglier though)...

br
/anders


--
abergvall
------------------------------------------------------------------------
abergvall's Profile: https://forums.netiq.com/member.php?userid=278
View this thread: https://forums.netiq.com/showthread.php?t=55074

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: DXCMD command to set polling time from command line

abergvall wrote:

> The workaround would be to have a stop driver job, then a start driver
> job. In between of those just remove the jdbs driver cache files (if you
> are running triggerless).
> So stop driver with job @ sometime
> Have cron (if linux, on windows use some sort of scheduler) run a script
> to remove the .lg and .db files for the driver
> Have a start job to launch the driver again.
> No need to fiddle with polling 🙂


this shoudl work, I'd avoid jobs and do it allfrom a single cron script calling
dxcmd, though, since that keeps it all in one place and you can do error
checking between steps. Instead of deleting the cache db files directly, you
can also disable and reenable the driver, which makes use of IDM's internal
mechanism (vs. file system operations):

1. stop the driver
2. disable the driver (this removes the cache db)
3. enable the driver
4. start the driver

> Another option is to make sure the driver doesn't store
> any assocs on the users objects, then you will basically do a full
> resync for every poll (even uglier though)...


Are you sure? I would expect the cache DB to still do only hold a delta of
what's changed on the target DB and generate events for those objects, not for
the whole DB/table as required for a full resync. Still talking triggerless, of
course.

______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: DXCMD command to set polling time from command line


lhaeger;264028 Wrote:
> abergvall wrote:
>
> > The workaround would be to have a stop driver job, then a start

> driver
> > job. In between of those just remove the jdbs driver cache files (if

> you
> > are running triggerless).
> > So stop driver with job @ sometime
> > Have cron (if linux, on windows use some sort of scheduler) run a

> script
> > to remove the .lg and .db files for the driver
> > Have a start job to launch the driver again.
> > No need to fiddle with polling 🙂

>
> this shoudl work, I'd avoid jobs and do it allfrom a single cron script
> calling
> dxcmd, though, since that keeps it all in one place and you can do
> error
> checking between steps. Instead of deleting the cache db files directly,
> you
> can also disable and reenable the driver, which makes use of IDM's
> internal
> mechanism (vs. file system operations):
>
> 1. stop the driver
> 2. disable the driver (this removes the cache db)
> 3. enable the driver
> 4. start the driver
>
> > Another option is to make sure the driver doesn't store
> > any assocs on the users objects, then you will basically do a full
> > resync for every poll (even uglier though)...

>
> Are you sure? I would expect the cache DB to still do only hold a delta
> of
> what's changed on the target DB and generate events for those objects,
> not for
> the whole DB/table as required for a full resync. Still talking
> triggerless, of
> course.


Think I did it with "on startup resync all entries" on the properties
for the driver - that actually then makes above just a stop driver -
start driver thing 🙂


--
abergvall
------------------------------------------------------------------------
abergvall's Profile: https://forums.netiq.com/member.php?userid=278
View this thread: https://forums.netiq.com/showthread.php?t=55074

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: DXCMD command to set polling time from command line

> Think I did it with "on startup resync all entries" on the properties
> for the driver - that actually then makes above just a stop driver -
> start driver thing 🙂


I think that applies after a change from Disabled to Manual/Auto. So
you would have to make that change (use DXCMD if you like in a script)
then restart, not just a simple restart.


0 Likes
Absent Member.
Absent Member.

Re: DXCMD command to set polling time from command line


abergvall;264023 Wrote:
> The workaround would be to have a stop driver job, then a start driver
> job. In between of those just remove the jdbs driver cache files (if you
> are running triggerless).
> So stop driver with job @ sometime
> Have cron (if linux, on windows use some sort of scheduler) run a script
> to remove the .lg and .db files for the driver
> Have a start job to launch the driver again.
> No need to fiddle with polling 🙂
>
> Its ugly though. Another option is to make sure the driver doesn't store
> any assocs on the users objects, then you will basically do a full
> resync for every poll (even uglier though)...
>
> br
> /anders


I have to do exactly what you write.
Unfortunately i have to deal also with the polling time because if it is
set as default to a time, if i do not set the polling time to null (or
blank) the driver will not start analyzing data immediately but it will
wait for that polling time.


--
lmazziotti
------------------------------------------------------------------------
lmazziotti's Profile: https://forums.netiq.com/member.php?userid=9745
View this thread: https://forums.netiq.com/showthread.php?t=55074

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: DXCMD command to set polling time from command line

lmazziotti;2420439 wrote:
abergvall;264023 Wrote:
I have to do exactly what you write.
Unfortunately i have to deal also with the polling time because if it is
set as default to a time, if i do not set the polling time to null (or
blank) the driver will not start analyzing data immediately but it will
wait for that polling time.


Hi lmazziotti,
DXCMD has parameter -resyncdriver <driver dn> <minimum time for resync(dd/mm/yyyy hh:mm AM/PM) >
Jim, thank you that you put all info together 🙂
http://ldapwiki.willeke.com/wiki/Dxcmd

Configuration:
-user <user name>
-host <name or IP address>
-password <user password>
-port <port number>
-cert <X.509 DER certificate filename>
-dnform <slash|qualified-slash|dot|qualified-dot|ldap> (force dn form)
-version <n.n[.n[.n]]> (force engine version for testing)
-nossl (use clear socket for LDAP)
-keystore <keystore path and filename> (for LDAP SSL)
-storepass <keystore password> (for LDAP SSL)
-q (quiet mode)
-v (verbose mode)
-s (write result to stdout)
-? (show this message)
-help (show this message)

Actions:
-start <driver dn>
-stop <driver dn>
-getstate <driver dn>
-getstartoption <driver dn>
-setstartoption <driver dn> <disabled|manual|auto> <resync|noresync>
-getcachelimit <driver dn>
-setcachelimit <driver dn> <0 or positive integer>
-migrateapp <driver dn> <filename>
-setshimpassword <driver dn> <password>
-clearshimpassword <driver dn>
-setremoteloaderpassword <driver dn> <password>
-clearremoteloaderpassword <driver dn>
-sendcommand <driver dn> <input filename> <output filename>
-sendevent <driver dn> <input filename> <output filename>
-queueevent <driver dn> <input filename>
-setlogevents <dn> <integer ...>
-clearlogevents <dn>
-setdriverset <driver set dn>
-cleardriverset
-getversion
-initdriverobject <dn>
-setnamedpassword <driver, driverset or job dn> <name> <password> [description]
-clearnamedpassword <driver, driverset or job dn> <name>
-clearallnamedpasswords <driver or job dn>
-getdriverstats <driver dn> <output filename>
-resetdriverstats <driver dn>
-startjob <job dn>
-abortjob <job dn>
-getjobrunningstate <job dn>
-getjobenabledstate <job dn>
-getjobnextruntime <job dn>
-updatejob <job dn>
-getcachetransactions <driver dn> <position token> <transaction count> <output filename>
-resyncdriver <driver dn> <minimum time for resync(dd/mm/yyyy hh:mm AM/PM) >


Alex
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.