HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

The USN is not entry specific. The USN counter tracks the USN globally for the entire database.
Configuring the USN plug-in:
USN plug-in is disabled by default. To track the entry changes by USNs, enable the USN plug-in
as follows:
ldapmodify -D "cn=directory manager" -w secret -p 389 -h server.example.com
dn: cn=USN,cn=plugins,cn=config
changetype: modify
replace: nsslapd-pluginEnabled
nsslapd-pluginEnabled: on
After the changes, restart the server to apply the changes.
The USN Plug-in has two modes:
Local mode — In local mode, each backend database has a private USN counter specific to
that backend database. This is the default setting.
Global mode In global mode, the USN counter is global and keeps track of all the changes
made to the entire directory.
The attribute lastusn stores the most recently assigned USN value to an entry in the database.
This value is available by searching the root DSE.
In local mode, when you search for lastusn, per database local USN counter is listed.
ldapsearch -b "" -s base "(objectclass=*)" lastusn
lastusn;example_db1: 1021
lastusn;example_db2: 1517
In global mode, the lastusn attribute shows only the latest shared USN counter.
lastusn: 2538
The configuration parameter nsslapd-entryusn-global controls the mode of the USN plug-in.
By default, the parameter is set to off to use local USN counter. When the parameter is set to on,
a global USN counter is used to track the changes made to the entire directory.
ldapmodify -D "cn=directory manager" -w secret -p 389 -h server.example.com
dn: cn=USN,cn=plugins,cn=config
changetype: modify
replace: nsslapd-entryusn-global
nsslapd-entryusn-global: on
This configuration parameter is effective only when entryusn plug-in is enabled
Import and Replica Initialization:
You can configure the entry USN value of the entries that are imported or initialized by a master.
A configuration parameter nsslapd-entry-import-initval has been introduced for this
purpose.
cn=config
...
nsslapd-entryusn-import-initval: digits | next
If the value is a digit, for example: 123, the entryusn attribute of the imported or replicated
entries will have the value set to 123. If the value is not a digit, for example: next, the entries will
have the last entryusn + 1 from the database before the import or the replica initialization.
116 Creating Directory Entries