AFS-Monitor
view release on metacpan or search on metacpan
examples/cmdebug view on Meta::CPAN
218219220221222223224225226227228229230231232233234235236237238239240241
}
if
(
$lock
->{waitStates} & constant(
"SHARED_LOCK"
)) {
"upgrade_waiting"
;
}
}
else
{
"none_waiting"
;
}
if
(
$lock
->{exclLocked}) {
if
(
$lock
->{exclLocked} & constant(
"WRITE_LOCK"
)) {
", write_locked"
;
}
if
(
$lock
->{exclLocked} & constant(
"SHARED_LOCK"
)) {
", upgrade_locked"
;
}
printf
(
"(pid:%d at:%d)"
,
$lock
->{pid_writer},
$lock
->{src_indicator});
}
if
(
$lock
->{readersReading}) {
printf
(
", %d read_locks(pid:%d)"
,
$lock
->{readersReading},
$lock
->{pid_last_reader});
}
if
(
$lock
->{numWaiting}) {
printf
(
", %d waiters"
,
$lock
->{numWaiting});
examples/udebug view on Meta::CPAN
188189190191192193194195196197198199200201202203204205206207208209
$info
->{lowestHost},
$diff
);
$diff
=
$info
->{now} -
$info
->{syncTime};
printf
(
"Sync host %s was set %d secs ago\n"
,
$info
->{syncHost},
$diff
);
}
printf
(
"Sync site's db version is %d.%d\n"
,
$info
->{syncVersion}->{epoch},
$info
->{syncVersion}->{counter});
printf
(
"%d locked pages, %d of them for write\n"
,
$info
->{lockedPages},
$info
->{writeLockedPages});
if
(
$info
->{anyReadLocks}) {
"There are read locks held\n"
;
}
if
(
$info
->{anyWriteLocks}) {
"There are write locks held\n"
;
}
if
(
$info
->{currentTrans}) {
pod/udebug.pod view on Meta::CPAN
215216217218219220221222223224225226227228229230231232233234235236237The
time
(in seconds since the Epoch) that the B<syncHost> (see above) was set.
=item B<syncVersion>
A reference to a hash containing two entries, B<epoch> and B<counter>,
indicating the version number of the database at the synchronization site,
which needs to match the version number of the local databse, indicated
by B<localVersion> (see above).
=item B<lockedPages> and B<writeLockedPages>
Indicates how many VLDB records are currently locked for any operation
or for writing in particular. The values are nonzero if the B<udebug> function
is issued while an operation is in progress.
=item B<anyReadLocks> and B<anyWriteLocks>
These values are true if there are any read or write locks on database records.
=item B<currentTrans> and B<writeTrans>
These values are true if there are any read or write transactions in
src/Monitor.xs view on Meta::CPAN
775677577758775977607761776277637764776577667767776877697770777177727773777477757776
inhostAddr.s_addr = htonl(udebug.syncHost);
hv_store(RETVAL,
"syncHost"
, 8, newSVpv(inet_ntoa(inhostAddr), 0), 0);
hv_store(RETVAL,
"syncTime"
, 8, newSViv(udebug.syncTime), 0);
}
SYNCVERSION = newHV();
hv_store(SYNCVERSION,
"epoch"
, 5, newSViv(udebug.syncVersion.epoch), 0);
hv_store(SYNCVERSION,
"counter"
, 7, newSViv(udebug.syncVersion.counter), 0);
hv_store(RETVAL,
"syncVersion"
, 11, newRV_inc((SV*)SYNCVERSION), 0);
hv_store(RETVAL,
"lockedPages"
, 11, newSViv(udebug.lockedPages), 0);
hv_store(RETVAL,
"writeLockedPages"
, 16, newSViv(udebug.writeLockedPages), 0);
hv_store(RETVAL,
"anyReadLocks"
, 12, newSViv(udebug.anyReadLocks), 0);
hv_store(RETVAL,
"anyWriteLocks"
, 13, newSViv(udebug.anyWriteLocks), 0);
hv_store(RETVAL,
"currentTrans"
, 12, newSViv(udebug.currentTrans), 0);
if
(udebug.currentTrans) {
hv_store(RETVAL,
"writeTrans"
, 10, newSViv(udebug.writeTrans), 0);
SYNCTID = newHV();
hv_store(SYNCTID,
"epoch"
, 5, newSViv(udebug.syncTid.epoch), 0);
( run in 0.411 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )