AFS-Monitor

 view release on metacpan or  search on metacpan

examples/cmdebug  view on Meta::CPAN

218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
  }
  if($lock->{waitStates} & constant("SHARED_LOCK")) {
    print "upgrade_waiting";
  }
}
else {
  print "none_waiting";
}
if ($lock->{exclLocked}) {
  if ($lock->{exclLocked} & constant("WRITE_LOCK")) {
     print ", write_locked";
  }
  if ($lock->{exclLocked} & constant("SHARED_LOCK")) {
     print ", 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

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
          $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}) {
  print "There are read locks held\n";
}
if ($info->{anyWriteLocks}) {
  print "There are write locks held\n";
}
 
if ($info->{currentTrans}) {

pod/udebug.pod  view on Meta::CPAN

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
The 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

7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
   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 )