Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Barchiesi
OpenLDAP
Commits
da8fa77a
Commit
da8fa77a
authored
6 years ago
by
Howard Chu
Committed by
Quanah Gibson-Mount
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ITS#7770 schema fixup
parent
cdfd5bb9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
servers/slapd/back-mdb/monitor.c
+32
-31
32 additions, 31 deletions
servers/slapd/back-mdb/monitor.c
with
32 additions
and
31 deletions
servers/slapd/back-mdb/monitor.c
+
32
−
31
View file @
da8fa77a
...
@@ -42,11 +42,11 @@ mdb_monitor_idx_entry_add(
...
@@ -42,11 +42,11 @@ mdb_monitor_idx_entry_add(
static
AttributeDescription
*
ad_olmDbNotIndexed
;
static
AttributeDescription
*
ad_olmDbNotIndexed
;
#endif
/* MDB_MONITOR_IDX */
#endif
/* MDB_MONITOR_IDX */
static
AttributeDescription
*
ad_olm
Db
PagesMax
,
static
AttributeDescription
*
ad_olm
MDB
PagesMax
,
*
ad_olm
Db
PagesUsed
,
*
ad_olm
Db
PagesFree
;
*
ad_olm
MDB
PagesUsed
,
*
ad_olm
MDB
PagesFree
;
static
AttributeDescription
*
ad_olm
Db
ReadersMax
,
static
AttributeDescription
*
ad_olm
MDB
ReadersMax
,
*
ad_olm
Db
ReadersUsed
;
*
ad_olm
MDB
ReadersUsed
;
/*
/*
* NOTE: there's some confusion in monitor OID arc;
* NOTE: there's some confusion in monitor OID arc;
* by now, let's consider:
* by now, let's consider:
...
@@ -93,45 +93,45 @@ static struct {
...
@@ -93,45 +93,45 @@ static struct {
&
ad_olmDbNotIndexed
},
&
ad_olmDbNotIndexed
},
#endif
/* MDB_MONITOR_IDX */
#endif
/* MDB_MONITOR_IDX */
{
"( olm
Database
Attributes:
3
"
{
"( olm
MDB
Attributes:
1
"
"NAME ( 'olm
Db
PagesMax' ) "
"NAME ( 'olm
MDB
PagesMax' ) "
"DESC 'Maximum number of pages' "
"DESC 'Maximum number of pages' "
"SUP monitorCounter "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"NO-USER-MODIFICATION "
"USAGE dSAOperation )"
,
"USAGE dSAOperation )"
,
&
ad_olm
Db
PagesMax
},
&
ad_olm
MDB
PagesMax
},
{
"( olm
Database
Attributes:
4
"
{
"( olm
MDB
Attributes:
2
"
"NAME ( 'olm
Db
PagesUsed' ) "
"NAME ( 'olm
MDB
PagesUsed' ) "
"DESC 'Number of pages in use' "
"DESC 'Number of pages in use' "
"SUP monitorCounter "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"NO-USER-MODIFICATION "
"USAGE dSAOperation )"
,
"USAGE dSAOperation )"
,
&
ad_olm
Db
PagesUsed
},
&
ad_olm
MDB
PagesUsed
},
{
"( olm
Database
Attributes:
5
"
{
"( olm
MDB
Attributes:
3
"
"NAME ( 'olm
Db
PagesFree' ) "
"NAME ( 'olm
MDB
PagesFree' ) "
"DESC 'Number of free pages' "
"DESC 'Number of free pages' "
"SUP monitorCounter "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"NO-USER-MODIFICATION "
"USAGE dSAOperation )"
,
"USAGE dSAOperation )"
,
&
ad_olm
Db
PagesFree
},
&
ad_olm
MDB
PagesFree
},
{
"( olm
Database
Attributes:
6
"
{
"( olm
MDB
Attributes:
4
"
"NAME ( 'olm
Db
ReadersMax' ) "
"NAME ( 'olm
MDB
ReadersMax' ) "
"DESC 'Maximum number of readers' "
"DESC 'Maximum number of readers' "
"SUP monitorCounter "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"NO-USER-MODIFICATION "
"USAGE dSAOperation )"
,
"USAGE dSAOperation )"
,
&
ad_olm
Db
ReadersMax
},
&
ad_olm
MDB
ReadersMax
},
{
"( olm
Database
Attributes:
7
"
{
"( olm
MDB
Attributes:
5
"
"NAME ( 'olm
Db
ReadersUsed' ) "
"NAME ( 'olm
MDB
ReadersUsed' ) "
"DESC 'Number of readers in use' "
"DESC 'Number of readers in use' "
"SUP monitorCounter "
"SUP monitorCounter "
"NO-USER-MODIFICATION "
"NO-USER-MODIFICATION "
"USAGE dSAOperation )"
,
"USAGE dSAOperation )"
,
&
ad_olm
Db
ReadersUsed
},
&
ad_olm
MDB
ReadersUsed
},
{
NULL
}
{
NULL
}
};
};
...
@@ -149,8 +149,8 @@ static struct {
...
@@ -149,8 +149,8 @@ static struct {
#ifdef MDB_MONITOR_IDX
#ifdef MDB_MONITOR_IDX
"$ olmDbNotIndexed "
"$ olmDbNotIndexed "
#endif
/* MDB_MONITOR_IDX */
#endif
/* MDB_MONITOR_IDX */
"$ olm
Db
PagesMax $ olm
Db
PagesUsed $ olm
Db
PagesFree "
"$ olm
MDB
PagesMax $ olm
MDB
PagesUsed $ olm
MDB
PagesFree "
"$ olm
Db
ReadersMax $ olm
Db
ReadersUsed "
"$ olm
MDB
ReadersMax $ olm
MDB
ReadersUsed "
") )"
,
") )"
,
&
oc_olmMDBDatabase
},
&
oc_olmMDBDatabase
},
...
@@ -181,25 +181,25 @@ mdb_monitor_update(
...
@@ -181,25 +181,25 @@ mdb_monitor_update(
mdb_env_stat
(
mdb
->
mi_dbenv
,
&
mst
);
mdb_env_stat
(
mdb
->
mi_dbenv
,
&
mst
);
mdb_env_info
(
mdb
->
mi_dbenv
,
&
mei
);
mdb_env_info
(
mdb
->
mi_dbenv
,
&
mei
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
Db
PagesMax
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
MDB
PagesMax
);
assert
(
a
!=
NULL
);
assert
(
a
!=
NULL
);
bv
.
bv_val
=
buf
;
bv
.
bv_val
=
buf
;
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_mapsize
/
mst
.
ms_psize
);
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_mapsize
/
mst
.
ms_psize
);
ber_bvreplace
(
&
a
->
a_vals
[
0
],
&
bv
);
ber_bvreplace
(
&
a
->
a_vals
[
0
],
&
bv
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
Db
PagesUsed
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
MDB
PagesUsed
);
assert
(
a
!=
NULL
);
assert
(
a
!=
NULL
);
bv
.
bv_val
=
buf
;
bv
.
bv_val
=
buf
;
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_last_pgno
+
1
);
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_last_pgno
+
1
);
ber_bvreplace
(
&
a
->
a_vals
[
0
],
&
bv
);
ber_bvreplace
(
&
a
->
a_vals
[
0
],
&
bv
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
Db
ReadersMax
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
MDB
ReadersMax
);
assert
(
a
!=
NULL
);
assert
(
a
!=
NULL
);
bv
.
bv_val
=
buf
;
bv
.
bv_val
=
buf
;
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_maxreaders
);
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_maxreaders
);
ber_bvreplace
(
&
a
->
a_vals
[
0
],
&
bv
);
ber_bvreplace
(
&
a
->
a_vals
[
0
],
&
bv
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
Db
ReadersUsed
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
MDB
ReadersUsed
);
assert
(
a
!=
NULL
);
assert
(
a
!=
NULL
);
bv
.
bv_val
=
buf
;
bv
.
bv_val
=
buf
;
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_numreaders
);
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
mei
.
me_numreaders
);
...
@@ -219,8 +219,9 @@ mdb_monitor_update(
...
@@ -219,8 +219,9 @@ mdb_monitor_update(
}
}
mdb_cursor_close
(
cursor
);
mdb_cursor_close
(
cursor
);
}
}
mdb_txn_abort
(
txn
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
Db
PagesFree
);
a
=
attr_find
(
e
->
e_attrs
,
ad_olm
MDB
PagesFree
);
assert
(
a
!=
NULL
);
assert
(
a
!=
NULL
);
bv
.
bv_val
=
buf
;
bv
.
bv_val
=
buf
;
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
pages
);
bv
.
bv_len
=
snprintf
(
buf
,
sizeof
(
buf
),
"%lu"
,
pages
);
...
@@ -430,23 +431,23 @@ mdb_monitor_db_open( BackendDB *be )
...
@@ -430,23 +431,23 @@ mdb_monitor_db_open( BackendDB *be )
{
{
struct
berval
bv
=
BER_BVC
(
"0"
);
struct
berval
bv
=
BER_BVC
(
"0"
);
next
->
a_desc
=
ad_olm
Db
PagesMax
;
next
->
a_desc
=
ad_olm
MDB
PagesMax
;
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
next
=
next
->
a_next
;
next
=
next
->
a_next
;
next
->
a_desc
=
ad_olm
Db
PagesUsed
;
next
->
a_desc
=
ad_olm
MDB
PagesUsed
;
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
next
=
next
->
a_next
;
next
=
next
->
a_next
;
next
->
a_desc
=
ad_olm
Db
PagesFree
;
next
->
a_desc
=
ad_olm
MDB
PagesFree
;
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
next
=
next
->
a_next
;
next
=
next
->
a_next
;
next
->
a_desc
=
ad_olm
Db
ReadersMax
;
next
->
a_desc
=
ad_olm
MDB
ReadersMax
;
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
next
=
next
->
a_next
;
next
=
next
->
a_next
;
next
->
a_desc
=
ad_olm
Db
ReadersUsed
;
next
->
a_desc
=
ad_olm
MDB
ReadersUsed
;
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
attr_valadd
(
next
,
&
bv
,
NULL
,
1
);
next
=
next
->
a_next
;
next
=
next
->
a_next
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment