-
Notifications
You must be signed in to change notification settings - Fork 2
DocControl
The code for the control interface, named ctlapi, is in PFL.
The interface for servers is implemented in pfl/ctlsvr.c.
The interface for clients is implemented in pfl/ctlcli.c.
globals
- options: inhuman, nodns, noheader
- colored output
show param
During command line parsing (e.g. msctl -s opstat:*aggr*), a queue of
control messages are built up.
Each time a new control request message is allocated, the last message
that was created is sent.
The new message is returned and message-specific settings may be set.
Once parsing has completed, the final request message is sent and the
response listening thread waits until end-of-file is received from the
server.
Pack show requests:
- faults
- hash tables
- opstats
- journal
- listcaches
- LNET interfaces
- thread pflog levels
- progress meters
- mlists
- on-disk tables
- pools
- RPC services
- threads
Parse
Most message types have two routines defined to handle and display messages sent from the server:
- Print header routine
- Print data routine
For example, psc_ctlmsg_hashtable_prhdr() and
psc_ctlmsg_hashtable_prdat().
These routines need not display anything and may instead do some type of
processing e.g. psc_ctlmsg_subsys_check which stores pflog subsystems
later used by the pflog level display routines.
Some global data structure instances get automatically registered for
statistics exportation and manipulation through daemon control sockets.
For example, the SLASH2 fcmhdirty list cache is accessible like this:
$ msctl -L fcmhdirtyAnd the code just looks like this:
#include "pfl/listcache.h"
struct fidc_membh {
...
struct psc_listentry fcmh_lentry;
};
struct psc_listcache fcmh_dirty_listcache;
lc_reginit(&fcmh_dirty_listcache, struct fidc_membh, fcmh_lentry,
"fcmhdirty");