view release on metacpan or search on metacpan
LICENSES/COPYING view on Meta::CPAN
121314151617181920212223242526272829303132
The licenses
for
most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free
for
all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge
for
this service
if
you wish), that you receive source code or can get it
in new free programs; and that you know you can
do
these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities
for
you
if
you
distribute copies of the software, or
if
you modify it.
LICENSES/COPYING view on Meta::CPAN
7879808182838485868788899091929394959697Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on
each
copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along
with
the Program.
You may charge a fee
for
the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange
for
a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
LICENSES/COPYING view on Meta::CPAN
146147148149150151152153154155156157158159160161162163164165
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used
for
software interchange; or,
c) Accompany it
with
the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only
for
noncommercial distribution and only
if
you
received the program in object code or executable form
with
such
an offer, in accord
with
Subsection b above.)
The source code
for
a work means the preferred form of the work
for
making modifications to it. For an executable work, complete source
code means all the source code
for
all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form)
with
the major components (compiler, kernel, and so on) of the
operating
system
on which the executable runs,
unless
that component
itself accompanies the executable.
LICENSES/IBM-LICENSE view on Meta::CPAN
1601611621631641651661671681691701711721731741751761771781791801811825. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
PROVIDED ON AN
"AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
responsible
for
determining the appropriateness of using and
distributing the Program and assumes all risks associated
with
its
exercise of rights under this Agreement, including but not limited to
the risks and costs of program errors, compliance
with
applicable
laws, damage to or loss of data, programs or equipment, and
unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
examples/rxdebug view on Meta::CPAN
249250251252253254255256257258259260261262263264265266267268269
servers
=>
$servers
,
port
=>
$port
);
parse_results(
$rxdeb
);
}
sub
parse_results {
my
$val
=
shift
;
# if there was an error, print it and then return.
if
(
$AFS::CODE
) {
"Error case: "
,
ref
(
$val
),
"\n"
if
(
defined
(
$val
));
# die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
"Error: AFS::CODE = $AFS::CODE ("
, (
$AFS::CODE
+0),
")\n"
;
return
;
}
# print entire hash to screen
if
(
$showdump
) {
Dumper(
$val
);
examples/rxdebug view on Meta::CPAN
385386387388389390391392393394395396397398399400401402403404405406if
(
exists
$val
->{connections}) {
for
(
my
$i
= 0;
$i
<= $
#{$val->{connections}}; $i++) { # print each connection
"Connection from host "
,
$val
->{connections}->[
$i
]->{host},
", port "
,
$val
->{connections}->[
$i
]->{port},
", "
;
if
(
$val
->{connections}->[
$i
]->{epoch}) {
printf
"Cuid %x/%x"
,
$val
->{connections}->[
$i
]->{epoch},
$val
->{connections}->[
$i
]->{cid};
}
else
{
printf
"cid %x"
,
$val
->{connections}->[
$i
]->{cid};
}
if
(
$val
->{connections}->[
$i
]->{error}) {
", error "
,
$val
->{connections}->[
$i
]->{error};
}
"\n serial $val->{connections}->[$i]->{serial}, "
;
" natMTU $val->{connections}->[$i]->{natMTU}, "
;
if
(
$val
->{connections}->[
$i
]->{flags}) {
"flags"
;
if
(
$val
->{connections}->[
$i
]->{flags} & constant(
"RX_CONN_MAKECALL_WAITING"
)) {
" MAKECALL_WAITING"
;
}
if
(
$val
->{connections}->[
$i
]->{flags} & constant(
"RX_CONN_DESTROY_ME"
)) {
examples/rxdebug view on Meta::CPAN
496497498499500501502503504505506507508509510511512513514515516
"hold, "
;
}
# print call mode
"mode: "
;
if
(
$val
->{connections}->[
$i
]->{callMode}->[
$j
] == constant(
"RX_MODE_SENDING"
)) {
"sending"
;
}
elsif
(
$val
->{connections}->[
$i
]->{callMode}->[
$j
] == constant(
"RX_MODE_RECEIVING"
)) {
"receiving"
;
}
elsif
(
$val
->{connections}->[
$i
]->{callMode}->[
$j
] == constant(
"RX_MODE_ERROR"
)) {
"error"
;
}
elsif
(
$val
->{connections}->[
$i
]->{callMode}->[
$j
] == constant(
"RX_MODE_EOF"
)) {
"eof"
;
}
else
{
"unknown"
;
}
# print flags for this call
if
(
$val
->{connections}->[
$i
]->{callFlags}->[
$j
]) {
printf
(
", flags:"
);
if
(
$val
->{connections}->[
$i
]->{callFlags}->[
$j
] & constant(
"RX_CALL_READER_WAIT"
)) {
examples/xstat_cm_test view on Meta::CPAN
279280281282283284285286287288289290291292293294295296297298299300301302303304
$_
,
$rpc
->{fsRPCTimes}->{
$_
}->{numOps},
$rpc
->{fsRPCTimes}->{
$_
}->{numSuccesses},
$rpc
->{fsRPCTimes}->{
$_
}->{sumTime},
$rpc
->{fsRPCTimes}->{
$_
}->{sqrTime},
$rpc
->{fsRPCTimes}->{
$_
}->{minTime},
$rpc
->{fsRPCTimes}->{
$_
}->{maxTime};
}
"\nError Info:\n-----------\n"
;
foreach
(
sort
keys
%{
$rpc
->{fsRPCErrors}}) {
printf
"%15s: %d server, %d network, %d prot, %d vol, %d busies, %d other\n"
,
$_
,
$rpc
->{fsRPCErrors}->{
$_
}->{err_Server},
$rpc
->{fsRPCErrors}->{
$_
}->{err_Network},
$rpc
->{fsRPCErrors}->{
$_
}->{err_Protection},
$rpc
->{fsRPCErrors}->{
$_
}->{err_Volume},
$rpc
->{fsRPCErrors}->{
$_
}->{err_VolumeBusies},
$rpc
->{fsRPCErrors}->{
$_
}->{err_Other};
}
"\nTransfer timings:\n-----------------\n"
;
foreach
(
sort
keys
%{
$rpc
->{fsXferTimes}}) {
printf
"%s: %d xfers (%d OK), time sum=%f, sqr=%f, min=%f, max=%f\n"
,
$_
,
$rpc
->{fsXferTimes}->{
$_
}->{numXfers},
$rpc
->{fsXferTimes}->{
$_
}->{numSuccesses},
$rpc
->{fsXferTimes}->{
$_
}->{sumTime},
$rpc
->{fsXferTimes}->{
$_
}->{sqrTime},
$rpc
->{fsXferTimes}->{
$_
}->{minTime},
pod/afsmon_stats.pod view on Meta::CPAN
284285286287288289290291292293294295296297298299300301302303304=item *
numCellsContacted: Number of cells contacted.
=back
=head2 Server Up/Down Statistics Section (Server_UpDown_section)
File Server Up/Down Statistics in Same Cell Group (FS_upDown_SC_group)
Note: The records referred to in this section are the internal records kept by the afsmonitor program to track the processes from which data is being gathered.
=over
=item *
fs_sc_numTtlRecords: Number of fileserver records, active or inactive.
=item *
fs_sc_numUpRecords: Number of (active) fileserver records currently marked up.
pod/afsmon_stats.pod view on Meta::CPAN
13941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082GetXStats_max: Maximum execution
time
observed
for
GetXStats operations.
=back
File Server RPC Operation Errors Group (FS_RPCopErrors_group)
=over
=item *
FetchData_srv_err: Number of server-down errors during FetchData operations.
=item *
FetchData_net_err: Number of network errors during FetchData operations.
=item *
FetchData_prot_err_err: Number of protection violations during FetchData operations.
=item *
FetchData_vol_err: Number of volume related errors during FetchData operations.
=item *
FetchData_busy_err: Number of volume busy conditions during FetchData operations.
=item *
FetchData_other_err: Number of miscellaneous other errors during FetchData operations.
=item *
FetchACL_srv_err: Number of server-down errors during FetchACL operations.
=item *
FetchACL_net_err: Number of network errors during FetchACL operations.
=item *
FetchACL_prot_err: Number of protection violations during FetchACL operations.
=item *
FetchACL_vol_err: Number of volume related errors during FetchACL operations.
=item *
FetchACL_busy_err: Number of volume busy conditions encountered during FetchACL operations.
=item *
FetchACL_other_err: Number of miscellaneous other errors during FetchACL operations.
=item *
FetchStatus_srv_err: Number of server-down errors during FetchStatus operations.
=item *
FetchStatus_net_err: Number of network errors during FetchStatus operations.
=item *
FetchStatus_prot_err: Number of protection violations during FetchStatus operations.
=item *
FetchStatus_vol_err: Number of volume related errors during FetchStatus operations.
=item *
FetchStatus_busy_err: Number of volume busy conditions encountered during FetchStatus operations.
=item *
FetchStatus_other_err: Number of miscellaneous other errors during FetchStatus operations.
=item *
StoreData_srv_err: Number of server-down errors during StoreData operations.
=item *
StoreData_net_err: Number of network errors during StoreData operations.
=item *
StoreData_prot_err: Number of protection violations during StoreData operations.
=item *
StoreData_vol_err: Number of volume related errors during StoreData operations.
=item *
StoreData_busy_err: Number of volume busy conditions encountered during StoreData operations.
=item *
StoreData_other_err: Number of miscellaneous other errors during StoreData operations.
=item *
StoreACL_srv_err: Number of server-down errors during StoreACL operations.
=item *
StoreACL_net_err: Number of network errors during StoreACL operations.
=item *
StoreACL_prot_err: Number of protection violations during StoreACL operations.
=item *
StoreACL_vol_err: Number of volume related errors during StoreACL operations.
=item *
StoreACL_busy_err: Number of volume busy conditions encountered during StoreACL operations.
=item *
StoreACL_other_err: Number of miscellaneous other errors during StoreACL operations.
=item *
StoreStatus_srv_err: Number of server-down errors during StoreStatus operations.
=item *
StoreStatus_net_err: Number of network errors during StoreStatus operations.
=item *
StoreStatus_prot_err: Number of protection violations during StoreStatus operations.
=item *
StoreStatus_vol_err: Number of volume related errors during StoreStatus operations.
=item *
StoreStatus_busy_err: Number of volume busy conditions encountered during StoreStatus operations.
=item *
StoreStatus_other_err: Number of miscellaneous other errors during StoreStatus operations.
=item *
RemoveFile_srv_err: Number of server-down errors during RemoveFile operations.
=item *
RemoveFile_net_err: Number of network errors during RemoveFile operations.
=item *
RemoveFile_prot_err: Number of protection violations during RemoveFile operations.
=item *
RemoveFile_vol_err: Number of volume related errors during RemoveFile operations.
=item *
RemoveFile_busy_err: Number of volume busy conditions encountered during RemoveFile operations.
=item *
RemoveFile_other_err: Number of miscellaneous other errors during RemoveFile operations.
=item *
CreateFile_srv_err: Number of server-down errors during CreateFile operations.
=item *
CreateFile_net_err: Number of network errors during CreateFile operations.
=item *
CreateFile_prot_err: Number of protection violations during CreateFile operations.
=item *
CreateFile_vol_err: Number of volume related errors during CreateFile operations.
=item *
CreateFile_busy_err: Number of volume busy conditions encountered during CreateFile operations.
=item *
CreateFile_other_err: Number of miscellaneous other errors during CreateFile operations.
=item *
Rename_srv_err: Number of server-down errors during Rename operations.
=item *
Rename_net_err: Number of network errors during Rename operations.
=item *
Rename_prot_err: Number of protection violations during Rename operations.
=item *
Rename_vol_err: Number of volume related errors during Rename operations.
=item *
Rename_busy_err: Number of volume busy conditions encountered during Rename operations.
=item *
Rename_other_err: Number of miscellaneous other errors during Rename operations.
=item *
Symlink_srv_err: Number of server-down errors during Symlink operations.
=item *
Symlink_net_err: Number of network errors during Symlink operations.
=item *
Symlink_prot_err: Number of protection violations during Symlink operations.
=item *
Symlink_vol_err: Number of volume related errors during Symlink operations.
=item *
Symlink_busy_err: Number of volume busy conditions encountered during Symlink operations.
=item *
Symlink_other_err: Number of miscellaneous other errors during Symlink operations.
=item *
Link_srv_err: Number of server-down errors during Link operations.
=item *
Link_net_err: Number of network errors during Link operations.
=item *
Link_prot_err: Number of protection violations during Link operations.
=item *
Link_vol_err: Number of volume related errors during Link operations.
=item *
Link_busy_err: Number of volume busy conditions encountered during Link operations.
=item *
Link_other_err: Number of miscellaneous other errors during Link operations.
=item *
MakeDir_srv_err: Number of server-down errors during MakeDir operations.
=item *
MakeDir_net_err: Number of network errors during MakeDir operations.
=item *
MakeDir_prot_err: Number of protection violations during MakeDir operations.
=item *
MakeDir_vol_err: Number of volume related errors during MakeDir operations.
=item *
MakeDir_busy_err: Number of volume busy conditions encountered during MakeDir operations.
=item *
MakeDir_other_err: Number of miscellaneous other errors during MakeDir operations.
=item *
RemoveDir_srv_err: Number of server-down errors during RemoveDir operations.
=item *
RemoveDir_net_err: Number of network errors during RemoveDir operations.
=item *
RemoveDir_prot_err: Number of protection violations during RemoveDir operations.
=item *
RemoveDir_vol_err: Number of volume related errors during RemoveDir operations.
=item *
RemoveDir_busy_err: Number of volume busy conditions encountered during RemoveDir operations.
=item *
RemoveDir_other_err: Number of miscellaneous other errors during RemoveDir operations.
=item *
SetLock_srv_err: Number of server-down errors during SetLock operations.
=item *
SetLock_net_err: Number of network errors during SetLock operations.
=item *
SetLock_prot_err: Number of protection violations during SetLock operations.
=item *
SetLock_vol_err: Number of volume related errors during SetLock operations.
=item *
SetLock_busy_err: Number of volume busy conditions encountered during SetLock operations.
=item *
SetLock_other_err: Number of miscellaneous other errors during SetLock operations.
=item *
ExtendLock_srv_err: Number of server-down errors during ExtendLock operations.
=item *
ExtendLock_net_err: Number of network errors during ExtendLock operations.
=item *
ExtendLock_prot_err: Number of protection violations during ExtendLock operations.
=item *
ExtendLock_vol_err: Number of volume related errors during ExtendLock operations.
=item *
ExtendLock_busy_err: Number of volume busy conditions encountered during ExtendLock operations.
=item *
ExtendLock_other_err: Number of miscellaneous other errors during ExtendLock operations.
=item *
ReleaseLock_srv_err: Number of server-down errors during ReleaseLock operations.
=item *
ReleaseLock_net_err: Number of network errors during ReleaseLock operations.
=item *
ReleaseLock_prot_err: Number of protection violations during ReleaseLock operations.
=item *
ReleaseLock_vol_err: Number of volume related errors during ReleaseLock operations.
=item *
ReleaseLock_busy_err: Number of volume busy conditions encountered during ReleaseLock operations.
=item *
ReleaseLock_other_err: Number of miscellaneous other errors during ReleaseLock operations.
=item *
GetStatistics_srv_err: Number of server-down errors during GetStatistics operations.
=item *
GetStatistics_net_err: Number of network errors during GetStatistics operations.
=item *
GetStatistics_prot_err: Number of protection violations during GetStatistics operations.
=item *
GetStatistics_vol_err: Number of volume related errors during GetStatistics operations.
=item *
GetStatistics_busy_err: Number of volume busy conditions encountered during GetStatistics operations.
=item *
GetStatistics_other_err: Number of miscellaneous other errors during GetStatistics operations.
=item *
GiveUpCallbacks_srv_err: Number of server-down errors during GiveUpCallbacks operations.
=item *
GiveUpCallbacks_net_err: Number of network errors during GiveUpCallbacks operations.
=item *
GiveUpCallbacks_prot_err: Number of protection violations during GiveUpCallbacks operations.
=item *
GiveUpCallbacks_vol_err: Number of volume related errors during GiveUpCallbacks operations.
=item *
GiveUpCallbacks_busy_err: Number of volume busy conditions encountered during GiveUpCallbacks operations.
=item *
GiveUpCallbacks_other_err: Number of miscellaneous other errors during GiveUpCallbacks operations.
=item *
GetVolumeInfo_srv_err: Number of server-down errors during GetVolumeInfo operations.
=item *
GetVolumeInfo_net_err: Number of network errors during GetVolumeInfo operations.
=item *
GetVolumeInfo_prot_err: Number of protection violations during GetVolumeInfo operations.
=item *
GetVolumeInfo_vol_err: Number of volume related errors during GetVolumeInfo operations.
=item *
GetVolumeInfo_busy_err: Number of volume busy conditions encountered during GetVolumeInfo operations.
=item *
GetVolumeInfo_other_err: Number of miscellaneous other errors during GetVolumeInfo operations.
=item *
GetVolumeStatus_srv_err: Number of server-down errors during GetVolumeStatus operations.
=item *
GetVolumeStatus_net_err: Number of network errors during GetVolumeStatus operations.
=item *
GetVolumeStatus_prot_err: Number of protection violations during GetVolumeStatus operations.
=item *
GetVolumeStatus_vol_err: Number of volume related errors during GetVolumeStatus operations.
=item *
GetVolumeStatus_busy_err: Number of volume busy conditions encountered during GetVolumeStatus operations.
=item *
GetVolumeStatus_other_err: Number of miscellaneous other errors during GetVolumeStatus operations.
=item *
SetVolumeStatus_srv_err : Number of server-down errors during SetVolumeStatus operations.
=item *
SetVolumeStatus_net_err: Number of network errors during SetVolumeStatus operations.
=item *
SetVolumeStatus_prot_err: Number of protection violations during SetVolumeStatus operations.
=item *
SetVolumeStatus_vol_err: Number of volume related errors during SetVolumeStatus operations.
=item *
SetVolumeStatus_busy_err: Number of volume busy conditions encountered during SetVolumeStatus operations.
=item *
SetVolumeStatus_other_err: Number of miscellaneous other errors during SetVolumeStatus operations.
=item *
GetRootVolume_srv_err: Number of server-down errors during GetRootVolume operations.
=item *
GetRootVolume_net_err: Number of network errors during GetRootVolume operations.
=item *
GetRootVolume_prot_err: Number of protection violations during GetRootVolume operations.
=item *
GetRootVolume_vol_err: Number of volume related errors during GetRootVolume operations.
=item *
GetRootVolume_busy_err: Number of volume busy conditions encountered during GetRootVolume operations.
=item *
GetRootVolume_other_err: Number of miscellaneous other errors during GetRootVolume operations.
=item *
CheckToken_srv_err: Number of server-down errors during CheckToken operations.
=item *
CheckToken_net_err: Number of network errors during CheckToken operations.
=item *
CheckToken_prot_err: Number of protection violations during CheckToken operations.
=item *
CheckToken_vol_err: Number of volume related errors during CheckToken operations.
=item *
CheckToken_busy_err: Number of volume busy conditions encountered during CheckToken operations.
=item *
CheckToken_other_err: Number of miscellaneous other errors during CheckToken operations.
=item *
GetTime_srv_err: Number of server-down errors during GetTime operations.
=item *
GetTime_net_err: Number of network errors during GetTime operations.
=item *
GetTime_prot_err: Number of protection violations during GetTime operations.
=item *
GetTime_vol_err: Number of volume related errors during GetTime operations.
=item *
GetTime_busy_err: Number of volume busy conditions encountered during GetTime operations.
=item *
GetTime_other_err: Number of miscellaneous other errors during GetTime operations.
=item *
NGetVolumeInfo_srv_err: Number of server-down errors during NGetVolumeInfo operations.
=item *
NGetVolumeInfo_net_err: Number of network errors during NGetVolumeInfo operations.
=item *
NGetVolumeInfo_prot_err: Number of protection violations during NGetVolumeInfo operations.
=item *
NGetVolumeInfo_vol_err: Number of volume related errors during NGetVolumeInfo operations.
=item *
NGetVolumeInfo_busy_err: Number of volume busy conditions encountered during NGetVolumeInfo operations.
=item *
NGetVolumeInfo_other_err: Number of miscellaneous other errors during NGetVolumeInfo operations.
=item *
BulkStatus_srv_err: Number of server-down errors during BulkStatus operations.
=item *
BulkStatus_net_err: Number of network errors during BulkStatus operations.
=item *
BulkStatus_prot_err: Number of protection violations during BulkStatus operations.
=item *
BulkStatus_vol_err: Number of volume related errors during BulkStatus operations.
=item *
BulkStatus_busy_err: Number of volume busy conditions encountered during BulkStatus operations.
=item *
BulkStatus_other_err: Number of miscellaneous other errors during BulkStatus operations.
=item *
XStatsVersion_srv_err: Number of server-down errors during XStatsVersion operations.
=item *
XStatsVersion_net_err: Number of network errors during XStatsVersion operations.
=item *
XStatsVersion_prot_err: Number of protection violations during XStatsVersion operations.
=item *
XStatsVersion_vol_err: Number of volume related errors during XStatsVersion operations.
=item *
XStatsVersion_busy_err: Number of volume busy conditions encountered during XStatsVersion operations.
=item *
XStatsVersion_other_err: Number of miscellaneous other errors during XStatsVersion operations.
=item *
GetXStats_srv_err: Number of server-down errors during GetXStats operations.
=item *
GetXStats_net_err: Number of network errors during GetXStats operations.
=item *
GetXStats_prot_err: Number of protection violations during GetXStats operations.
=item *
GetXStats_vol_err: Number of volume related errors during GetXStats operations.
=item *
GetXStats_busy_err: Number of volume busy conditions encountered during GetXStats operations.
=item *
GetXStats_other_err: Number of miscellaneous other errors during GetXStats operations.
=back
File Server RPC Transfer Timings Group (FS_RPCopBytes_group)
=over
=item *
FetchData_xfers: Number of FetchData operations.
pod/afsmon_stats.pod view on Meta::CPAN
209620972098209921002101210221032104210521062107210821092110211121122113211421152116=item *
FetchData_xfers_min: Minimum transfer time observed for FetchData operations.
=item *
FetchData_xfers_max: Maximum transfer time observed for FetchData operations.
=item *
FetchData_xfers_bytes_sum: Sum of bytes transferred for FetchData operations.
=item *
FetchData_xfers_bytes_min: Minimum byte transfer observed for FetchData operations.
=item *
FetchData_xfers_bytes_max: Maximum byte transfer observed for FetchData operations.
=item *
pod/afsmon_stats.pod view on Meta::CPAN
216821692170217121722173217421752176217721782179218021812182218321842185218621872188=item *
StoreData_xfers_min: Minimum transfer time observed for StoreData operations.
=item *
StoreData_xfers_max: Maximum transfer time observed for StoreData operations.
=item *
StoreData_xfers_bytes_sum: Sum of bytes transferred for StoreData operations.
=item *
StoreData_xfers_bytes_min: Minimum byte transfer observed for StoreData operations.
=item *
StoreData_xfers_bytes_max: Maximum byte transfer observed for StoreData operations.
=item *
pod/afsmon_stats.pod view on Meta::CPAN
352535263527352835293530353135323533353435353536353735383539354035413542354335443545=item *
FetchData_xfers_min: Minimum transfer time observed for FetchData operations.
=item *
FetchData_xfers_max: Maximum transfer time observed for FetchData operations.
=item *
FetchData_xfers_bytes_sum: Sum of bytes transferred for FetchData operations.
=item *
FetchData_xfers_bytes_min: Minimum byte transfer observed for FetchData operations.
=item *
FetchData_xfers_bytes_max: Maximum byte transfer observed for FetchData operations.
=item *
pod/afsmon_stats.pod view on Meta::CPAN
359735983599360036013602360336043605360636073608360936103611361236133614361536163617=item *
StoreData_xfers_min: Minimum transfer time observed for StoreData operations.
=item *
StoreData_xfers_max: Maximum transfer time observed for StoreData operations.
=item *
StoreData_xfers_bytes_sum: Sum of bytes transferred for StoreData operations.
=item *
StoreData_xfers_bytes_min: Minimum byte transfer observed for StoreData operations.
=item *
StoreData_xfers_bytes_max: Maximum byte transfer observed for StoreData operations.
=item *
pod/afsmonitor.pod view on Meta::CPAN
352353354355356357358359360361362363364365366367368369370371372field_name that equals or exceeds the threshold value.
Use the thresh line to set either a global threshold, which applies
to all file server machines listed on fs lines or client machines
listed on cm lines in the configuration file, or a machine-specific
threshold, which applies to only one file server or client machine.
To set a global threshold, place the thresh line
before
any of the
fs or cm lines in the file. To set a machine-specific threshold,
place the thresh line below the corresponding fs or cm line, and
above any other fs or cm lines. A machine-specific threshold value
always overrides the corresponding global threshold,
if
set. Do not
place a thresh fs line directly
after
a cm line or a thresh cm line
directly
after
a fs line.
=item B<show fs | cm I<field/group/section>>
Specifies which individual statistic, group of statistics, or
section of statistics to include in the File Servers (fs) and/or
Cache Managers (cm) data structure. The L<afsmon_stats(1)> documentation
specifies the group and section to which each statistic belongs.
Include as many show lines as necessary to customize the results
src/Makefile.PL view on Meta::CPAN
144145146147148149150151152153154155156157158159160161162163164
-lrxkad
-lrxstat
-lxstat_fs
-lxstat_cm
-lafsint
-lrx
-lsys
-ldes
-llwp
-lcom_err
-lutil
-lusd
-laudit
)
)
],
'realclean'
=> {
FILES
=>
'Makefile.bak lib'
},
);
if
(
$Config
{osname} =~ /aix/) {
src/Makefile.PL view on Meta::CPAN
191192193194195196197198199200201202203204205206207208209210211WriteMakefile(
%MakefileArgs
);
# change the library name of the AFS system library "util.a"
my
$command
=
"\'s#-lutil#$AFSPath/lib/afs/util.a#\'"
;
system
(
"perl -p -i.bak -e $command Makefile"
)
unless
-f
"$AFSPath/lib/afs/libutil.a"
;
# change the library name of the AFS system library "vlib.a"
$command
=
"\'s#-lvlib#$AFSPath/lib/afs/vlib.a#\'"
;
system
(
"perl -p -i.bak -e $command Makefile"
)
unless
-f
"$AFSPath/lib/afs/libvlib.a"
;
# change the library name of the AFS system library "libcom_err"
$command
=
"\'s#-lcom_err#$AFSPath/lib/afs/libcom_err.a#\'"
;
system
(
"perl -p -i.bak -e $command Makefile"
);
# change the library name of the AFS system library "libsys"
$command
=
"\'s#-lsys#$AFSPath/lib/afs/libsys.a#\'"
;
system
(
"perl -p -i.bak -e $command Makefile"
);
# change the library name of the AFS system library "libcmd"
$command
=
"\'s#-lcmd#$AFSPath/lib/afs/libcmd.a#\'"
;
system
(
"perl -p -i.bak -e $command Makefile"
);
src/Monitor.pm view on Meta::CPAN
424344454647484950515253545556575859606162
udebug
cmdebug
scout
xstat_fs_test
xstat_cm_test
);
# Other items we are prepared to export if requested
@EXPORT_OK
=
qw(
error_message
constant
)
;
sub
rxdebug {
my
%subreq
;
# parse the arguments and build a hash to pass to the XS do_rxdebug call.
return
eval
{
while
(
@_
) {
$_
=
shift
;
src/Monitor.xs view on Meta::CPAN
49505152535455565758596061626364656667686970717273747576#if defined(AFS_3_4) || defined(AFS_3_5)
#else
#define int32 afs_int32
#define uint32 afs_uint32
#endif
const char
*const
xs_version =
"Monitor.xs (Major Version 0.2 $Rev: 609 $)"
;
extern char
*error_message
();
extern struct hostent
*hostutil_GetHostByName
();
extern char
*hostutil_GetNameByINet
();
/* error handling macros */
#define SETCODE(code) set_code(code)
#define FSSETCODE(code) {if (code == -1) set_code(errno); else set_code(code);}
#define BSETCODE(code, msg) bv_set_code(code, msg)
#define VSETCODE(code, msg) bv_set_code(code, msg)
static int32 raise_exception = 0;
static void
bv_set_code(code, msg)
int32 code;
const char
*msg
;
src/Monitor.xs view on Meta::CPAN
96979899100101102103104105106107108109110111112113114115116117118119120121122123
int32 code;
{
SV
*sv
= perl_get_sv(
"AFS::CODE"
, TRUE);
sv_setiv(sv, (IV) code);
if
(code == 0) {
sv_setpv(sv,
""
);
}
else
{
if
(raise_exception) {
char buffer[1024];
sprintf
(buffer,
"AFS exception: %s (%d)"
, error_message(code), code);
croak(buffer);
}
sv_setpv(sv, (char *)error_message(code));
}
SvIOK_on(sv);
}
/* end of error handling macros */
/* start of rxdebug helper functions */
/*
* from src/rxdebug/rxdebug.c
* (
"$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $"
);
*/
src/Monitor.xs view on Meta::CPAN
711712713714715716717718719720721722723724725726727728729730731*/
int
my_parse_threshEntry(a_line, global_fsThreshCount, global_cmThreshCount,
last_hostEntry, lastHostType, buffer)
char
*a_line
; /* line that is being parsed */
int
*global_fsThreshCount
; /* count of global file server thresholds */
int
*global_cmThreshCount
; /* count of global cache manager thresholds */
struct afsmon_hostEntry
*last_hostEntry
; /* a pointer to the
last
host entry */
int
lastHostType; /* points to an integer specifying whether the
last
host was fs or cm */
char
*buffer
; /* to
return
error messages in */
{
char opcode[CFG_STR_LEN]; /* junk characters */
char arg1[CFG_STR_LEN]; /* hostname or qualifier (fs/cm?) */
char arg2[CFG_STR_LEN]; /* threshold variable */
char arg3[CFG_STR_LEN]; /* threshold value */
char arg4[CFG_STR_LEN]; /* user's handler */
char arg5[CFG_STR_LEN]; /* junk characters */
/* break it up */
src/Monitor.xs view on Meta::CPAN
754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
(
*global_fsThreshCount
)++;
break;
case 1: /* inc thresh count of
last
file server */
last_hostEntry->numThresh++;
break;
case 2:
sprintf
(buffer,
"A threshold for a File Server cannot be placed after a Cache Manager host entry in the config file"
);
return
(-1);
default
:
sprintf
(buffer,
"Programming error 1"
);
return
(-1);
}
}
else
if
((strcasecmp(arg1,
"cm"
)) == 0) {
switch (lastHostType) {
case 0: /* its a global threshold */
(
*global_cmThreshCount
)++;
break;
case 2: /* inc thresh count of
last
cache manager */
last_hostEntry->numThresh++;
break;
case 1:
sprintf
(buffer,
"A threshold for a Cache Manager cannot be placed after a File Server host entry in the config file"
);
return
(-1);
default
:
sprintf
(buffer,
"Programming error 2"
);
return
(-1);
}
}
else
{
sprintf
(buffer,
"Syntax error. Second argument should be \"fs\" or \"cm\""
);
return
(-1);
}
return
(0);
} /* my_parse_threshEntry() */
/*
* from src/afsmonitor/afsmonitor.c
src/Monitor.xs view on Meta::CPAN
117311741175117611771178117911801181118211831184118511861187118811891190119111921193
tmp_host = tmp_host->
next
;
}
(
*global_TC
)--;
return
(0);
}
/* it is not a global threshold, insert it in the thresh list of this
* host only. We overwrite the global threshold
if
it was already set */
if
(
*hostname
==
'\0'
) {
sprintf
(buffer,
"Programming error 3"
);
return
(-1);
}
/* get the hostEntry that this threshold belongs to */
tmp_host = Header;
found = 0;
for
(i = 0; i < srvCount; i++) {
if
(strcasecmp(tmp_host->hostName, hostname) == 0) {
found = 1;
break;
src/Monitor.xs view on Meta::CPAN
136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404
int
*numCM
;
int
*lastHostType
;
struct afsmon_hostEntry *
*last_hostEntry
;
int
*fs_showDefault
;
int
*cm_showDefault
;
short
*fs_showFlags
;
short
*cm_showFlags
;
struct afsmon_hostEntry *
*FSnameList
;
struct afsmon_hostEntry *
*CMnameList
;
{
char buff1[256] =
""
; /*
for
error messages */
char buff2[256] =
""
; /*
for
error messages returned from subroutines */
FILE
*configFD
= 0; /* config file descriptor */
char line[4 * CFG_STR_LEN]; /* a line of config file */
char opcode[CFG_STR_LEN]; /* specifies type of config entry */
char arg1[CFG_STR_LEN]; /* hostname or qualifier (fs/cm?) */
char arg2[CFG_STR_LEN]; /* threshold variable */
char arg3[CFG_STR_LEN]; /* threshold value */
char arg4[CFG_STR_LEN]; /* user's handler */
struct afsmon_hostEntry
*curr_host
= 0;
struct hostent
*he
= 0; /* hostentry to resolve host name */
char
*handlerPtr
= 0; /* ptr to pass theresh handler string */
int
code = 0; /* error code */
int
linenum = 0; /* config file line number */
int
threshCount = 0; /* count of thresholds
for
each
server */
int
error_in_config = 0; /* syntax errors in config file ?? */
int
i = 0;
int
numBytes = 0;
/*
int
global_ThreshFlag = 1; */
int
global_fsThreshCount = 0;
int
global_cmThreshCount = 0;
static char last_fsHost[HOST_NAME_LEN];
static char last_cmHost[HOST_NAME_LEN];
/*
open
config file */
configFD = fopen(a_config_filename,
"r"
);
src/Monitor.xs view on Meta::CPAN
140814091410141114121413141414151416141714181419142014211422142314241425142614271428
return
(-1);
}
/* parse config file */
/* First Pass - check syntax and count number of servers and thresholds to monitor */
*numFS
= 0;
*numCM
= 0;
threshCount = 0;
error_in_config = 0; /* flag to note
if
config file
has
syntax errors */
while
((fgets(line, CFG_STR_LEN, configFD)) != NULL) {
opcode[0] = 0;
arg1[0] = 0;
arg2[0] = 0;
arg3[0] = 0;
arg4[0] = 0;
sscanf(line,
"%s %s %s %s %s"
, opcode, arg1, arg2, arg3, arg4);
linenum++;
/* fprintf(STDERR,
"Got line %d: \"%s %s %s %s %s\"\n"
,
src/Monitor.xs view on Meta::CPAN
145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482
else
{
/* fprintf(STDERR,
" - unknown entry\n"
); */
sprintf
(buff2,
"Unknown opcode %s"
, opcode);
code = 1;
}
if
(code) {
sprintf
(buff1,
"Error processing config file line %d (\"%s %s %s %s %s\"). %s"
,
linenum, opcode, arg1, arg2, arg3, arg4, buff2);
error_in_config = 1;
BSETCODE(10, buff1);
return
(-1);
}
}
/* fprintf(STDERR,
"got to end of file.\n"
); */
if
(error_in_config) {
sprintf
(buff1,
"Error in config file. %s"
, buff2);
BSETCODE(10, buff1);
return
(-1);
}
/* the threshold count of all hosts in increased by 1
for
each
global
* threshold. If one of the hosts
has
a
local
threshold
for
the same
* variable it would end up being counted twice. whats a few bytes of memory
* wasted anyway ? */
src/Monitor.xs view on Meta::CPAN
1507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555/* Second Pass */
fseek(configFD, 0, 0); /*
seek
to the beginning */
/* allocate memory
for
threshold lists */
curr_host =
*FSnameList
;
for
(i = 0; i <
*numFS
; i++) {
if
(curr_host->hostName[0] ==
'\0'
) {
sprintf
(buff1,
"Programming error 4"
);
BSETCODE(20, buff1);
return
(-1);
}
if
(curr_host->numThresh) {
numBytes = curr_host->numThresh * sizeof(struct Threshold);
curr_host->thresh = (struct Threshold *)malloc(numBytes);
if
(curr_host->thresh == (struct Threshold *) NULL) {
sprintf
(buff1,
"Memory Allocation error 1"
);
BSETCODE(25, buff1);
return
(-1);
}
memset(curr_host->thresh, 0, numBytes);
}
curr_host = curr_host->
next
;
}
curr_host =
*CMnameList
;
for
(i = 0; i <
*numCM
; i++) {
if
(curr_host->hostName[0] ==
'\0'
) {
sprintf
(buff1,
"Programming error 5"
);
BSETCODE(30, buff1);
return
(-1);
}
if
(curr_host->numThresh) {
numBytes = curr_host->numThresh * sizeof(struct Threshold);
curr_host->thresh = (struct Threshold *)malloc(numBytes);
if
(curr_host->thresh == (struct Threshold *) NULL) {
sprintf
(buff1,
"Memory Allocation error 2"
);
BSETCODE(35, buff1);
return
(-1);
}
memset(curr_host->thresh, 0, numBytes);
}
curr_host = curr_host->
next
;
}
opcode[0] = 0;
arg1[0] = 0;
src/Monitor.xs view on Meta::CPAN
160516061607160816091610161116121613161416151616161716181619162016211622162316241625
&global_fsThreshCount
,
*FSnameList
,
last_fsHost,
*numFS
, buff2);
else
if
(strcasecmp(arg1,
"cm"
) == 0)
code = my_store_threshold(2, /* 2 = cm */
arg2, arg3, handlerPtr,
&global_cmThreshCount
,
*CMnameList
,
last_cmHost,
*numCM
, buff2);
else
{
sprintf
(buff1,
"Programming error 6"
);
BSETCODE(40, buff1);
return
(-1);
}
if
(code) {
sprintf
(buff1,
"Error processing config file line %d (\"%s %s %s %s %s\"): Failed to store threshold. %s"
,
linenum, opcode, arg1, arg2, arg3, arg4, buff2);
BSETCODE(45, buff1);
return
(-1);
}
src/Monitor.xs view on Meta::CPAN
228822892290229122922293229422952296229722982299230023012302230323042305230623072308
*currCollIDP
,
&srvVersionNumber
,
&(xstat_fs_Results.probeTime),
&(xstat_fs_Results.data));
code =
ProbeHandler(xstat_fs_Results, xstat_fs_numServers,
index
,
buff2, argp);
index
++;
if
(code) {
sprintf
(buffer,
"Handler returned error code %d. %s"
,
code, buff2);
return
(code);
}
} /* For
each
collection */
} /
*Valid
Rx connection */
/*
* Advance the xstat_fs connection pointer.
*/
src/Monitor.xs view on Meta::CPAN
231823192320232123222323232423252326232723282329233023312332233323342335233623372338* (
"$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $"
);
*/
int
my_xstat_fs_Init(
int
(
*ProbeHandler
) (),
int
xstat_fs_numServers,
struct sockaddr_in
*a_socketArray
,
int
xstat_fs_numCollections, afs_int32 * xstat_fs_collIDP,
char
*buffer
, ...)
{
int
curr_srv = 0;
int
conn_err = 0;
char
*hostNameFound
=
""
;
struct xstat_fs_ConnectionInfo
*curr_conn
= 0,
*xstat_fs_ConnInfo
= 0;
struct rx_securityClass
*secobj
= 0; /
*Client
security object */
char buff2[256] =
""
;
int
PortToUse = 0;
int
code = 0;
va_list argp;
xstat_fs_ConnInfo = (struct xstat_fs_ConnectionInfo *)
malloc(xstat_fs_numServers * sizeof(struct xstat_fs_ConnectionInfo));
src/Monitor.xs view on Meta::CPAN
23462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386PortToUse = XSTAT_FS_CBPORT;
do
{
code = rx_Init(htons(PortToUse));
if
(code) {
if
(code == RX_ADDRINUSE) {
PortToUse++;
}
else
{
sprintf
(buffer,
"Fatal error in rx_Init()"
);
return
(-1);
}
}
}
while
(code);
/*
* Create a null Rx client security object, to be used by the
* probe LWP.
*/
secobj = rxnull_NewClientSecurityObject();
if
(secobj == (struct rx_securityClass *) NULL) {
/
*Delete
already-malloc'ed areas */
my_xstat_fs_Cleanup(1, xstat_fs_numServers, xstat_fs_ConnInfo, buff2);
sprintf
(buffer,
"Can't create probe LWP client security object. %s"
,
buff2);
return
(-1);
}
curr_conn = xstat_fs_ConnInfo;
conn_err = 0;
for
(curr_srv = 0; curr_srv < xstat_fs_numServers; curr_srv++) {
/*
* Copy in the
socket
info
for
the current server, resolve its
* printable name
if
possible.
*/
memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
sizeof(struct sockaddr_in));
hostNameFound = hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
src/Monitor.xs view on Meta::CPAN
2600260126022603260426052606260726082609261026112612261326142615261626172618261926202621void
my_Print_cm_ErrInfo(a_opIdx, a_opNames, a_opErrP, cm_outFD)
int
a_opIdx;
char
*a_opNames
[];
struct afs_stats_RPCErrors
*a_opErrP
;
FILE
*cm_outFD
;
{ /
*Print_cm_ErrInfo
*/
fprintf(cm_outFD,
"%15s: %d server, %d network, %d prot, %d vol, %d busies, %d other\n"
,
a_opNames[a_opIdx], a_opErrP->err_Server, a_opErrP->err_Network,
a_opErrP->err_Protection, a_opErrP->err_Volume,
a_opErrP->err_VolumeBusies, a_opErrP->err_Other);
} /* my_Print_cm_ErrInfo() */
/*
* from src/afsmonitor/afsmon-output.c
* (
"$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $"
);
*/
src/Monitor.xs view on Meta::CPAN
29192920292129222923292429252926292729282929293029312932293329342935293629372938int
idx;
afs_int32 numLongs;
fullP = (struct afs_stats_CMFullPerf *)
(a_cmResults->data.AFSCB_CollData_val);
/* There are 4 parts to CM statistics
* - Overall performance statistics (including up/down statistics)
* - This CMs FS RPC operations info
* - This CMs FS RPC errors info
* - This CMs FS transfers info
* - Authentication info
* - [Un]Replicated access info
*/
/* copy overall performance statistics */
srcbuf = (afs_int32 *) & (fullP->perf);
idx = 0;
src/Monitor.xs view on Meta::CPAN
299829993000300130023003300430053006300730083009301030113012301330143015301630173018
idx++;
srcbuf++;
tmpbuf = srcbuf++; /* max
time
*/
sprintf
(a_cmData->data[idx],
"%d.%06d"
,
*tmpbuf
,
*srcbuf
);
idx++;
srcbuf++;
}
/
*printf
(
"Ending index value = %d\n"
,idx-1); */
/* copy CMs individual FS RPC errors info */
srcbuf = (afs_int32 *) (fullP->rpc.fsRPCErrors);
for
(i = 0; i < AFS_STATS_NUM_FS_RPC_OPS; i++) {
sprintf
(a_cmData->data[idx],
"%d"
,
*srcbuf
); /* server */
idx++;
srcbuf++;
sprintf
(a_cmData->data[idx],
"%d"
,
*srcbuf
); /* network */
idx++;
srcbuf++;
sprintf
(a_cmData->data[idx],
"%d"
,
*srcbuf
); /* prot */
src/Monitor.xs view on Meta::CPAN
337333743375337633773378337933803381338233833384338533863387338833893390339133923393
&srvVersionNumber
,
&(xstat_cm_Results.probeTime),
&(xstat_cm_Results.data));
code =
ProbeHandler(xstat_cm_Results, xstat_cm_numServers,
index
,
buff2, argp);
index
++;
if
(code) {
sprintf
(buffer,
"Handler routine got error code %d. %s"
,
code, buff2);
return
(code);
}
} /* For
each
collection */
} /
*Valid
Rx connection */
/*
* Advance the xstat_fs connection pointer.
*/
src/Monitor.xs view on Meta::CPAN
34043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462* (
"$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $"
);
*/
int
my_xstat_cm_Init(
int
(
*ProbeHandler
) (),
int
xstat_cm_numServers,
struct sockaddr_in
*a_socketArray
,
int
xstat_cm_numCollections, afs_int32 * xstat_cm_collIDP,
char
*buffer
, ...)
{
int
curr_srv = 0;
int
conn_err = 0;
char
*hostNameFound
=
""
;
struct xstat_cm_ConnectionInfo
*curr_conn
= 0,
*xstat_cm_ConnInfo
= 0;
struct rx_securityClass
*secobj
= 0; /
*Client
security object */
char buff2[256] =
""
;
int
code = 0;
va_list argp;
xstat_cm_ConnInfo = (struct xstat_cm_ConnectionInfo *)
malloc(xstat_cm_numServers * sizeof(struct xstat_cm_ConnectionInfo));
if
(xstat_cm_ConnInfo == (struct xstat_cm_ConnectionInfo *) NULL) {
sprintf
(buffer,
"Can't allocate %d connection info structs (%d bytes)"
,
xstat_cm_numServers,
(xstat_cm_numServers * sizeof(struct xstat_cm_ConnectionInfo)));
return
(-1); /
*No
cleanup needs to be done yet */
}
code = rx_Init(htons(0));
if
(code) {
sprintf
(buffer,
"Fatal error in rx_Init(), error=%d"
, code);
return
(-1);
}
/*
* Create a null Rx client security object, to be used by the
* probe LWP.
*/
secobj = rxnull_NewClientSecurityObject();
if
(secobj == (struct rx_securityClass *) NULL) {
/
*Delete
already-malloc'ed areas */
my_xstat_cm_Cleanup(1, xstat_cm_numServers, xstat_cm_ConnInfo, buff2);
sprintf
(buffer,
"Can't create probe LWP client security object. %s"
,
buff2);
return
(-1);
}
curr_conn = xstat_cm_ConnInfo;
conn_err = 0;
for
(curr_srv = 0; curr_srv < xstat_cm_numServers; curr_srv++) {
/*
* Copy in the
socket
info
for
the current server, resolve its
* printable name
if
possible.
*/
memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
sizeof(struct sockaddr_in));
hostNameFound = hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
src/Monitor.xs view on Meta::CPAN
36793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701struct AFSDBLock
lock
;
afs_int32 code;
HV
*LOCK
;
HV
*LOCKDESC
;
for
(i = 0; i < 1000; i++) {
code = RXAFSCB_GetLock(aconn, i,
&lock
);
if
(code) {
if
(code == 1)
break;
/* otherwise we have an unrecognized error */
sprintf
(buffer,
"cmdebug: error checking locks: %s"
,
error_message(code));
return
code;
}
/* here we have the
lock
information, so display it, perhaps */
if
(aint32 || IsLocked(
&lock
.
lock
)) {
LOCK = newHV();
hv_store(LOCK,
"name"
, 4, newSVpv(
lock
.name, 0), 0);
LOCKDESC = newHV();
my_PrintLock(
&lock
.
lock
, LOCKDESC);
hv_store(LOCK,
"lock"
, 4, newRV_inc((SV *) LOCKDESC), 0);
av_store(LOCKS, i, newRV_inc((SV *) LOCK));
src/Monitor.xs view on Meta::CPAN
371937203721372237233724372537263727372837293730373137323733373437353736373737383739HV
*NETFID
;
HV
*CENTRY
;
HV
*LOCK
;
for
(i = 0; i < 10000; i++) {
code = RXAFSCB_GetCE(aconn, i,
¢ry
);
if
(code) {
if
(code == 1)
break;
sprintf
(buffer,
"cmdebug: failed to get cache entry %d (%s)"
, i,
error_message(code));
return
code;
}
CENTRY = newHV();
hv_store(CENTRY,
"addr"
, 4, newSViv(centry.addr), 0);
if
(centry.addr == 0) {
/* PS output */
NETFID = newHV();
src/Monitor.xs view on Meta::CPAN
380438053806380738083809381038113812381338143815381638173818381938203821382238233824HV
*NETFID
;
HV
*CENTRY
;
HV
*LOCK
;
for
(i = 0; i < 10000; i++) {
code = RXAFSCB_GetCE(aconn, i,
¢ry
);
if
(code) {
if
(code == 1)
break;
sprintf
(buffer,
"cmdebug: failed to get cache entry %d (%s)\n"
, i,
error_message(code));
return
code;
}
CENTRY = newHV();
hv_store(CENTRY,
"addr"
, 4, newSViv(centry.addr), 0);
if
(centry.addr == 0) {
/* PS output */
printf
(
"Proc %4d sleeping at %08x, pri %3d\n"
,
src/Monitor.xs view on Meta::CPAN
388738883889389038913892389338943895389638973898389939003901390239033904390539063907HV
*NETFID
;
HV
*CENTRY
;
HV
*LOCK
;
for
(i = 0; i < 10000; i++) {
code = RXAFSCB_GetCE64(aconn, i,
¢ry
);
if
(code) {
if
(code == 1)
break;
sprintf
(buffer,
"cmdebug: failed to get cache entry %d (%s)\n"
, i,
error_message(code));
return
code;
}
CENTRY = newHV();
hv_store(CENTRY,
"addr"
, 4, newSViv(centry.addr), 0);
if
(centry.addr == 0) {
/* PS output */
NETFID = newHV();
src/Monitor.xs view on Meta::CPAN
436543664367436843694370437143724373437443754376437743784379438043814382438343844385
int
a_numServers;
struct sockaddr_in
*a_socketArray
;
AV
*RETVAL
;
FILE
*scout_debugfd
;
char
*buffer
;
{
static char rn[] =
"my_fsprobe_Init"
;
struct fsprobe_ConnectionInfo
*curr_conn
; /
*Current
connection */
int
fsprobe_statsBytes; /
*Num
bytes in stats block */
int
fsprobe_probeOKBytes; /
*Num
bytes in probeOK block */
int
conn_err = 0, code = 0;
int
curr_srv;
char
*hostNameFound
;
int
PortToUse;
struct rx_securityClass
*secobj
;
struct rx_securityClass
*CBsecobj
;
struct rx_service
*rxsrv_afsserver
;
char buff2[256] =
""
;
struct rx_call
*rxcall
; /
*Bogus
param */
AFSCBFids
*Fids_Array
; /
*Bogus
param */
src/Monitor.xs view on Meta::CPAN
44814482448344844485448644874488448944904491449244934494449544964497449844994500
if
(code == RX_ADDRINUSE) {
if
(scout_debugfd) {
fprintf(scout_debugfd,
"[%s] Callback port %d in use, advancing\n"
, rn,
PortToUse);
fflush(scout_debugfd);
}
PortToUse++;
}
else
{
sprintf
(buffer,
"[%s] Fatal error in rx_Init()\n"
, rn);
return
(-1);
}
}
}
while
(code);
if
(scout_debugfd) {
fprintf(scout_debugfd,
"[%s] Rx initialized on port %d\n"
, rn,
PortToUse);
fflush(scout_debugfd);
}
src/Monitor.xs view on Meta::CPAN
453445354536453745384539454045414542454345444545454645474548454945504551455245534554
return
(-1);
}
if
(scout_debugfd) {
fprintf(scout_debugfd,
"[%s] Probe LWP client security object created\n"
, rn);
fflush(scout_debugfd);
}
curr_conn =
*fsprobe_ConnInfo
;
conn_err = 0;
for
(curr_srv = 0; curr_srv < a_numServers; curr_srv++) {
/*
* Copy in the
socket
info
for
the current server, resolve its
* printable name
if
possible.
*/
if
(scout_debugfd) {
fprintf(scout_debugfd,
"[%s] Copying in the following socket info:\n"
, rn);
fprintf(scout_debugfd,
"[%s] IP addr 0x%lx, port %d\n"
, rn,
(a_socketArray + curr_srv)->sin_addr.s_addr,
src/Monitor.xs view on Meta::CPAN
458745884589459045914592459345944595459645974598459946004601460246034604460546064607curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr, /
*Server
addr */
curr_conn->skt.sin_port, /
*Server
port */
1, /
*AFS
service num */
secobj, /
*Security
object */
0); /
*Number
of above */
if
(curr_conn->rxconn == (struct rx_connection *) NULL) {
sprintf
(buffer,
"[%s] Can't create Rx connection to server %s (%lu)"
,
rn, curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
conn_err = 1;
}
if
(scout_debugfd) {
fprintf(scout_debugfd,
"[%s] New connection at 0x%lx\n"
,
rn, curr_conn->rxconn);
fflush(scout_debugfd);
}
/*
* Make an Rx connection to the current volume server.
*/
src/Monitor.xs view on Meta::CPAN
461346144615461646174618461946204621462246234624462546264627462846294630463146324633}
curr_conn->rxVolconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr, /
*Server
addr */
htons(AFSCONF_VOLUMEPORT), /
*Volume
Server port */
VOLSERVICE_ID, /
*AFS
service num */
secobj, /
*Security
object */
0); /
*Number
of above */
if
(curr_conn->rxVolconn == (struct rx_connection *) NULL) {
sprintf
(buffer,
"[%s] Can't create Rx connection to volume server %s (%lu)\n"
,
rn, curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
conn_err = 1;
}
else
{
int
i, cnt;
memset(
&curr_conn
->partList, 0, sizeof(struct partList));
curr_conn->partCnt = 0;
i = my_XListPartitions(curr_conn->rxVolconn,
&curr_conn
->partList,
&cnt
, scout_debugfd);
if
(!i) {
curr_conn->partCnt = cnt;
src/Monitor.xs view on Meta::CPAN
467546764677467846794680468146824683468446854686468746884689469046914692469346944695
fprintf(scout_debugfd,
"[%s] Starting up callback listener.\n"
, rn);
rx_StartServer(0 /
*Don
't donate yourself to LWP pool */ );
/* start probe */
code = my_fsprobe_LWP(a_numServers,
*fsprobe_ConnInfo
, fsprobe_Results,
fsprobe_statsBytes, fsprobe_probeOKBytes,
scout_debugfd, RETVAL, buffer);
if
(code)
return
(code);
if
(conn_err)
return
(-2);
else
return
(0);
} /* my_fsprobe_Init() */
/*
* from src/scout/scout.c
* (
"$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $"
);
src/Monitor.xs view on Meta::CPAN
68496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874void
my_cm_PrintErrInfo(a_opIdx, a_opNames, a_opErrP, RPCERRORS)
int
a_opIdx;
char
*a_opNames
[];
struct afs_stats_RPCErrors
*a_opErrP
;
HV
*RPCERRORS
;
{
HV
*ERRORS
= newHV();
hv_store(ERRORS,
"err_Server"
, 10, newSViv(a_opErrP->err_Server), 0);
hv_store(ERRORS,
"err_Network"
, 11, newSViv(a_opErrP->err_Network), 0);
hv_store(ERRORS,
"err_Protection"
, 14, newSViv(a_opErrP->err_Protection), 0);
hv_store(ERRORS,
"err_Volume"
, 10, newSViv(a_opErrP->err_Volume), 0);
hv_store(ERRORS,
"err_VolumeBusies"
, 16, newSViv(a_opErrP->err_VolumeBusies), 0);
hv_store(ERRORS,
"err_Other"
, 9, newSViv(a_opErrP->err_Other), 0);
hv_store(RPCERRORS, a_opNames[a_opIdx], strlen(a_opNames[a_opIdx]),
newRV_inc((SV *) ERRORS), 0);
}
/*
* from src/xstat/xstat_cm_test.c
* (
"$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $"
);
*/
src/Monitor.xs view on Meta::CPAN
712171227123712471257126712771287129713071317132713371347135713671377138713971407141/* end of xstat_cm_test helper functions */
MODULE = AFS::Monitor PACKAGE = AFS::Monitor PREFIX = afs_
PROTOTYPES: ENABLE
BOOT:
initialize_rxk_error_table();
void
afs_do_xstat_cm_test(args)
HV* args = (HV*) SvRV(
$arg
);
PREINIT:
PPCODE:
{
SV
*value
;
I32 keylen = 0;
src/Monitor.xs view on Meta::CPAN
754475457546754775487549755075517552755375547555755675577558755975607561756275637564
BSETCODE(code, buffer);
if
(scout_debugfd != (FILE *) NULL) {
fprintf(scout_debugfd,
"[%s] Closing debugging file\n"
, rn);
fclose(scout_debugfd);
}
XSRETURN_UNDEF;
}
code = my_FS_Handler(fsprobe_Results, numservers, fsprobe_ConnInfo,
scout_debugfd, RETVAL, buff2);
if
(code) {
sprintf
(buffer,
"[%s] Handler routine returned error code %d. %s"
, rn, code, buff2);
BSETCODE(code, buffer);
if
(scout_debugfd != (FILE *) NULL) {
fprintf(scout_debugfd,
"[%s] Closing debugging file\n"
, rn);
fclose(scout_debugfd);
}
XSRETURN_UNDEF;
}
if
(scout_debugfd != (FILE *) NULL) {
fprintf(scout_debugfd,
"[%s] Closing debugging file\n"
, rn);
src/Monitor.xs view on Meta::CPAN
780178027803780478057806780778087809781078117812781378147815781678177818781978207821
memset(
&usdebug
, 0, sizeof(usdebug));
code = VOTE_SDebugOld(tconn, i, (struct ubik_sdebug_old *) ptr);
}
else
code = VOTE_SDebug(tconn, i,
&usdebug
);
#endif
if
(code > 0)
break; /* done */
if
(code < 0) {
warn
(
"error code %d from VOTE_SDebug\n"
, code);
break;
}
/* otherwise
the structure */
USDEBUG = newHV();
inhostAddr.s_addr = htonl(usdebug.addr);
hv_store(USDEBUG,
"addr"
, 4, newSVpv(afs_inet_ntoa(htonl(usdebug.addr)), 0), 0);
ALTADDR = newAV();
src/Monitor.xs view on Meta::CPAN
805180528053805480558056805780588059806080618062806380648065806680678068806980708071
/* fprintf(STDERR,
"it has %d elements.\n"
, num+1); */
for
(i=0; i<=num; i++) {
host = (char *) SvPV(
*av_fetch
(host_array, i, 0), PL_na);
sprintf
(buffer,
"cm %s"
,host);
code = my_parse_hostEntry(buffer,
&numFS
,
&numCM
,
&lastHostType
,
&last_hostEntry
,
&FSnameList
,
&CMnameList
, buff2);
/* fprintf(STDERR,
"got host: %s\n"
, host); */
if
(code) {
sprintf
(buffer,
"Could not parse cache manager %s. %s"
, host, buff2);
BSETCODE(180, buffer);
/* 180 is the
exit
code
for
this error in the original afsmonitor.c */
XSRETURN_UNDEF;
}
}
}
else
goto
unrecognized;
break;
case
's'
:
if
(strncmp(key,
"cmshow"
, keylen) == 0 && keylen <= 6) {
/* fprintf(STDERR,
"flag %s recognized as cmshow\n"
, key); */
show_array = (AV*) SvRV(value);
num = av_len(show_array);
src/Monitor.xs view on Meta::CPAN
819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228
XSRETURN_UNDEF;
}
fclose (outputFD);
}
/* cannot
use
'detailed'
without
'output'
*/
if
(detailed) {
if
(!output_filename) {
sprintf
(buffer,
"detailed switch can be used only with output switch"
);
BSETCODE(165, buffer);
/* 165 is the
exit
code
for
this error in the original afsmonitor.c */
XSRETURN_UNDEF;
}
}
/* The config option is mutually exclusive
with
the fshosts,cmhosts options */
if
(config_filename) {
if
(numFS || numCM) {
sprintf
(buffer,
"Cannot use config option with fshosts or cmhosts"
);
BSETCODE(170, buffer);
/* 170 is the
exit
code
for
this error in the original afsmonitor.c */
XSRETURN_UNDEF;
}
}
else
{
if
(!numFS && !numCM) {
sprintf
(buffer,
"Must specify either config or (fshosts and/or cmhosts) options"
);
BSETCODE(175, buffer);
/* 175 is the
exit
code
for
this error in the original afsmonitor.c */
XSRETURN_UNDEF;
}
}
if
(fsthresh_array) {
if
(!numFS) {
sprintf
(buffer,
"Cannot use fsthresh option without specifying fshosts"
);
BSETCODE(-1, buffer);
XSRETURN_UNDEF;
}
src/Monitor.xs view on Meta::CPAN
829983008301830283038304830583068307830883098310831183128313831483158316831783188319
temp_host->numThresh += global_fsThreshCount;
temp_host = temp_host->
next
;
}
}
temp_host = FSnameList;
for
(i = 0; i < numFS; i++) {
if
(temp_host->numThresh) {
numBytes = temp_host->numThresh * sizeof(struct Threshold);
temp_host->thresh = (struct Threshold *)malloc(numBytes);
if
(temp_host->thresh == (struct Threshold *) NULL) {
sprintf
(buffer,
"Memory Allocation error 1.5"
);
BSETCODE(25, buffer);
XSRETURN_UNDEF;
}
memset(temp_host->thresh, 0, numBytes);
}
temp_host = temp_host->
next
;
}
num = av_len(fsthresh_array);
for
(i=0; i<=num; i++) {
thresh_host = 0;
src/Monitor.xs view on Meta::CPAN
843284338434843584368437843884398440844184428443844484458446844784488449845084518452
temp_host->numThresh += global_cmThreshCount;
temp_host = temp_host->
next
;
}
}
temp_host = CMnameList;
for
(i = 0; i < numCM; i++) {
if
(temp_host->numThresh) {
numBytes = temp_host->numThresh * sizeof(struct Threshold);
temp_host->thresh = (struct Threshold *)malloc(numBytes);
if
(temp_host->thresh == (struct Threshold *) NULL) {
sprintf
(buffer,
"Memory Allocation error 2.5"
);
BSETCODE(25, buffer);
XSRETURN_UNDEF;
}
memset(temp_host->thresh, 0, numBytes);
}
temp_host = temp_host->
next
;
}
num = av_len(cmthresh_array);
for
(i=0; i<=num; i++) {
thresh_host = 0;
src/Monitor.xs view on Meta::CPAN
855085518552855385548555855685578558855985608561856285638564856585668567856885698570
BSETCODE(-1, buffer);
XSRETURN_UNDEF;
}
*collIDP
= 2; /* USE A macro
for
this */
code = my_xstat_fs_Init(my_afsmon_FS_Handler, numFS, FSSktArray, numCollIDs,
collIDP, buff2, output_filename, detailed, FILESERV,
FSnameList, fs_showFlags, fs_showDefault);
if
(code) {
sprintf
(buffer,
"my_xstat_fs_Init() returned error. %s"
, buff2);
BSETCODE(125, buffer);
XSRETURN_UNDEF;
}
} /* end of process fileserver entries */
/* process cache manager entries */
if
(numCM) {
/* Allocate an array of sockets
for
each
fileserver we monitor */
CMsktbytes = numCM * sizeof(struct sockaddr_in);
src/Monitor.xs view on Meta::CPAN
86128613861486158616861786188619862086218622862386248625862686278628862986308631
BSETCODE(-1, buffer);
XSRETURN_UNDEF;
}
*collIDP
= 2; /* USE A macro
for
this */
code = my_xstat_cm_Init(my_afsmon_CM_Handler, numCM, CMSktArray, numCollIDs,
collIDP, buff2, output_filename, detailed, CACHEMAN,
CMnameList, cm_showFlags, cm_showDefault);
if
(code) {
sprintf
(buffer,
"my_xstat_cm_Init() returned error. %s"
, buff2);
BSETCODE(130, buffer);
XSRETURN_UNDEF;
}
} /* end of process fileserver entries */
/* end from afsmon_execute() */
SETCODE(0);
src/Monitor.xs view on Meta::CPAN
869286938694869586968697869886998700870187028703870487058706870787088709871087118712
struct rx_debugStats tstats;
char
*portName
= (char *) NULL;
char
*hostName
= (char *) NULL;
struct rx_debugConn tconn;
short noConns=0;
short showPeers=0;
short showLong=0;
int
version_flag=0;
afs_int32
length
=64;
char version[64];
char buffer[240]; /*
for
error messages */
afs_uint32 supportedDebugValues = 0;
afs_uint32 supportedStatValues = 0;
afs_uint32 supportedConnValues = 0;
afs_uint32 supportedPeerValues = 0;
afs_int32 nextconn = 0;
afs_int32 nextpeer = 0;
size = hv_iterinit(args);
/* fprintf(STDERR,
"Parsing args now: %d\n"
, size); */
src/Monitor.xs view on Meta::CPAN
884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876
s =
socket
(AF_INET, SOCK_DGRAM, 0);
taddr.sin_family = AF_INET;
taddr.sin_port = 0;
taddr.sin_addr.s_addr = 0;
#ifdef STRUCT_SOCKADDR_HAS_SA_LEN
taddr.sin_len = sizeof(struct sockaddr_in);
#endif
code =
bind
(s, (struct sockaddr *)
&taddr
, sizeof(struct sockaddr_in));
FSSETCODE(code);
if
(code) {
perror(
"bind"
);
XSRETURN_UNDEF;
}
if
(version_flag) /* add version to RETVAL and finish */
{
code = rx_GetServerVersion(s, host, port,
length
, version);
if
(code < 0)
{
sprintf
(buffer,
"get version call failed with code %d, errno %d"
,code,errno);
BSETCODE(code, buffer);
XSRETURN_UNDEF;
}
hv_store(RETVAL,
"version"
, 7, newSVpv(version, 0), 0);
goto
done;
}
code = rx_GetServerDebug(s, host, port,
&tstats
,
&supportedDebugValues
);
if
(code < 0) {
src/Monitor.xs view on Meta::CPAN
899089918992899389948995899689978998899990009001900290039004900590069007900890099010
(tconn.secStats.level != onlyAuth))
continue
;
}
}
TCONN = newHV();
hostAddr.s_addr = tconn.host;
hv_store(TCONN,
"host"
, 4, newSVpv(inet_ntoa(hostAddr), 0), 0);
hv_store(TCONN,
"port"
, 4, newSViv(ntohs(tconn.port)), 0);
hv_store(TCONN,
"cid"
, 3, newSViv(tconn.cid), 0);
hv_store(TCONN,
"epoch"
, 5, newSViv(tconn.epoch), 0);
hv_store(TCONN,
"error"
, 5, newSViv(tconn.error), 0);
hv_store(TCONN,
"serial"
, 6, newSViv(tconn.serial), 0);
hv_store(TCONN,
"natMTU"
, 6, newSViv(tconn.natMTU), 0);
hv_store(TCONN,
"flags"
, 5, newSViv(tconn.flags), 0);
hv_store(TCONN,
"securityIndex"
, 13, newSViv(tconn.securityIndex), 0);
hv_store(TCONN,
"type"
, 4, newSViv(tconn.type), 0);
if
(withSecStats) {
src/Monitor.xs view on Meta::CPAN
91399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182
ST(0) = sv_2mortal(newRV_inc((SV*)RETVAL));
SETCODE(0);
XSRETURN(1);
}
void
afs_error_message(code)
int32 code
PPCODE:
{
ST(0) = sv_newmortal();
sv_setpv(ST(0), (char *) error_message(code));
XSRETURN(1);
}
/* this function is generated automatically by constant_gen */
/* You didn't think I would type in this crap did you? */
/* thats what perl is
for
:-) */
void
constant(name, arg=0)
char * name
int
arg
PPCODE:
{
ST(0) = sv_newmortal();
errno = EINVAL;
switch (name[0]) {
case
'A'
:
switch (name[1]) {
case
'F'
:
switch (name[2]) {
case
'S'
:
if
(strEQ(name,
"AFSCB_MAX_XSTAT_LONGS"
))
sv_setiv(ST(0),AFSCB_MAX_XSTAT_LONGS);
else
if
(strEQ(name,
"AFSCB_XSTATSCOLL_CALL_INFO"
))
src/Monitor.xs view on Meta::CPAN
96729673967496759676967796789679968096819682968396849685
default
:
ST(0) = ST(1) =
&PL_sv_undef
;
return
;
}
break;
default
:
ST(0) = ST(1) =
&PL_sv_undef
;
return
;
}
errno = 0;
XSRETURN(1);
return
;
}
src/afsmon-labels.h view on Meta::CPAN
602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789"XStatsVersion_ops_sum"
,
"XStatsVersion_ops_sqr"
,
"XStatsVersion_ops_min"
,
"XStatsVersion_ops_max"
,
"GetXStats_ops"
,
"GetXStats_ops_ok"
,
"GetXStats_ops_sum"
,
"GetXStats_ops_sqr"
,
"GetXStats_ops_min"
,
"GetXStats_ops_max"
,
"FetchData_srv_err"
, /* File Server RPC Error Info */
"FetchData_net_err"
,
"FetchData_prot_err_err"
,
"FetchData_vol_err"
,
"FetchData_busy_err"
,
"FetchData_other_err"
,
"FetchACL_srv_err"
,
"FetchACL_net_err"
,
"FetchACL_prot_err"
,
"FetchACL_vol_err"
,
"FetchACL_busy_err"
,
"FetchACL_other_err"
,
"FetchStatus_srv_err"
,
"FetchStatus_net_err"
,
"FetchStatus_prot_err"
,
"FetchStatus_vol_err"
,
"FetchStatus_busy_err"
,
"FetchStatus_other_err"
,
"StoreData_srv_err"
,
"StoreData_net_err"
,
"StoreData_prot_err"
,
"StoreData_vol_err"
,
"StoreData_busy_err"
,
"StoreData_other_err"
,
"StoreACL_srv_err"
,
"StoreACL_net_err"
,
"StoreACL_prot_err"
,
"StoreACL_vol_err"
,
"StoreACL_busy_err"
,
"StoreACL_other_err"
,
"StoreStatus_srv_err"
,
"StoreStatus_net_err"
,
"StoreStatus_prot_err"
,
"StoreStatus_vol_err"
,
"StoreStatus_busy_err"
,
"StoreStatus_other_err"
,
"RemoveFile_srv_err"
,
"RemoveFile_net_err"
,
"RemoveFile_prot_err"
,
"RemoveFile_vol_err"
,
"RemoveFile_busy_err"
,
"RemoveFile_other_err"
,
"CreateFile_srv_err"
,
"CreateFile_net_err"
,
"CreateFile_prot_err"
,
"CreateFile_vol_err"
,
"CreateFile_busy_err"
,
"CreateFile_other_err"
,
"Rename_srv_err"
,
"Rename_net_err"
,
"Rename_prot_err"
,
"Rename_vol_err"
,
"Rename_busy_err"
,
"Rename_other_err"
,
"Symlink_srv_err"
,
"Symlink_net_err"
,
"Symlink_prot_err"
,
"Symlink_vol_err"
,
"Symlink_busy_err"
,
"Symlink_other_err"
,
"Link_srv_err"
,
"Link_net_err"
,
"Link_prot_err"
,
"Link_vol_err"
,
"Link_busy_err"
,
"Link_other_err"
,
"MakeDir_srv_err"
,
"MakeDir_net_err"
,
"MakeDir_prot_err"
,
"MakeDir_vol_err"
,
"MakeDir_busy_err"
,
"MakeDir_other_err"
,
"RemoveDir_srv_err"
,
"RemoveDir_net_err"
,
"RemoveDir_prot_err"
,
"RemoveDir_vol_err"
,
"RemoveDir_busy_err"
,
"RemoveDir_other_err"
,
"SetLock_srv_err"
,
"SetLock_net_err"
,
"SetLock_prot_err"
,
"SetLock_vol_err"
,
"SetLock_busy_err"
,
"SetLock_other_err"
,
"ExtendLock_srv_err"
,
"ExtendLock_net_err"
,
"ExtendLock_prot_err"
,
"ExtendLock_vol_err"
,
"ExtendLock_busy_err"
,
"ExtendLock_other_err"
,
"ReleaseLock_srv_err"
,
"ReleaseLock_net_err"
,
"ReleaseLock_prot_err"
,
"ReleaseLock_vol_err"
,
"ReleaseLock_busy_err"
,
"ReleaseLock_other_err"
,
"GetStatistics_srv_err"
,
"GetStatistics_net_err"
,
"GetStatistics_prot_err"
,
"GetStatistics_vol_err"
,
"GetStatistics_busy_err"
,
"GetStatistics_other_err"
,
"GiveUpCallbacks_srv_err"
,
"GiveUpCallbacks_net_err"
,
"GiveUpCallbacks_prot_err"
,
"GiveUpCallbacks_vol_err"
,
"GiveUpCallbacks_busy_err"
,
"GiveUpCallbacks_other_err"
,
"GetVolumeInfo_srv_err"
,
"GetVolumeInfo_net_err"
,
"GetVolumeInfo_prot_err"
,
"GetVolumeInfo_vol_err"
,
"GetVolumeInfo_busy_err"
,
"GetVolumeInfo_other_err"
,
"GetVolumeStatus_srv_err"
,
"GetVolumeStatus_net_err"
,
"GetVolumeStatus_prot_err"
,
"GetVolumeStatus_vol_err"
,
"GetVolumeStatus_busy_err"
,
"GetVolumeStatus_other_err"
,
"SetVolumeStatus_srv_err"
,
"SetVolumeStatus_net_err"
,
"SetVolumeStatus_prot_err"
,
"SetVolumeStatus_vol_err"
,
"SetVolumeStatus_busy_err"
,
"SetVolumeStatus_other_err"
,
"GetRootVolume_srv_err"
,
"GetRootVolume_net_err"
,
"GetRootVolume_prot_err"
,
"GetRootVolume_vol_err"
,
"GetRootVolume_busy_err"
,
"GetRootVolume_other_err"
,
"CheckToken_srv_err"
,
"CheckToken_net_err"
,
"CheckToken_prot_err"
,
"CheckToken_vol_err"
,
"CheckToken_busy_err"
,
"CheckToken_other_err"
,
"GetTime_srv_err"
,
"GetTime_net_err"
,
"GetTime_prot_err"
,
"GetTime_vol_err"
,
"GetTime_busy_err"
,
"GetTime_other_err"
,
"NGetVolumeInfo_srv_err"
,
"NGetVolumeInfo_net_err"
,
"NGetVolumeInfo_prot_err"
,
"NGetVolumeInfo_vol_err"
,
"NGetVolumeInfo_busy_err"
,
"NGetVolumeInfo_other_err"
,
"BulkStatus_srv_err"
,
"BulkStatus_net_err"
,
"BulkStatus_prot_err"
,
"BulkStatus_vol_err"
,
"BulkStatus_busy_err"
,
"BulkStatus_other_err"
,
"XStatsVersion_srv_err"
,
"XStatsVersion_net_err"
,
"XStatsVersion_prot_err"
,
"XStatsVersion_vol_err"
,
"XStatsVersion_busy_err"
,
"XStatsVersion_other_err"
,
"GetXStats_srv_err"
,
"GetXStats_net_err"
,
"GetXStats_prot_err"
,
"GetXStats_vol_err"
,
"GetXStats_busy_err"
,
"GetXStats_other_err"
,
"FetchData_xfers"
, /* File Server RPC Transfer timings */
"FetchData_xfers_ok"
,
"FetchData_xfers_sum"
,
"FetchData_xfers_sqr"
,
"FetchData_xfers_min"
,
"FetchData_xfers_max"
,
"FetchData_Kbytes_sum"
,
"FetchData_bytes_min"
,
"FetchData_bytes_max"
,
"FetchData_bytes_bucket0"
,
src/ppport.h view on Meta::CPAN
173174175176177178179180181182183184185186187188189190191192193# define PL_curstash curstash
# define PL_copline copline
# define PL_Sv Sv
/* Replace: 0 */
#endif
#ifndef dTHR
# ifdef WIN32
# define dTHR extern int Perl___notused
# else
# define dTHR extern int errno
# endif
#endif
#ifndef boolSV
# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
#endif
#ifndef gv_stashpvn
# define gv_stashpvn(str,len,flags) gv_stashpv(str,flags)
#endif
src/t/Monitor.t view on Meta::CPAN
1234567891011121314151617181920212223242526use
strict;
BEGIN {
use_ok(
'AFS::Monitor'
,
qw(error_message constant)
);
}
# Some very basic tests first:
sub
foo {
return
&AFS::Monitor::RX_CALL_CLEARED
}
# test error_message
is(error_message(267274),
'Unknown code pt 10 (267274)'
,
'Return Code 267274'
);
# test subroutine returning a constant
is(foo(42,17), 64,
'Sub Foo returns constant (2 args)'
);
is(foo(42), 64,
'Sub Foo returns constant (1 arg)'
);
is(foo(), 64,
'Sub Foo returns constant (no args)'
);
# test constant
is(constant(
'RX_CONN_DESTROY_ME'
), 2,
'Constant RX_CONN_DESTROY_ME'
);
is(constant(
'RX_CONN_DESTROY_ME'
, 2), 2,
'Constant RX_CONN_DESTROY_ME with argument'
);
isnt(constant(
'zzz'
), 2,
'Unknown Constant zzz'
);